diff options
author | Paul Smith <psmith@gnu.org> | 2004-03-22 15:11:48 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2004-03-22 15:11:48 +0000 |
commit | e334942e573ea8a4416eca0afafcaf45c3bba06f (patch) | |
tree | 856acdfc21f2aa5cbfca7dff414b193496f0d2c1 /main.c | |
parent | f305a52c02cd17188bb6cc429d56c5912c976229 (diff) | |
download | gunmake-e334942e573ea8a4416eca0afafcaf45c3bba06f.tar.gz |
Numerous updates and bug fixes.
A number of W32 cleanups from J.Grant.
A number of OS/2 cleanups from Andreas Buening.
Various random bug fixes.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -35,6 +35,7 @@ MA 02111-1307, USA. */ #endif #ifdef WINDOWS32 #include <windows.h> +#include <io.h> #include "pathstuff.h" #endif #ifdef __EMX__ @@ -544,11 +545,13 @@ enter_command_line_file (char *name) /* Toggle -d on receipt of SIGUSR1. */ +#ifdef SIGUSR1 static RETSIGTYPE debug_signal_handler (int sig UNUSED) { db_level = db_level ? DB_NONE : DB_BASIC; } +#endif static void decode_debug_flags (void) @@ -1917,14 +1920,14 @@ main (int argc, char **argv, char **envp) termination. */ int pid; int status; - pid = child_execute_job(0, 1, nargv, environ); + pid = child_execute_job (0, 1, nargv, environ); /* is this loop really necessary? */ do { - pid = wait(&status); - } while(pid <= 0); + pid = wait (&status); + } while (pid <= 0); /* use the exit code of the child process */ - exit(WIFEXITED(status) ? WEXITSTATUS(status) : EXIT_FAILURE); + exit (WIFEXITED(status) ? WEXITSTATUS(status) : EXIT_FAILURE); } #else exec_command (nargv, environ); @@ -1938,6 +1941,10 @@ main (int argc, char **argv, char **envp) } db_level = orig_db_level; + + /* Free the makefile mtimes (if we allocated any). */ + if (makefile_mtimes) + free ((char *) makefile_mtimes); } /* Set up `MAKEFLAGS' again for the normal targets. */ |