Print this page
make: ship the Joyent patch to enable parallel make (originally from rm)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/lib/mksh/dosys.cc
          +++ new/usr/src/cmd/make/lib/mksh/dosys.cc
↓ open down ↓ 29 lines elided ↑ open up ↑
  30   30   *      Execute one commandline
  31   31   */
  32   32  
  33   33  /*
  34   34   * Included files
  35   35   */
  36   36  #include <sys/wait.h>                   /* WIFEXITED(status) */
  37   37  #include <alloca.h>             /* alloca() */
  38   38  
  39   39  #if defined(TEAMWARE_MAKE_CMN) || defined(MAKETOOL) /* tolik */
  40      -#       include <avo/strings.h> /* AVO_STRDUP() */
  41   40  #if defined(DISTRIBUTED)
  42   41  #       include <dm/Avo_CmdOutput.h>
  43   42  #       include <rw/xdrstrea.h>
  44   43  #endif
  45   44  #endif
  46   45  
  47   46  #include <stdio.h>              /* errno */
  48   47  #include <errno.h>              /* errno */
  49   48  #include <fcntl.h>              /* open() */
  50   49  #include <mksh/dosys.h>
↓ open down ↓ 577 lines elided ↑ open up ↑
 628  627          termination_signal = WTERMSIG(status);
 629  628          core_dumped = WCOREDUMP(status);
 630  629  
 631  630          /*
 632  631           * If the child returned an error, we now try to print a
 633  632           * nice message about it.
 634  633           */
 635  634          SEND_MTOOL_MSG(
 636  635                  make_output_msg = new Avo_CmdOutput();
 637  636                  (void) sprintf(tmp_buf, "%d", job_msg_id);
 638      -                make_output_msg->appendOutput(AVO_STRDUP(tmp_buf));
      637 +                make_output_msg->appendOutput(strdup(tmp_buf));
 639  638          );
 640  639  
 641  640          tmp_buf[0] = (int) nul_char;
 642  641          if (!silent_error) {
 643  642                  if (exit_status != 0) {
 644  643                          (void) fprintf(stdout,
 645  644                                         catgets(libmksdmsi18n_catd, 1, 103, "*** Error code %d"),
 646  645                                         exit_status);
 647  646                          SEND_MTOOL_MSG(
 648  647                                  (void) sprintf(&tmp_buf[strlen(tmp_buf)],
↓ open down ↓ 22 lines elided ↑ open up ↑
 671  670                          (void) fprintf(stdout,
 672  671                                         catgets(libmksdmsi18n_catd, 1, 109, " (ignored)"));
 673  672                          SEND_MTOOL_MSG(
 674  673                                  (void) sprintf(&tmp_buf[strlen(tmp_buf)],
 675  674                                                 catgets(libmksdmsi18n_catd, 1, 110, " (ignored)"));
 676  675                          );
 677  676                  }
 678  677                  (void) fprintf(stdout, "\n");
 679  678                  (void) fflush(stdout);
 680  679                  SEND_MTOOL_MSG(
 681      -                        make_output_msg->appendOutput(AVO_STRDUP(tmp_buf));
      680 +                        make_output_msg->appendOutput(strdup(tmp_buf));
 682  681                  );
 683  682          }
 684  683          SEND_MTOOL_MSG(
 685  684                  xdr_msg = (RWCollectable*) make_output_msg;
 686  685                  xdr(xdrs_p, xdr_msg);
 687  686                  delete make_output_msg;
 688  687          );
 689  688  
 690  689  #ifdef PRINT_EXIT_STATUS
 691  690          warning_mksh(NOCATGETS("I'm in await(), returning failed."));
↓ open down ↓ 72 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX