]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR other/6955 (collect2 says "core dumped" when there is no core)
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Mon, 31 Mar 2003 01:14:02 +0000 (01:14 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Mon, 31 Mar 2003 01:14:02 +0000 (01:14 +0000)
PR other/6955
* collect2.c (collect_wait): Use WCOREDUMP and fix output message.
* system.h (WCOREDUMP, WCOREFLG): Define if necessary.

From-SVN: r65073

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

index 5bb34b36c4af877a7caa0301a4a2813399f0d029..6c9b166e9a14aa0c7e5e984ca362e3a4275c6912 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-29  Arpad Beszedes <beszedes@cc.u-szeged.hu>
 
        PR middle-end/9967
index 933a2777f7f4c05a5dc4f37e851388df362ed9f2..6501a2fc42267f338563d4a05f47813a8b0fd5bb 100644 (file)
@@ -1522,7 +1522,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 0a85b31b9210a4b29cac72a94ad36ac852827e8a..9747fe0e8f52a5e8c0bbb2364e75e49e352ad281 100644 (file)
@@ -266,6 +266,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