Print this page
11235 make -C fails under GCC7

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/bin/main.cc
          +++ new/usr/src/cmd/make/bin/main.cc
↓ open down ↓ 2537 lines elided ↑ open up ↑
2538 2538                                  }
2539 2539                                  break;
2540 2540                          case 2048: /* -C seen */
2541 2541                                  if (argv[i + 1] == NULL) {
2542 2542                                          fatal(gettext("No argument after -C flag"));
2543 2543                                  }
2544 2544                                  if (chdir(argv[i + 1]) != 0) {
2545 2545                                          fatal(gettext("failed to change to directory %s: %s"),
2546 2546                                              argv[i + 1], strerror(errno));
2547 2547                                  }
     2548 +                                MBSTOWCS(wcs_buffer, "DMAKE_CDIR");
     2549 +                                name = GETNAME(wcs_buffer, FIND_LENGTH);
2548 2550                                  path_reset = true;
2549 2551                                  rebuild_arg0 = true;
2550 2552                                  (void) get_current_path();
2551 2553                                  break;
2552 2554                          default: /* Shouldn't reach here */
2553 2555                                  argv[i] = NULL;
2554 2556                                  continue;
2555 2557                          }
2556 2558                          argv[i] = NULL;
2557 2559                          if (i == (argc - 1)) {
↓ open down ↓ 699 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX