🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Chip Salzenberg Wed, 11 Oct 1989 15:55
GNU Make 3.56: Fix for MFLAGS/MAKEFLAGS with -j#
#485
Author: Chip Salzenberg
Date: Wed, 11 Oct 1989 15:55
63 lines
1706 bytes
[BUG FIX]

Fix creation of MFLAGS/MAKEFLAGS when job_slots > 1.  The old code wrote
   "-j#" in the string array, then advanced the pointer too far.  The result
   was that "-j#" was the last option propagated to child makes.

Index: main.c
***************
*** 1108,1115 ****
  
    i = 0;
-   flags[i++] = '-';
  
    for (cs = switches; cs->c != '\0'; ++cs)
!     if (cs->toenv)
        switch (cs->type)
  	{
--- 1129,1139 ----
  
    i = 0;
  
    for (cs = switches; cs->c != '\0'; ++cs)
!     {
!       if (! cs->toenv)
! 	continue;
!       if (i == 0 || flags[i - 1] == ' ')
! 	flags[i++] = '-';
        switch (cs->type)
  	{
***************
*** 1142,1153 ****
  		{
  		  strcpy (&flags[i], "j1 ");
! 		  i += 5;
  		}
  	      else
  		{
! 		  char *p = &flags[i];
! 		  sprintf (p, "%c%u ", cs->c,
  			   *(unsigned int *) cs->value_ptr);
! 		  i += strlen (p);
  		}
  	    }
--- 1166,1176 ----
  		{
  		  strcpy (&flags[i], "j1 ");
! 		  i += strlen (&flags[i]);
  		}
  	      else
  		{
! 		  sprintf (&flags[i], "%c%u ", cs->c,
  			   *(unsigned int *) cs->value_ptr);
! 		  i += strlen (&flags[i]);
  		}
  	    }
***************
*** 1174,1177 ****
--- 1197,1201 ----
  	  break;
  	}
+     }
  
    if (i == 0)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads