summaryrefslogtreecommitdiff
path: root/gcc/cpperror.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-27 00:10:15 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-27 00:10:15 +0000
commit581137123bdfa322c7fff571b4f903648a4f8125 (patch)
tree63b2be32f6dd38bcf17d841c48e044c5c31d50cb /gcc/cpperror.c
parentd4800e6e121978b5a68ab8fca5a5667226a137cb (diff)
downloadgcc-581137123bdfa322c7fff571b4f903648a4f8125.tar.gz
* Makefile.in (STMP_FIXINC): New toggle.
(LIBGCC2_DEPS): Delete all references. (stmp-headers): Delete target. All references either deleted or changed to stmp-int-headers. (all.cross): Don't depend on stmp-headers or STMP_FIXPROTO. (LIBCPP_OBJS): Take out cppalloc.o. (cppalloc.o): Delete target. (stmp-int-hdrs): Depend on $(STMP_FIXINC). (gen-protos, fix-header): Link with libiberty.a. * build-make: Don't change FIXINCLUDES. Override STMP_FIXINC to empty. * cp/Make-lang.in: Delete refs to LIBGCC2_DEPS. * configure.in: Remove refs to strerror. * acconfig.h: Take out NEED_DECLARATION_STRERROR. * system.h: Take out strerror stanza. * cpperror.c (my_strerror): Delete function. (cpp_error_from_errno, cpp_notice_from_errno): Use xstrerror. * cppmain.c (main): Call xmalloc_set_program_name first thing. * cppalloc.c: Delete file. * gen-protos.c: Don't provide xrealloc. * fixinc/fixincl.c, fixinc/fixlib.c, fixinc/procopen.c: Use xstrerror throughout. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32200 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpperror.c')
-rw-r--r--gcc/cpperror.c38
1 files changed, 2 insertions, 36 deletions
diff --git a/gcc/cpperror.c b/gcc/cpperror.c
index 0e1470af77b..b72740ce70d 100644
--- a/gcc/cpperror.c
+++ b/gcc/cpperror.c
@@ -28,46 +28,12 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "cpplib.h"
#include "intl.h"
-static const char *my_strerror PARAMS ((int));
static void cpp_print_containing_files PARAMS ((cpp_reader *, cpp_buffer *));
static void cpp_print_file_and_line PARAMS ((const char *, long, long));
static void v_cpp_message PARAMS ((cpp_reader *, int,
const char *, long, long,
const char *, va_list));
-/* my_strerror - return the descriptive text associated with an
- `errno' code.
- XXX - link with libiberty so we can use its strerror(). */
-
-static const char *
-my_strerror (errnum)
- int errnum;
-{
- const char *result;
-
-#ifndef VMS
-#ifndef HAVE_STRERROR
- result = (char *) ((errnum < sys_nerr) ? sys_errlist[errnum] : 0);
-#else
- result = strerror (errnum);
-#endif
-#else /* VMS */
- /* VAXCRTL's strerror() takes an optional second argument, which only
- matters when the first argument is EVMSERR. However, it's simplest
- just to pass it unconditionally. `vaxc$errno' is declared in
- <errno.h>, and maintained by the library in parallel with `errno'.
- We assume that caller's `errnum' either matches the last setting of
- `errno' by the library or else does not have the value `EVMSERR'. */
-
- result = strerror (errnum, vaxc$errno);
-#endif
-
- if (!result)
- result = "errno = ?";
-
- return result;
-}
-
/* Print the file names and line numbers of the #include
commands which led to the current file. */
@@ -294,7 +260,7 @@ cpp_error_from_errno (pfile, name)
cpp_reader *pfile;
const char *name;
{
- cpp_error (pfile, "%s: %s", name, my_strerror (errno));
+ cpp_error (pfile, "%s: %s", name, xstrerror (errno));
}
void
@@ -473,5 +439,5 @@ cpp_notice_from_errno (pfile, name)
cpp_reader *pfile;
const char *name;
{
- cpp_notice (pfile, "%s: %s", name, my_strerror (errno));
+ cpp_notice (pfile, "%s: %s", name, xstrerror (errno));
}