]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Switch to the gnulib version of strerror()
authorPaul Smith <psmith@gnu.org>
Sat, 13 Jul 2019 12:34:45 +0000 (08:34 -0400)
committerPaul Smith <psmith@gnu.org>
Sat, 13 Jul 2019 12:47:19 +0000 (08:47 -0400)
* 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.

bootstrap.conf
configure.ac
src/config.ami.template
src/config.h-vms.template
src/config.h.W32.template
src/misc.c

index 23f803bb57b02661a7c35f398010b2312f97557f..8265660cb2d5024655f59f34077b43bcf870374f 100644 (file)
@@ -48,4 +48,5 @@ alloca
 fdl
 getloadavg
 host-cpu-c-abi
+strerror
 make-glob"
index de61ed904b3b47f70c079cf911a9e625a0080734..f6919a77a361afc135d4a6ed2121ce034aa71efd 100644 (file)
@@ -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])
 
index fcc1dad24fb91f677aa5c2f6865ae5ba4aec7d87..647c7fd4b164e1c4fbaf6bfe9c6d80687d1faeee 100644 (file)
@@ -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 */
 
index 9b90faa2bd72bd61c41d1bfa57f81f83625982ab..f957b256f31d84faf397793545610df94267a93c 100644 (file)
@@ -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 */
 
index 991f041033d769d8df085bbf63ffd6b3e126d037..b6463b20b44e2ecba257641225f02b1655d8dff0 100644 (file)
@@ -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
 
index ff23d482af99f6f6a90da3f57aa8999e2f9d96b0..7a1b9d9c242ed9bdcb1607543cb6d88bae998b63 100644 (file)
@@ -172,26 +172,6 @@ concat (unsigned int num, ...)
   return result;
 }
 \f
-
-#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
-\f
 /* Like malloc but get fatal error if memory is exhausted.  */
 /* Don't bother if we're using dmalloc; it provides these for us.  */