Print this page
make: unifdef for MAKETOOL and DISTRIBUTED (undefined)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/lib/mksh/macro.cc
          +++ new/usr/src/cmd/make/lib/mksh/macro.cc
↓ open down ↓ 1216 lines elided ↑ open up ↑
1217 1217              (value->hash.length > 0)) {
1218 1218                  vpath_defined = true;
1219 1219          }
1220 1220          /*
1221 1221           * For environment variables we also set the
1222 1222           * environment value each time.
1223 1223           */
1224 1224          if (macro->body.macro.exported) {
1225 1225                  static char     *env;
1226 1226  
1227      -#ifdef DISTRIBUTED
1228      -                if (!reading_environment && (value != NULL)) {
1229      -#else
1230 1227                  if (!reading_environment && (value != NULL) && value->dollar) {
1231      -#endif
1232 1228                          Envvar  p;
1233 1229  
1234 1230                          for (p = envvar; p != NULL; p = p->next) {
1235 1231                                  if (p->name == name) {
1236 1232                                          p->value = value;
1237 1233                                          p->already_put = false;
1238 1234                                          goto found_it;
1239 1235                                  }
1240 1236                          }
1241 1237                          p = ALLOC(Envvar);
1242 1238                          p->name = name;
1243 1239                          p->value = value;
1244 1240                          p->next = envvar;
1245 1241                          p->env_string = NULL;
1246 1242                          p->already_put = false;
1247 1243                          envvar = p;
1248 1244  found_it:;
1249      -#ifdef DISTRIBUTED
1250      -                }
1251      -                if (reading_environment || (value == NULL) || !value->dollar) {
1252      -#else
1253 1245                  } else {
1254      -#endif
1255 1246                          length = 2 + strlen(name->string_mb);
1256 1247                          if (value != NULL) {
1257 1248                                  length += strlen(value->string_mb);
1258 1249                          }
1259 1250                          Property env_prop = maybe_append_prop(name, env_mem_prop);
1260 1251                          /*
1261 1252                           * We use a permanent buffer to reset SUNPRO_DEPENDENCIES value.
1262 1253                           */
1263 1254                          if (!strncmp(name->string_mb, NOCATGETS("SUNPRO_DEPENDENCIES"), 19)) {
1264 1255                                  if (length >= sunpro_dependencies_buf_size) {
↓ open down ↓ 81 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX