diff options
author | Paul Smith <psmith@gnu.org> | 2019-07-13 08:34:45 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2019-07-13 08:47:19 -0400 |
commit | 4d00ceba264a9fd04241dcd2685526ce64c1346b (patch) | |
tree | 0b2c589a9860bdca6adb15f3f4d24b34d2bd8825 | |
parent | 1c045bca5270f74baf0cecc665391220373267c1 (diff) | |
download | make-git-4d00ceba264a9fd04241dcd2685526ce64c1346b.tar.gz |
Switch to the gnulib version of strerror()
* bootstrap.conf: Add strerror module
* configure.ac: Remove strerror check
* src/misc.c: Remove local strerror() implementation
* src/config.ami.template: Remove HAVE_STRERROR
* src/config.h-vms.template: Ditto.
* src/config.h.W32.template: Ditto.
-rw-r--r-- | bootstrap.conf | 1 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/config.ami.template | 3 | ||||
-rw-r--r-- | src/config.h-vms.template | 3 | ||||
-rw-r--r-- | src/config.h.W32.template | 3 | ||||
-rw-r--r-- | src/misc.c | 20 |
6 files changed, 2 insertions, 30 deletions
diff --git a/bootstrap.conf b/bootstrap.conf index 23f803bb..8265660c 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -48,4 +48,5 @@ alloca fdl getloadavg host-cpu-c-abi +strerror make-glob" diff --git a/configure.ac b/configure.ac index de61ed90..f6919a77 100644 --- a/configure.ac +++ b/configure.ac @@ -141,7 +141,7 @@ AS_IF([test "$ac_cv_func_gettimeofday" = yes], AC_CHECK_FUNCS([strdup strndup umask mkstemp mktemp fdopen \ dup dup2 getcwd realpath sigsetmask sigaction \ getgroups seteuid setegid setlinebuf setreuid setregid \ - getrlimit setrlimit setvbuf pipe strerror strsignal \ + getrlimit setrlimit setvbuf pipe strsignal \ lstat readlink atexit isatty ttyname pselect posix_spawn \ posix_spawnattr_setsigmask]) diff --git a/src/config.ami.template b/src/config.ami.template index fcc1dad2..647c7fd4 100644 --- a/src/config.ami.template +++ b/src/config.ami.template @@ -258,9 +258,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */ /* Define to 1 if you have the stricmp function. */ /* #undef HAVE_STRICMP */ -/* Define if you have the strerror function. */ -#define HAVE_STRERROR 1 - /* Define if you have the strsignal function. */ /* #undef HAVE_STRSIGNAL */ diff --git a/src/config.h-vms.template b/src/config.h-vms.template index 9b90faa2..f957b256 100644 --- a/src/config.h-vms.template +++ b/src/config.h-vms.template @@ -298,9 +298,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */ /* Define to 1 if you have the stricmp function. */ /* #undef HAVE_STRICMP */ -/* Define to 1 if you have the strerror function. */ -#define HAVE_STRERROR 1 - /* Define to 1 if you have the strsignal function. */ /* #undef HAVE_STRSIGNAL */ diff --git a/src/config.h.W32.template b/src/config.h.W32.template index 991f0410..b6463b20 100644 --- a/src/config.h.W32.template +++ b/src/config.h.W32.template @@ -261,9 +261,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */ /* Define to 1 if you have the 'strdup' function. */ #define HAVE_STRDUP 1 -/* Define to 1 if you have the 'strerror' function. */ -#define HAVE_STRERROR 1 - /* Define to 1 if you have the 'stricmp' function. */ #define HAVE_STRICMP 1 @@ -172,26 +172,6 @@ concat (unsigned int num, ...) return result; } - -#ifndef HAVE_STRERROR -#undef strerror -char * -strerror (int errnum) -{ - extern int errno, sys_nerr; -#ifndef __DECC - extern char *sys_errlist[]; -#endif - static char buf[] = "Unknown error 12345678901234567890"; - - if (errno < sys_nerr) - return sys_errlist[errnum]; - - sprintf (buf, _("Unknown error %d"), errnum); - return buf; -} -#endif - /* Like malloc but get fatal error if memory is exhausted. */ /* Don't bother if we're using dmalloc; it provides these for us. */ |