re PR other/6955 (collect2 says "core dumped" when there is no core)
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sun, 30 Mar 2003 19:01:58 +0000 (19:01 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sun, 30 Mar 2003 19:01:58 +0000 (19:01 +0000)
PR other/6955
* collect2.c (collect_wait): Use WCOREDUMP and fix output message.
* system.h (WCOREDUMP, WCOREFLG): Define if necessary.

From-SVN: r65048

gcc/ChangeLog
gcc/collect2.c
gcc/system.h

index 7c5433c39dcf5632620589ad800de96d5846028c..7a1e510a605f158f0a6c51014847f37a62c77ad0 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       PR other/6955
+       * collect2.c (collect_wait): Use WCOREDUMP and fix output message.
+       * system.h (WCOREDUMP, WCOREFLG): Define if necessary.
+
 2003-03-30  Richard Henderson  <rth@redhat.com>
 
        PR c/10083
index af97c2091f94f2459026c7607b2c059893383b73..ca1fe92b1e23a70588802b275ec35ee5348e3732 100644 (file)
@@ -1508,7 +1508,7 @@ collect_wait (prog)
          int sig = WTERMSIG (status);
          error ("%s terminated with signal %d [%s]%s",
                 prog, sig, strsignal(sig),
-                status & 0200 ? "" : ", core dumped");
+                WCOREDUMP(status) ? ", core dumped" : "");
          collect_exit (FATAL_EXIT_CODE);
        }
 
index 81988c517586ea28ec28e5e3cf0e822ddfbb1566..2f16008be19459c9fb7340dd62b168f5a6e1e7ff 100644 (file)
@@ -270,6 +270,12 @@ extern int errno;
 #ifndef WSTOPSIG
 #define WSTOPSIG WEXITSTATUS
 #endif
+#ifndef WCOREDUMP
+#define WCOREDUMP(S) ((S) & WCOREFLG)
+#endif
+#ifndef WCOREFLG
+#define WCOREFLG 0200
+#endif
 
 /* The HAVE_DECL_* macros are three-state, undefined, 0 or 1.  If they
    are defined to 0 then we must provide the relevant declaration