diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1998-06-28 06:09:57 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1998-06-28 06:09:57 +0000 |
commit | 6cd5dccd5ecef2d9cefce8c61c7a83fe6b1a0c76 (patch) | |
tree | 6f091a195512741bb4eb68f404e752087fb5691e /gcc/system.h | |
parent | 984e3c38b51824e200729c1a8d4a87800d654fe6 (diff) | |
download | gcc-6cd5dccd5ecef2d9cefce8c61c7a83fe6b1a0c76.zip gcc-6cd5dccd5ecef2d9cefce8c61c7a83fe6b1a0c76.tar.gz gcc-6cd5dccd5ecef2d9cefce8c61c7a83fe6b1a0c76.tar.bz2 |
Consolidate strerror handling, as well as getcwd/getwd.
* configure.in (GCC_NEED_DECLARATIONS): Add strerror, getcwd and
getwd.
* acconfig.m4: Add stubs for NEED_DECLARATION_STRERROR,
NEED_DECLARATION_GETCWD and NEED_DECLARATION_GETWD.
* cccp.c: Remove strerror()/sys_nerr/sys_errlist decls.
(my_strerror): Add prototype and make it static.
* collect2.c: Likewise.
* cpplib.c: Likewise.
* gcc.c: Likewise, but keep `my_strerror' extern.
* protoize.c: Likewise.
* pexecute.c (my_strerror): Add argument to prototype.
* system.h: Add prototypes for getcwd, getwd and strerror. Add
extern decls for sys_nerr and sys_errlist. Make abort decl
explicitly extern.
* getpwd.c: Remove decls for getwd and getcwd.
From-SVN: r20779
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gcc/system.h b/gcc/system.h index 402fa9f..79e1e27 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -202,14 +202,33 @@ extern long atol(); extern void free (); #endif +#ifdef NEED_DECLARATION_GETCWD +extern char *getcwd (); +#endif + #ifdef NEED_DECLARATION_GETENV extern char *getenv (); #endif +#ifdef NEED_DECLARATION_GETWD +extern char *getwd (); +#endif + #ifdef NEED_DECLARATION_SBRK extern char *sbrk (); #endif +#ifdef HAVE_STRERROR +# ifdef NEED_DECLARATION_STRERROR +# ifndef strerror +extern char *strerror (); +# endif +# endif +#else /* ! HAVE_STRERROR */ +extern int sys_nerr; +extern char *sys_errlist[]; +#endif /* HAVE_STRERROR */ + /* HAVE_VOLATILE only refers to the stage1 compiler. We also check __STDC__ and assume gcc sets it and has volatile in stage >=2. */ #if !defined(HAVE_VOLATILE) && !defined(__STDC__) && !defined(volatile) @@ -229,7 +248,7 @@ extern char *sbrk (); #ifdef USE_SYSTEM_ABORT # ifdef NEED_DECLARATION_ABORT -void abort (); +extern void abort (); # endif #else #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) |