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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/bin/parallel.cc
          +++ new/usr/src/cmd/make/bin/parallel.cc
↓ open down ↓ 434 lines elided ↑ open up ↑
 435  435  
 436  436  #ifdef TEAMWARE_MAKE_CMN
 437  437  #define MAXJOBS_ADJUST_RFE4694000
 438  438  
 439  439  #ifdef MAXJOBS_ADJUST_RFE4694000
 440  440  
 441  441  #include <unistd.h>     /* sysconf(_SC_NPROCESSORS_ONLN) */
 442  442  #include <sys/ipc.h>            /* ftok() */
 443  443  #include <sys/shm.h>            /* shmget(), shmat(), shmdt(), shmctl() */
 444  444  #include <semaphore.h>          /* sem_init(), sem_trywait(), sem_post(), sem_destroy() */
 445      -#if defined(linux)
 446      -#define LOADAVG_1MIN    0
 447      -#else
 448  445  #include <sys/loadavg.h>        /* getloadavg() */
 449      -#endif /* linux */
 450  446  
 451  447  /*
 452  448   *      adjust_pmake_max_jobs (int pmake_max_jobs)
 453  449   *
 454  450   *      Parameters:
 455  451   *              pmake_max_jobs  - max jobs limit set by user
 456  452   *
 457  453   *      External functions used:
 458  454   *              sysconf()
 459  455   *              getloadavg()
↓ open down ↓ 1707 lines elided ↑ open up ↑
2167 2163                                          for (mbst = cmd; (mbend = strstr(mbst, "\\\n")) != NULL; mbst = mbend + 2) {
2168 2164                                                  *mbend = '\0';
2169 2165                                                  DO_CHECK(fprintf(scrfp, NOCATGETS("/usr/bin/printf '%%s\\n' %s\\\\\n"), mbst));
2170 2166                                                  *mbend = '\\';
2171 2167                                          }
2172 2168                                          DO_CHECK(fprintf(scrfp, NOCATGETS("/usr/bin/printf '%%s\\n' %s\n"), mbst));
2173 2169                                  }
2174 2170                                  if (!do_not_exec_rule ||
2175 2171                                      !working_on_targets ||
2176 2172                                      always_exec) {
2177      -#if defined(linux)
2178      -                                        if (0 != strcmp(shell->string_mb, (char*)NOCATGETS("/bin/sh"))) {
2179      -                                                DO_CHECK(fprintf(scrfp, NOCATGETS("%s -c %s\n"), shell->string_mb, cmd));
2180      -                                        } else
2181      -#endif
2182 2173                                          DO_CHECK(fprintf(scrfp, NOCATGETS("%s -ce %s\n"), shell->string_mb, cmd));
2183 2174                                          DO_CHECK(fputs(NOCATGETS("__DMAKECMDEXITSTAT=$?\nif [ ${__DMAKECMDEXITSTAT} -ne 0 ]; then\n"), scrfp));
2184 2175                                          if (ignore) {
2185 2176                                                  DO_CHECK(fprintf(scrfp, NOCATGETS("\techo %s ${__DMAKECMDEXITSTAT} %s\n"),
2186 2177                                                          catgets(catd, 1, 343, "\"*** Error code"),
2187 2178                                                          catgets(catd, 1, 344, "(ignored)\"")));
2188 2179                                          } else {
2189 2180                                                  DO_CHECK(fprintf(scrfp, NOCATGETS("\techo %s ${__DMAKECMDEXITSTAT}\n"),
2190 2181                                                          catgets(catd, 1, 342, "\"*** Error code\"")));
2191 2182                                          }
↓ open down ↓ 277 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX