Otherwise provide a declaration for atexit.
(init_dummy): Make sure dummy call to atexit is nevertheless
called with correct number of args.
* frame.c: Update comments referring to other files.
* libgcc2.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31124
138bc75d-0d04-0410-961f-
82ee72b054a4
1999-12-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+ * crtstuff.c: If !inhibit_libc, include stdlib.h/unistd.h.
+ Otherwise provide a declaration for atexit.
+ (init_dummy): Make sure dummy call to atexit is nevertheless
+ called with correct number of args.
+
+ * frame.c: Update comments referring to other files.
+
+ * libgcc2.c: Likewise.
+
+1999-12-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
* cse.c (free_element, get_element): Remove unused prototypes.
* fold-const.c (extract_muldiv): Initialize variables `op0' and
do not apply. */
#include "tm.h"
+
+/* We disable this when inhibit_libc, so that gcc can still be built without
+ needing header files first. */
+/* ??? This is not a good solution, since prototypes may be required in
+ some cases for correct code. See also libgcc2.c/frame.c. */
+#ifndef inhibit_libc
+/* fixproto guarantees these system headers exist. */
+#include <stdlib.h>
+#include <unistd.h>
+#else
+# ifndef atexit
+extern int atexit(void (*)(void));
+# endif
+#endif
+
#include "defaults.h"
#include <stddef.h>
#include "frame.h"
extern char **__environ;
___brk_addr = __environ;
- atexit ();
+ atexit (0);
}
#endif
}
/* We disable this when inhibit_libc, so that gcc can still be built without
needing header files first. */
/* ??? This is not a good solution, since prototypes may be required in
- some cases for correct code. See also libgcc2.c. */
+ some cases for correct code. See also libgcc2.c/crtstuff.c. */
#ifndef inhibit_libc
/* fixproto guarantees these system headers exist. */
#include <stdlib.h>
/* We disable this when inhibit_libc, so that gcc can still be built without
needing header files first. */
/* ??? This is not a good solution, since prototypes may be required in
- some cases for correct code. See also frame.c. */
+ some cases for correct code. See also frame.c/crtstuff.c. */
#ifndef inhibit_libc
/* fixproto guarantees these system headers exist. */
#include <stdlib.h>