Print this page
make: unifdef for REDIRECT_ERR (defined)
*** 847,857 ****
mktemp(mbstring);
stdout_file = strdup(mbstring);
stderr_file = NULL;
! #if defined (TEAMWARE_MAKE_CMN) && defined(REDIRECT_ERR)
if (!out_err_same) {
(void) sprintf(mbstring,
NOCATGETS("%s/dmake.stderr.%d.%d.XXXXXX"),
tmpdir,
getpid(),
--- 847,857 ----
mktemp(mbstring);
stdout_file = strdup(mbstring);
stderr_file = NULL;
! #if defined (TEAMWARE_MAKE_CMN)
if (!out_err_same) {
(void) sprintf(mbstring,
NOCATGETS("%s/dmake.stderr.%d.%d.XXXXXX"),
tmpdir,
getpid(),
*** 1467,1477 ****
}
(void) unlink(rp->stdout_file);
retmem_mb(rp->stdout_file);
rp->stdout_file = NULL;
}
! #if defined(REDIRECT_ERR)
if (!out_err_same && (rp->stderr_file != NULL)) {
if (stat(rp->stderr_file, &out_buf) < 0) {
fatal(catgets(catd, 1, 130, "stat of %s failed: %s"),
rp->stderr_file,
errmsg(errno));
--- 1467,1477 ----
}
(void) unlink(rp->stdout_file);
retmem_mb(rp->stdout_file);
rp->stdout_file = NULL;
}
!
if (!out_err_same && (rp->stderr_file != NULL)) {
if (stat(rp->stderr_file, &out_buf) < 0) {
fatal(catgets(catd, 1, 130, "stat of %s failed: %s"),
rp->stderr_file,
errmsg(errno));
*** 1482,1492 ****
}
(void) unlink(rp->stderr_file);
retmem_mb(rp->stderr_file);
rp->stderr_file = NULL;
}
- #endif
}
check_state(rp->temp_file);
if (rp->temp_file != NULL) {
free_name(rp->temp_file);
}
--- 1482,1491 ----
*** 2032,2050 ****
errmsg(errno));
break;
case 0: /* Child */
/* To control the processed targets list is not the child's business */
running_list = NULL;
- #if defined(REDIRECT_ERR)
if(out_err_same) {
redirect_io(stdout_file, (char*)NULL);
} else {
redirect_io(stdout_file, stderr_file);
}
- #else
- redirect_io(stdout_file, (char*)NULL);
- #endif
for (commands = commands;
(*commands != (char *)NULL);
commands++) {
silent_flag = silent;
ignore = false;
--- 2031,2045 ----