[BACK]Return to job.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / make

Diff for /src/usr.bin/make/job.c between version 1.80 and 1.81

version 1.80, 2007/09/18 08:27:22 version 1.81, 2007/09/23 09:39:18
Line 191 
Line 191 
 #define ABORT_INTERRUPT 2           /* Because it was interrupted */  #define ABORT_INTERRUPT 2           /* Because it was interrupted */
 #define ABORT_WAIT      3           /* Waiting for jobs to finish */  #define ABORT_WAIT      3           /* Waiting for jobs to finish */
   
 /*  
  * XXX: Avoid SunOS bug... FILENO() is fp->_file, and file  
  * is a char! So when we go above 127 we turn negative!  
  */  
 #define FILENO(a) ((unsigned) fileno(a))  
   
 static int        numCommands;      /* The number of commands actually printed  static int        numCommands;      /* The number of commands actually printed
                                      * for a target. Should this number be                                       * for a target. Should this number be
                                      * 0, no shell will be executed. */                                       * 0, no shell will be executed. */
Line 990 
Line 984 
                  * marked close-on-exec, we must clear that bit in the new                   * marked close-on-exec, we must clear that bit in the new
                  * input.                   * input.
                  */                   */
                 if (dup2(FILENO(job->cmdFILE), 0) == -1)                  if (dup2(fileno(job->cmdFILE), 0) == -1)
                         Punt("Cannot dup2: %s", strerror(errno));                          Punt("Cannot dup2: %s", strerror(errno));
                 (void)fcntl(0, F_SETFD, 0);                  (void)fcntl(0, F_SETFD, 0);
                 (void)lseek(0, 0, SEEK_SET);                  (void)lseek(0, 0, SEEK_SET);
Line 1313 
Line 1307 
                 if (job->cmdFILE == NULL) {                  if (job->cmdFILE == NULL) {
                         Punt("Could not open %s", tfile);                          Punt("Could not open %s", tfile);
                 }                  }
                 (void)fcntl(FILENO(job->cmdFILE), F_SETFD, 1);                  (void)fcntl(fileno(job->cmdFILE), F_SETFD, 1);
                 /*                  /*
                  * Send the commands to the command file, flush all its buffers                   * Send the commands to the command file, flush all its buffers
                  * then rewind and remove the thing.                   * then rewind and remove the thing.

Legend:
Removed from v.1.80  
changed lines
  Added in v.1.81