summaryrefslogtreecommitdiff
path: root/gcc/collect2.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-06-28 06:09:57 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-06-28 06:09:57 +0000
commitccb1060c39fb90efde197a2d322c82da20dda886 (patch)
tree6f091a195512741bb4eb68f404e752087fb5691e /gcc/collect2.c
parent0e74463ec5d54a90d2f45693c436db6a49dadca5 (diff)
downloadgcc-ccb1060c39fb90efde197a2d322c82da20dda886.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20779 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r--gcc/collect2.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c
index 6c4933debe3..a766bd25834 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -39,13 +39,6 @@ Boston, MA 02111-1307, USA. */
#include <process.h>
#endif
-#ifndef HAVE_STRERROR
-extern char *sys_errlist[];
-extern int sys_nerr;
-#else
-char *strerror();
-#endif
-
/* Obstack allocation and deallocation routines. */
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
@@ -278,6 +271,7 @@ static struct path_prefix *libpaths[3] = {&cmdline_lib_dirs,
static char *libexts[3] = {"a", "so", NULL}; /* possible library extentions */
#endif
+static char *my_strerror PROTO((int));
static void handler PROTO((int));
static int is_ctor_dtor PROTO((char *));
static char *find_a_file PROTO((struct path_prefix *, char *));
@@ -336,7 +330,7 @@ dup2 (oldfd, newfd)
}
#endif
-char *
+static char *
my_strerror (e)
int e;
{