Print this page
make: unifdef for other OSes (undefined)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/bin/doname.cc
          +++ new/usr/src/cmd/make/bin/doname.cc
↓ open down ↓ 53 lines elided ↑ open up ↑
  54   54  #include <mksh/macro.h>         /* getvar(), expand_value() */
  55   55  #include <mksh/misc.h>          /* getmem() */
  56   56  #include <poll.h>
  57   57  
  58   58  #ifdef PARALLEL
  59   59  #       include <rx/api.h>
  60   60  #endif
  61   61  
  62   62  #include <signal.h>
  63   63  
  64      -#ifndef HP_UX
  65   64  #       include <stropts.h>
  66      -#endif
  67   65  
  68   66  #include <sys/errno.h>
  69   67  #include <sys/stat.h>
  70   68  #include <sys/types.h>
  71   69  #include <sys/utsname.h>        /* uname() */
  72   70  #include <sys/wait.h>
  73   71  #include <unistd.h>             /* close() */
  74   72  
  75   73  /*
  76   74   * Defined macros
↓ open down ↓ 3475 lines elided ↑ open up ↑
3552 3550  pollResults(char *outFn, char *errFn, char *hostNm)
3553 3551  {
3554 3552          int             child;
3555 3553  
3556 3554          child = fork();
3557 3555          switch (child) {
3558 3556          case -1:
3559 3557                  break;
3560 3558          case 0:
3561 3559                  enable_interrupt((void (*) (int))SIG_DFL);
3562      -#ifdef linux
3563      -                (void) signal(SIGUSR1, Avo_PollResultsAction_Sigusr1Handler);
3564      -#else
3565 3560                  (void) sigset(SIGUSR1, Avo_PollResultsAction_Sigusr1Handler);
3566      -#endif
3567 3561                  pollResultsAction(outFn, errFn);
3568 3562  
3569 3563                  exit(0);
3570 3564                  break;
3571 3565          default:
3572 3566                  break;
3573 3567          }
3574 3568          return child;
3575 3569  }
3576 3570  
↓ open down ↓ 33 lines elided ↑ open up ↑
3610 3604  
3611 3605          if ((fd = open(outFn, O_RDONLY)) < 0
3612 3606                  && (errno != EINTR || (fd = open(outFn, O_RDONLY)) < 0)) {
3613 3607                  // open() failed
3614 3608                  warning(NOCATGETS("Internal error: open(\"%s\", O_RDONLY) failed: %s\n"),
3615 3609                          outFn, strerror(errno));
3616 3610                  exit(1);
3617 3611          }
3618 3612  
3619 3613          while (!pollResultsActionTimeToFinish && stat(outFn, &statbuf) == 0) {
3620      -#ifdef linux
3621      -                if ((statbuf.st_mtime > file_time)
3622      -                   ) {
3623      -                        file_time = statbuf.st_mtime;
3624      -                        rxmGetNextResultsBlock(fd);
3625      -                }
3626      -#else
3627 3614                  if ((statbuf.st_mtim.tv_sec > file_time) ||
3628 3615                      ((statbuf.st_mtim.tv_sec == file_time) &&
3629 3616                      (statbuf.st_mtim.tv_nsec > file_time_nsec))
3630 3617                     ) {
3631 3618                          file_time = statbuf.st_mtim.tv_sec;
3632 3619                          file_time_nsec = statbuf.st_mtim.tv_nsec;
3633 3620                          rxmGetNextResultsBlock(fd);
3634 3621                  }
3635      -#endif
3636 3622                  us_sleep(STAT_RETRY_SLEEP_TIME);
3637 3623          }
3638 3624          // Check for the rest of output
3639 3625          rxmGetNextResultsBlock(fd);
3640 3626  
3641 3627          (void) close(fd);
3642 3628  }
3643 3629  
3644 3630  static void
3645 3631  rxmGetNextResultsBlock(int fd)
↓ open down ↓ 134 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX