564 value.it_interval.tv_sec = 0;
565 value.it_interval.tv_usec = 0;
566 value.it_value.tv_sec = 0;
567 value.it_value.tv_usec = 0;
568 (void) setitimer(ITIMER_REAL, &value, NULL);
569 }
570
571 //
572 // If dmake is running with -t option, set dmake_mode_type to serial.
573 // This is done because doname() calls touch_command() that runs serially.
574 // If we do not do that, maketool will have problems.
575 //
576 if(touch) {
577 dmake_mode_type = serial_mode;
578 no_parallel = true;
579 }
580 #else
581 parallel_flag = false;
582 #endif
583
584 #if defined (TEAMWARE_MAKE_CMN) && defined(REDIRECT_ERR)
585 /*
586 * Check whether stdout and stderr are physically same.
587 * This is in order to decide whether we need to redirect
588 * stderr separately from stdout.
589 * This check is performed only if __DMAKE_SEPARATE_STDERR
590 * is not set. This variable may be used in order to preserve
591 * the 'old' behaviour.
592 */
593 out_err_same = true;
594 char * dmake_sep_var = getenv(NOCATGETS("__DMAKE_SEPARATE_STDERR"));
595 if (dmake_sep_var == NULL || (0 != strcasecmp(dmake_sep_var, NOCATGETS("NO")))) {
596 struct stat stdout_stat;
597 struct stat stderr_stat;
598 if( (fstat(1, &stdout_stat) == 0)
599 && (fstat(2, &stderr_stat) == 0) )
600 {
601 if( (stdout_stat.st_dev != stderr_stat.st_dev)
602 || (stdout_stat.st_ino != stderr_stat.st_ino) )
603 {
604 out_err_same = false;
|
564 value.it_interval.tv_sec = 0;
565 value.it_interval.tv_usec = 0;
566 value.it_value.tv_sec = 0;
567 value.it_value.tv_usec = 0;
568 (void) setitimer(ITIMER_REAL, &value, NULL);
569 }
570
571 //
572 // If dmake is running with -t option, set dmake_mode_type to serial.
573 // This is done because doname() calls touch_command() that runs serially.
574 // If we do not do that, maketool will have problems.
575 //
576 if(touch) {
577 dmake_mode_type = serial_mode;
578 no_parallel = true;
579 }
580 #else
581 parallel_flag = false;
582 #endif
583
584 #if defined (TEAMWARE_MAKE_CMN)
585 /*
586 * Check whether stdout and stderr are physically same.
587 * This is in order to decide whether we need to redirect
588 * stderr separately from stdout.
589 * This check is performed only if __DMAKE_SEPARATE_STDERR
590 * is not set. This variable may be used in order to preserve
591 * the 'old' behaviour.
592 */
593 out_err_same = true;
594 char * dmake_sep_var = getenv(NOCATGETS("__DMAKE_SEPARATE_STDERR"));
595 if (dmake_sep_var == NULL || (0 != strcasecmp(dmake_sep_var, NOCATGETS("NO")))) {
596 struct stat stdout_stat;
597 struct stat stderr_stat;
598 if( (fstat(1, &stdout_stat) == 0)
599 && (fstat(2, &stderr_stat) == 0) )
600 {
601 if( (stdout_stat.st_dev != stderr_stat.st_dev)
602 || (stdout_stat.st_ino != stderr_stat.st_ino) )
603 {
604 out_err_same = false;
|