From 6cd5dccd5ecef2d9cefce8c61c7a83fe6b1a0c76 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Sun, 28 Jun 1998 06:09:57 +0000 Subject: 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 --- gcc/cccp.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'gcc/cccp.c') diff --git a/gcc/cccp.c b/gcc/cccp.c index 59799de..d717009 100644 --- a/gcc/cccp.c +++ b/gcc/cccp.c @@ -138,16 +138,6 @@ static int hack_vms_include_specification (); extern char *version_string; extern char *update_path PROTO((char *, char *)); -#ifndef VMS -#ifndef HAVE_STRERROR -extern int sys_nerr; -extern char *sys_errlist[]; -#else /* HAVE_STRERROR */ -char *strerror (); -#endif -#else /* VMS */ -char *strerror (int,...); -#endif HOST_WIDE_INT parse_escape PROTO((char **, HOST_WIDE_INT)); HOST_WIDE_INT parse_c_expression PROTO((char *, int)); @@ -1003,7 +993,7 @@ static int discard_comments PROTO((U_CHAR *, int, int)); static int change_newlines PROTO((U_CHAR *, int)); -char *my_strerror PROTO((int)); +static char *my_strerror PROTO((int)); void error PRINTF_PROTO_1((char *, ...)); static void verror PROTO((char *, va_list)); static void error_from_errno PROTO((char *)); @@ -8873,7 +8863,7 @@ change_newlines (start, length) /* my_strerror - return the descriptive text associated with an `errno' code. */ -char * +static char * my_strerror (errnum) int errnum; { -- cgit v1.1