diff options
author | Dan Albert <danalbert@google.com> | 2015-06-17 11:09:54 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2015-06-17 14:15:22 -0700 |
commit | f378ebf14df0952eae870c9865bab8326aa8f137 (patch) | |
tree | 31794503eb2a8c64ea5f313b93100f1163afcffb /gcc-4.7/libiberty/xstrerror.c | |
parent | 2c58169824949d3a597d9fa81931e001ef9b1bd0 (diff) | |
download | toolchain_gcc-f378ebf14df0952eae870c9865bab8326aa8f137.tar.gz toolchain_gcc-f378ebf14df0952eae870c9865bab8326aa8f137.tar.bz2 toolchain_gcc-f378ebf14df0952eae870c9865bab8326aa8f137.zip |
Delete old versions of GCC.
Change-Id: I710f125d905290e1024cbd67f48299861790c66c
Diffstat (limited to 'gcc-4.7/libiberty/xstrerror.c')
-rw-r--r-- | gcc-4.7/libiberty/xstrerror.c | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/gcc-4.7/libiberty/xstrerror.c b/gcc-4.7/libiberty/xstrerror.c deleted file mode 100644 index 2ea2200e9..000000000 --- a/gcc-4.7/libiberty/xstrerror.c +++ /dev/null @@ -1,79 +0,0 @@ -/* xstrerror.c -- jacket routine for more robust strerror() usage. - Fri Jun 16 18:30:00 1995 Pat Rankin <rankin@eql.caltech.edu> - This code is in the public domain. */ - -/* - -@deftypefn Replacement char* xstrerror (int @var{errnum}) - -Behaves exactly like the standard @code{strerror} function, but -will never return a @code{NULL} pointer. - -@end deftypefn - -*/ - -#include <stdio.h> - -#include "config.h" -#include "libiberty.h" - -#ifdef VMS -# include <errno.h> -# if !defined (__STRICT_ANSI__) && !defined (__HIDE_FORBIDDEN_NAMES) -# ifdef __cplusplus -extern "C" { -# endif /* __cplusplus */ -extern char *strerror (int,...); -# define DONT_DECLARE_STRERROR -# ifdef __cplusplus -} -# endif /* __cplusplus */ -# endif -#endif /* VMS */ - - -#ifndef DONT_DECLARE_STRERROR -# ifdef __cplusplus -extern "C" { -# endif /* __cplusplus */ -extern char *strerror (int); -# ifdef __cplusplus -} -# endif /* __cplusplus */ -#endif - -/* If strerror returns NULL, we'll format the number into a static buffer. */ - -#define ERRSTR_FMT "undocumented error #%d" -static char xstrerror_buf[sizeof ERRSTR_FMT + 20]; - -/* Like strerror, but result is never a null pointer. */ - -char * -xstrerror (int errnum) -{ - char *errstr; -#ifdef VMS - char *(*vmslib_strerror) (int,...); - - /* Override any possibly-conflicting declaration from system header. */ - vmslib_strerror = (char *(*) (int,...)) strerror; - /* Second argument matters iff first is EVMSERR, but it's simpler to - pass it unconditionally. `vaxc$errno' is declared in <errno.h> - and maintained by the run-time library in parallel to `errno'. - We assume that `errnum' corresponds to the last value assigned to - errno by the run-time library, hence vaxc$errno will be relevant. */ - errstr = (*vmslib_strerror) (errnum, vaxc$errno); -#else - errstr = strerror (errnum); -#endif - - /* If `errnum' is out of range, result might be NULL. We'll fix that. */ - if (!errstr) - { - sprintf (xstrerror_buf, ERRSTR_FMT, errnum); - errstr = xstrerror_buf; - } - return errstr; -} |