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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/bin/main.cc
          +++ new/usr/src/cmd/make/bin/main.cc
↓ open down ↓ 94 lines elided ↑ open up ↑
  95   95  
  96   96  // From parallel.cc
  97   97  #if defined(TEAMWARE_MAKE_CMN)
  98   98  #define MAXJOBS_ADJUST_RFE4694000
  99   99  
 100  100  #ifdef MAXJOBS_ADJUST_RFE4694000
 101  101  extern void job_adjust_fini();
 102  102  #endif /* MAXJOBS_ADJUST_RFE4694000 */
 103  103  #endif /* TEAMWARE_MAKE_CMN */
 104  104  
 105      -#if defined(linux)
 106      -#include <ctype.h>
 107      -#endif
 108  105  
 109  106  /*
 110  107   * Defined macros
 111  108   */
 112  109  #define LD_SUPPORT_ENV_VAR      NOCATGETS("SGS_SUPPORT")
 113  110  #define LD_SUPPORT_MAKE_LIB     NOCATGETS("libmakestate.so.1")
 114  111  
 115  112  /*
 116  113   * typedefs & structs
 117  114   */
↓ open down ↓ 76 lines elided ↑ open up ↑
 194  191          extern  int             dmake_ofd;
 195  192          extern  FILE*           dmake_ofp;
 196  193          extern  int             rxmPid;
 197  194          extern  XDR             xdrs_out;
 198  195  #endif
 199  196  #ifdef TEAMWARE_MAKE_CMN
 200  197          extern  char            verstring[];
 201  198  #endif
 202  199  
 203  200  jmp_buf jmpbuffer;
 204      -#if !defined(linux)
 205  201  extern nl_catd catd;
 206      -#endif
 207  202  
 208  203  /*
 209  204   *      main(argc, argv)
 210  205   *
 211  206   *      Parameters:
 212  207   *              argc                    You know what this is
 213  208   *              argv                    You know what this is
 214  209   *
 215  210   *      Static variables used:
 216  211   *              list_all_targets        make -T seen
↓ open down ↓ 39 lines elided ↑ open up ↑
 256  251          struct stat             out_stat, err_stat;
 257  252  #endif
 258  253          hostid = gethostid();
 259  254  #ifdef TEAMWARE_MAKE_CMN
 260  255          avo_get_user(NULL, NULL); // Initialize user name
 261  256  #endif
 262  257          bsd_signals();
 263  258  
 264  259          (void) setlocale(LC_ALL, "");
 265  260  
 266      -#if defined (HP_UX) || defined(linux)
 267      -       /* HP-UX users typically will not have NLSPATH set, and this binary
 268      -        * requires that it be set.  On HP-UX 9.0x, /usr/lib/nls/%L/%N.cat is
 269      -        * the path to set it to.
 270      -        */
 271      -
 272      -       if (getenv(NOCATGETS("NLSPATH")) == NULL) {
 273      -         putenv(NOCATGETS("NLSPATH=/usr/lib/nls/%L/%N.cat"));
 274      -        }
 275      -#endif
 276  261  
 277  262  #ifdef DMAKE_STATISTICS
 278  263          if (getenv(NOCATGETS("DMAKE_STATISTICS"))) {
 279  264                  getname_stat = true;
 280  265          }
 281  266  #endif
 282  267  
 283  268  
 284  269          /*
 285  270           * avo_init() sets the umask to 0.  Save it here and restore
↓ open down ↓ 122 lines elided ↑ open up ↑
 408  393                  if(prognameptr) {
 409  394                          prognameptr++;
 410  395                  } else {
 411  396                          prognameptr = argv[0];
 412  397                  }
 413  398                  if(!strcmp(prognameptr, NOCATGETS("svr4.make"))) {
 414  399                          svr4 = true;
 415  400                          posix = false;
 416  401                  }
 417  402          }
 418      -#if !defined(HP_UX) && !defined(linux)
 419  403          if (getenv(USE_SVR4_MAKE) || getenv(NOCATGETS("USE_SVID"))){
 420  404             svr4 = true;
 421  405             posix = false;
 422  406          }
 423      -#endif
 424  407  
 425  408          /*
 426  409           * Find the dmake_compat_mode: posix, sun, svr4, or gnu_style, .
 427  410           */
 428  411          char * dmake_compat_mode_var = getenv(NOCATGETS("SUN_MAKE_COMPAT_MODE"));
 429  412          if (dmake_compat_mode_var != NULL) {
 430  413                  if (0 == strcasecmp(dmake_compat_mode_var, NOCATGETS("GNU"))) {
 431  414                          gnu_style = true;
 432  415                  }
 433  416                  //svr4 = false;
↓ open down ↓ 934 lines elided ↑ open up ↑
1368 1351  #endif
1369 1352                                  tptr = strchr(SUNPRO_CMD_OPTS, optopt);
1370 1353                          }
1371 1354                          if (!tptr) {
1372 1355                                  fatal(catgets(catd, 1, 279, "Unknown option `-%c'"), optopt);
1373 1356                          } else {
1374 1357                                  fatal(catgets(catd, 1, 280, "Missing argument after `-%c'"), optopt);
1375 1358                          }
1376 1359                  }
1377 1360  
1378      -#if defined(linux)
1379      -                if (ch == 1) {
1380      -                        if(optind < argc) {
1381      -                                //optind++;
1382      -                                //current_optind++;
1383      -                        makefile_next = 0;
1384      -                        current_optind = optind;
1385      -                                continue;
1386      -                        } else {
1387      -                                break;
1388      -                        }
1389      -                }
1390      -#endif
1391 1361  
1392 1362  
1393 1363                  makefile_next |= parse_command_option(ch);
1394 1364                  /*
1395 1365                   * If we're done processing all of the options of
1396 1366                   * ONE argument string...
1397 1367                   */
1398 1368                  if (current_optind < optind) {
1399 1369                          i = current_optind;
1400 1370                          k = 0;
↓ open down ↓ 319 lines elided ↑ open up ↑
1720 1690                  if (invert_this) {
1721 1691                          read_trace_level--;
1722 1692                  } else {
1723 1693                          read_trace_level++;
1724 1694                  }
1725 1695                  return 0;
1726 1696          case 'd':                        /* Debug flag */
1727 1697                  if (invert_this) {
1728 1698                          debug_level--;
1729 1699                  } else {
1730      -#if defined( HP_UX) || defined(linux)
1731      -                      if (debug_level < 2)  /* Fixes a bug on HP-UX */
1732      -#endif
1733 1700                          debug_level++;
1734 1701                  }
1735 1702                  return 0;
1736 1703  #ifdef NSE
1737 1704          case 'E':
1738 1705                  if (invert_this) {
1739 1706                          nse = false;
1740 1707                  } else {
1741 1708                          nse = true;
1742 1709                  }
↓ open down ↓ 1996 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX