aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-06-14 21:11:55 +0000
committerRichard Stallman <rms@gnu.org>1992-06-14 21:11:55 +0000
commitb7004e5381a684554dd17c52d1b902d5df43b8a2 (patch)
treecc381f2279fd70d8a7e3263b4a85f511eff3b57c
parent76052e7462b4a4a51e1770ee9c556afcd3abaabf (diff)
downloadgcc-b7004e5381a684554dd17c52d1b902d5df43b8a2.zip
gcc-b7004e5381a684554dd17c52d1b902d5df43b8a2.tar.gz
gcc-b7004e5381a684554dd17c52d1b902d5df43b8a2.tar.bz2
*** empty log message ***
From-SVN: r1203
-rw-r--r--gcc/protoize.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/gcc/protoize.c b/gcc/protoize.c
index f97d1c5..0850924 100644
--- a/gcc/protoize.c
+++ b/gcc/protoize.c
@@ -67,9 +67,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#else
#include <sys/dir.h>
#endif
-#if ! defined (USG) || defined (SVR4)
-#include <sys/wait.h>
-#endif
#include <setjmp.h>
#include "gvarargs.h"
@@ -2041,21 +2038,20 @@ gen_aux_info_file (base_filename)
if (wait (&wait_status) == -1)
{
- fprintf (stderr, "%s: error: wait for process failed: %s\n",
+ fprintf (stderr, "%s: wait failed: %s\n",
pname, sys_errlist[errno]);
return 0;
}
- if (!WIFEXITED (wait_status))
- {
- fprintf (stderr, "%s: error: subprocess %ld did not exit\n",
- pname, (long) child_pid);
- kill (child_pid, 9);
- return 0;
- }
- if (WEXITSTATUS (wait_status) != 0)
+ if ((wait_status & 0x7F) != 0)
+ {
+ fprintf (stderr, "%s: subprocess got fatal signal %d",
+ pname, (wait_status & 0x7F));
+ return 0;
+ }
+ if (((wait_status & 0xFF00) >> 8) != 0)
{
- fprintf (stderr, "%s: error: %s: compilation failed\n",
- pname, base_filename);
+ fprintf (stderr, "%s: %s exited with status %d\n",
+ pname, base_filename, ((wait_status & 0xFF00) >> 8));
return 0;
}
return 1;