diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2007-01-18 08:30:04 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2007-01-18 08:30:04 +0000 |
commit | 79131f92e8c70b3023b07d4820a9d9857c3cf52b (patch) | |
tree | 63de5c556f25f14eab5f56e718911fc2cf6324ff /dmake/function.c | |
parent | ce72c53161ce2788ca7041402bca882195e5e6b5 (diff) |
INTEGRATION: CWS dmake47 (1.9.2); FILE MERGED
2006/11/12 05:06:38 vq 1.9.2.2: #i71422# Add a new feature: Using @@ as a recipe prefix redirects the
output (stdout and stderr) of a recipe to /dev/null (or NUL on W32)
completely suppressing the output of that recipe to the terminal.
As for the @ prefix this can be disabled using the -v[r] switch.
2006/09/29 21:20:45 vq 1.9.2.1: #i69953# Remove NO_DRIVE_LETTERS, use HAVE_DRIVE_LETTERS instead.
Diffstat (limited to 'dmake/function.c')
-rw-r--r-- | dmake/function.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/dmake/function.c b/dmake/function.c index a74cbf4e84b0..e369161fd29e 100644 --- a/dmake/function.c +++ b/dmake/function.c @@ -1,6 +1,6 @@ /* $RCSfile: function.c,v $ --- $Revision: 1.9 $ --- last change: $Author: vg $ $Date: 2006-09-25 09:39:41 $ +-- $Revision: 1.10 $ +-- last change: $Author: vg $ $Date: 2007-01-18 09:30:04 $ -- -- SYNOPSIS -- GNU style functions for dmake. @@ -319,8 +319,9 @@ char *data; tmpname = Expand(file); if( *tmpname ) { -#ifdef NO_DRIVE_LETTERS - /* umask without ugo rights doesn't make sense. */ +#ifdef HAVE_MKSTEMP + /* Only use umask if we are also using mkstemp - this basically + * avoids using the incompatible implementation from MSVC. */ mode_t mask; /* Create tempfile with 600 permissions. */ @@ -329,7 +330,7 @@ char *data; if( (tmpfile = fopen(tmpname, "w")) == NIL(FILE) ) Open_temp_error( tmpname, name ); -#ifdef NO_DRIVE_LETTERS +#ifdef HAVE_MKSTEMP umask(mask); #endif @@ -510,9 +511,6 @@ char *mod1; char *buffer; char *tmpnm; FILE *old_stdout_redir = stdout_redir; -#if !defined(USE_SANE_EXEC_SHELL_REDIR) - int old_stdout; -#endif int wait = Wait_for_completion; int old_is_exec_shell = Is_exec_shell; @@ -575,20 +573,9 @@ char *mod1; Verbose &= V_LEAVE_TMP; Trace = FALSE; - /* Only unix type builds define the redirection of stdout in the forked - * child process. Other OSs have to do it here, in the parent process. - * Note! This is not save for parallel builds, see #iz53148#, but parallel - * builds are not supported for non-unix like builds anyway. */ -#if !defined(USE_SANE_EXEC_SHELL_REDIR) - old_stdout = dup(1); - close(1); - dup( fileno(stdout_redir) ); -#endif + /* The actual redirection happens in runargv(). */ Exec_commands( &cell ); -#if !defined(USE_SANE_EXEC_SHELL_REDIR) - close(1); - dup(old_stdout); -#endif + Unlink_temp_files( &cell ); Trace = tflag; |