mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-19 18:10:00 +08:00
9321813126
* libF77/F77_aloc.c, libF77/exit_.c, libF77/main.c, libF77/s_paus.c, libF77/s_stop.c, libF77/setarg.c, libF77/setsig.c, libF77/sig_die.c, libF77/signal1.h0, libI77/close.c, libI77/dolio.c, libI77/fio.h, libI77/fmt.h, libI77/lio.h: Delete checks on __cplusplus. From-SVN: r54133
36 lines
486 B
C
36 lines
486 B
C
#include <stdio.h>
|
|
#include <signal.h>
|
|
|
|
#ifndef SIGIOT
|
|
#ifdef SIGABRT
|
|
#define SIGIOT SIGABRT
|
|
#endif
|
|
#endif
|
|
|
|
#include <stdlib.h>
|
|
extern void f_exit(void);
|
|
|
|
void sig_die(register char *s, int kill)
|
|
{
|
|
/* print error message, then clear buffers */
|
|
fprintf(stderr, "%s\n", s);
|
|
|
|
if(kill)
|
|
{
|
|
fflush(stderr);
|
|
f_exit();
|
|
fflush(stderr);
|
|
/* now get a core */
|
|
#ifdef SIGIOT
|
|
signal(SIGIOT, SIG_DFL);
|
|
#endif
|
|
abort();
|
|
}
|
|
else {
|
|
#ifdef NO_ONEXIT
|
|
f_exit();
|
|
#endif
|
|
exit(1);
|
|
}
|
|
}
|