From cffc67d671d6923e356531ebed2d8020a4e5064d Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Mon, 31 Mar 2003 01:14:02 +0000 Subject: [PATCH] re PR other/6955 (collect2 says "core dumped" when there is no core) 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 | 6 ++++++ gcc/collect2.c | 2 +- gcc/system.h | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5bb34b36c4af..6c9b166e9a14 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-03-30 Kaveh R. Ghazi + + 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 PR middle-end/9967 diff --git a/gcc/collect2.c b/gcc/collect2.c index 933a2777f7f4..6501a2fc4226 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -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); } diff --git a/gcc/system.h b/gcc/system.h index 0a85b31b9210..9747fe0e8f52 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -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 -- 2.47.2