Commit 15dda4d3 by Kaveh R. Ghazi Committed by Kaveh Ghazi

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: r65048
parent 5bf92e20
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
......
......@@ -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);
}
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment