Index: trunk/config.auto.h.in =================================================================== --- trunk/config.auto.h.in (revision 2232) +++ trunk/config.auto.h.in (revision 2233) @@ -29,6 +29,9 @@ /**** TODO ****/ +/* C89 has atexit() */ +#define HAS_ATEXIT 1 + /* Define to 1 if you have the `canonicalize_file_name' function. */ #define HAVE_CANONICALIZE_FILE_NAME 1 Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 2232) +++ trunk/src/plug_io.c (revision 2233) @@ -339,10 +339,9 @@ } -#if !defined(HAS_ATEXIT) && !defined(HAS_ON_EXIT) +#if !defined(HAS_ATEXIT) /* --------------------------------------------------------------------------- - * some local identifiers for OS without an atexit() or on_exit() - * call + * some local identifiers for OS without an atexit() call */ static char *TMPFilename = NULL; #endif @@ -713,7 +712,7 @@ free(filename); } -#if !defined(HAS_ATEXIT) && !defined(HAS_ON_EXIT) +#if !defined(HAS_ATEXIT) /* --------------------------------------------------------------------------- * makes a temporary copy of the data. This is useful for systems which * doesn't support calling functions on exit. We use this to save the data Index: trunk/src/plug_io.h =================================================================== --- trunk/src/plug_io.h (revision 2232) +++ trunk/src/plug_io.h (revision 2233) @@ -98,12 +98,8 @@ int WritePipe(char *, bool, const char *fmt); #ifndef HAS_ATEXIT -#ifdef HAS_ON_EXIT -void GlueEmergencySave(int, caddr_t); -#else void SaveTMPData(void); void RemoveTMPData(void); #endif -#endif #endif Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 2232) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 2233) @@ -2412,7 +2412,7 @@ CreateBeLenient (true); -#if !defined(HAS_ATEXIT) && !defined(HAS_ON_EXIT) +#if !defined(HAS_ATEXIT) if (PCB && PCB->Data) SaveTMPData(); returncode = yyparse(); Index: trunk/src_plugins/io_pcb/parse_l.l =================================================================== --- trunk/src_plugins/io_pcb/parse_l.l (revision 2232) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 2233) @@ -293,7 +293,7 @@ CreateBeLenient (true); -#if !defined(HAS_ATEXIT) && !defined(HAS_ON_EXIT) +#if !defined(HAS_ATEXIT) if (PCB && PCB->Data) SaveTMPData(); returncode = yyparse();