Print this page
make: unifdef for SUNOS4_AND_AFTER (defined)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/bin/depvar.cc
          +++ new/usr/src/cmd/make/bin/depvar.cc
↓ open down ↓ 50 lines elided ↑ open up ↑
  51   51  
  52   52  /*
  53   53   * Add a name to the list.
  54   54   */
  55   55  
  56   56  void
  57   57  depvar_add_to_list(Name name, Boolean cmdline)
  58   58  {
  59   59          Depvar          dv;
  60   60  
  61      -#ifdef SUNOS4_AND_AFTER
  62   61          dv = ALLOC(Depvar);
  63      -#else
  64      -        dv = (Depvar) Malloc(sizeof(struct _Depvar));
  65      -#endif
  66   62          dv->name = name;
  67   63          dv->next = NULL;
  68   64          dv->cmdline = cmdline;
  69   65          *bpatch = dv;
  70   66          bpatch = &dv->next;
  71   67  }
  72   68  
  73   69  /*
  74   70   * The macro `name' has been used in either the left-hand or
  75   71   * right-hand side of a dependency.  See if it is in the
↓ open down ↓ 4 lines elided ↑ open up ↑
  80   76   * warning is produced.
  81   77   */
  82   78  void
  83   79  depvar_dep_macro_used(Name name)
  84   80  {
  85   81          Depvar          dv;
  86   82  
  87   83          for (dv = depvar_list; dv != NULL; dv = dv->next) {
  88   84                  if (name == dv->name) {
  89   85  #ifdef NSE
  90      -#ifdef SUNOS4_AND_AFTER
  91   86                          if (dv->cmdline) {
  92      -#else
  93      -                        if (is_true(dv->cmdline)) {
  94      -#endif
  95   87                                  nse_dep_cmdmacro(dv->name->string);
  96   88                          }
  97   89  #endif
  98   90                          variant_deps = true;
  99   91                          break;
 100   92                  }
 101   93          }
 102   94  }
 103   95  
 104   96  #ifdef NSE
↓ open down ↓ 2 lines elided ↑ open up ↑
 107   99   * to a cd before a recursive make.  See if it was
 108  100   * defined on the command-line and, if so, complain.
 109  101   */
 110  102  void
 111  103  depvar_rule_macro_used(Name name)
 112  104  {
 113  105          Depvar          dv;
 114  106  
 115  107          for (dv = depvar_list; dv != NULL; dv = dv->next) {
 116  108                  if (name == dv->name) {
 117      -#ifdef SUNOS4_AND_AFTER
 118  109                          if (dv->cmdline) {
 119      -#else
 120      -                        if (is_true(dv->cmdline)) {
 121      -#endif
 122  110                                  nse_rule_cmdmacro(dv->name->string);
 123  111                          }
 124  112                          break;
 125  113                  }
 126  114          }
 127  115  }
 128  116  #endif
 129  117  
 130  118  /*
 131  119   * Print the results.  If any of the Dependency Variables
↓ open down ↓ 13 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX