diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1999-12-29 21:22:16 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1999-12-29 21:22:16 +0000 |
commit | ec6bfc9b7ca1e855c15cc9b6875f718a5850f060 (patch) | |
tree | 95ccb57dcefe87623710608328cb7388663cc4e8 /gcc | |
parent | 9d0878fd43180c9746c7fa23954858c139059291 (diff) | |
download | gcc-ec6bfc9b7ca1e855c15cc9b6875f718a5850f060.zip gcc-ec6bfc9b7ca1e855c15cc9b6875f718a5850f060.tar.gz gcc-ec6bfc9b7ca1e855c15cc9b6875f718a5850f060.tar.bz2 |
crtstuff.c: If !inhibit_libc, include stdlib.h/unistd.h.
* 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.
From-SVN: r31124
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/crtstuff.c | 17 | ||||
-rw-r--r-- | gcc/frame.c | 2 | ||||
-rw-r--r-- | gcc/libgcc2.c | 2 |
4 files changed, 29 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b1e7814..cd1fd98 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,16 @@ 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 diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c index c0a6ae0..98e0779 100644 --- a/gcc/crtstuff.c +++ b/gcc/crtstuff.c @@ -52,6 +52,21 @@ Boston, MA 02111-1307, USA. */ 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" @@ -403,7 +418,7 @@ init_dummy (void) extern char **__environ; ___brk_addr = __environ; - atexit (); + atexit (0); } #endif } diff --git a/gcc/frame.c b/gcc/frame.c index e6f71be..697d3f4 100644 --- a/gcc/frame.c +++ b/gcc/frame.c @@ -36,7 +36,7 @@ Boston, MA 02111-1307, USA. */ /* 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> diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index 7cba424..8a1b703 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */ /* 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> |