summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xConfigure55
-rw-r--r--Cross/config.sh-arm-linux2
-rw-r--r--Cross/config.sh-arm-linux-n7702
-rw-r--r--NetWare/config.wc2
-rw-r--r--NetWare/config_H.wc12
-rw-r--r--Porting/Glossary10
-rw-r--r--Porting/config.sh2
-rw-r--r--Porting/config_H12
-rwxr-xr-xconfig_h.SH12
-rw-r--r--configure.com2
-rw-r--r--perl.h26
-rw-r--r--plan9/config.plan912
-rw-r--r--plan9/config_h.sample12
-rw-r--r--plan9/config_sh.sample2
-rw-r--r--symbian/config.sh2
-rw-r--r--uconfig.h16
-rw-r--r--uconfig.sh2
-rw-r--r--uconfig64.sh2
-rw-r--r--win32/config.ce2
-rw-r--r--win32/config.gc2
-rw-r--r--win32/config.vc2
-rw-r--r--win32/config_H.ce12
-rw-r--r--win32/config_H.gc12
-rw-r--r--win32/config_H.vc12
24 files changed, 18 insertions, 209 deletions
diff --git a/Configure b/Configure
index 46da540bc2..d0fd0cf9ae 100755
--- a/Configure
+++ b/Configure
@@ -856,8 +856,6 @@ stdio_cnt=''
stdio_filbuf=''
stdio_ptr=''
d_strcoll=''
-d_strerrm=''
-d_strerror=''
d_sysernlst=''
d_syserrlst=''
d_strerror_l=''
@@ -18729,45 +18727,6 @@ esac
set strcoll d_strcoll
eval $inlibc
-: see if strerror and/or sys_errlist[] exist
-echo " "
-if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then
- if set strerror val -f d_strerror; eval $csym; $val; then
- echo 'strerror() found.' >&4
- d_strerror="$define"
- d_strerrm='strerror(e)'
- if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
- echo "(You also have sys_errlist[], so we could roll our own strerror.)"
- d_syserrlst="$define"
- else
- echo "(Since you don't have sys_errlist[], strerror() is welcome.)"
- d_syserrlst="$undef"
- fi
- elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
- $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
- echo 'strerror() found in string header.' >&4
- d_strerror="$define"
- d_strerrm='strerror(e)'
- if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
- echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
- d_syserrlst="$define"
- else
- echo "(You don't appear to have any sys_errlist[], how can this be?)"
- d_syserrlst="$undef"
- fi
- elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
- echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
- d_strerror="$undef"
- d_syserrlst="$define"
- d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])'
- else
- echo 'strerror() and sys_errlist[] NOT found.' >&4
- d_strerror="$undef"
- d_syserrlst="$undef"
- d_strerrm='"unknown"'
- fi
-fi
-
: see if strerror_l exists
set strerror_l d_strerror_l
eval $inlibc
@@ -19129,6 +19088,18 @@ eval $hasproto
set sysconf d_sysconf
eval $inlibc
+: see if sys_errlist[] exists
+echo " "
+if test "X$d_syserrlst" = X; then
+ if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
+ echo "You have sys_errlist[], so we could roll our own strerror."
+ d_syserrlst="$define"
+ else
+ echo "You don't have sys_errlist[], so strerror() is welcome."
+ d_syserrlst="$undef"
+ fi
+fi
+
: see if system exists
set system d_system
eval $inlibc
@@ -24298,8 +24269,6 @@ d_stdio_stream_array='$d_stdio_stream_array'
d_stdiobase='$d_stdiobase'
d_stdstdio='$d_stdstdio'
d_strcoll='$d_strcoll'
-d_strerrm='$d_strerrm'
-d_strerror='$d_strerror'
d_strerror_l='$d_strerror_l'
d_strerror_r='$d_strerror_r'
d_strftime='$d_strftime'
diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux
index 935b64e449..c172f93c04 100644
--- a/Cross/config.sh-arm-linux
+++ b/Cross/config.sh-arm-linux
@@ -557,8 +557,6 @@ d_stdiobase='define'
d_stdstdio='define'
d_strchr='define'
d_strcoll='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
d_strerror_l='undef'
d_strerror_r='undef'
d_strftime='define'
diff --git a/Cross/config.sh-arm-linux-n770 b/Cross/config.sh-arm-linux-n770
index 4f135aee7a..27f29019f4 100644
--- a/Cross/config.sh-arm-linux-n770
+++ b/Cross/config.sh-arm-linux-n770
@@ -438,8 +438,6 @@ d_stdiobase='define'
d_stdstdio='define'
d_strchr='define'
d_strcoll='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
d_strerror_r='undef'
d_strftime='define'
d_strlcat='undef'
diff --git a/NetWare/config.wc b/NetWare/config.wc
index 35f3d8d5f9..333bb887e1 100644
--- a/NetWare/config.wc
+++ b/NetWare/config.wc
@@ -547,8 +547,6 @@ d_stdiobase='undef'
d_stdstdio='undef'
d_strchr='define'
d_strcoll='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
d_strerror_l='undef'
d_strerror_r='undef'
d_strftime='define'
diff --git a/NetWare/config_H.wc b/NetWare/config_H.wc
index 3a4eda6830..294906135d 100644
--- a/NetWare/config_H.wc
+++ b/NetWare/config_H.wc
@@ -1984,24 +1984,12 @@
#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
#endif
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
/* HAS_SYS_ERRLIST:
* This symbol, if defined, indicates that the sys_errlist array is
* available to translate error numbers to strings. The extern int
* sys_nerr gives the size of that table.
*/
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-#define HAS_STRERROR /**/
#define HAS_SYS_ERRLIST /**/
-#define Strerror(e) strerror(e)
/* HAS_STRTOLD:
* This symbol, if defined, indicates that the strtold routine is
diff --git a/Porting/Glossary b/Porting/Glossary
index 5aaa2bbc0a..27078ed4ba 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -2552,16 +2552,6 @@ d_strcoll (d_strcoll.U):
This variable conditionally defines HAS_STRCOLL if strcoll() is
available to compare strings using collating information.
-d_strerrm (d_strerror.U):
- This variable holds what Strerror is defined as to translate an error
- code condition into an error message string. It could be 'strerror'
- or a more complex macro emulating strerror with sys_errlist[], or the
- "unknown" string when both strerror and sys_errlist are missing.
-
-d_strerror (d_strerror.U):
- This variable conditionally defines HAS_STRERROR if strerror() is
- available to translate error numbers to strings.
-
d_strerror_l (d_strerror_l.U):
This variable conditionally defines the HAS_STRERROR_L symbol, which
indicates to the C program that the strerror_l() routine is available
diff --git a/Porting/config.sh b/Porting/config.sh
index 7f9a7b34ab..1187213b3e 100644
--- a/Porting/config.sh
+++ b/Porting/config.sh
@@ -570,8 +570,6 @@ d_stdiobase='define'
d_stdstdio='define'
d_strchr='define'
d_strcoll='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
d_strerror_l='undef'
d_strerror_r='undef'
d_strftime='define'
diff --git a/Porting/config_H b/Porting/config_H
index 98d23c18f0..ac4c541b64 100644
--- a/Porting/config_H
+++ b/Porting/config_H
@@ -2592,24 +2592,12 @@
#define USE_STAT_BLOCKS /**/
#endif
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
/* HAS_SYS_ERRLIST:
* This symbol, if defined, indicates that the sys_errlist array is
* available to translate error numbers to strings. The extern int
* sys_nerr gives the size of that table.
*/
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-#define HAS_STRERROR /**/
#define HAS_SYS_ERRLIST /**/
-#define Strerror(e) strerror(e)
/* HAS_STRTOUL:
* This symbol, if defined, indicates that the strtoul routine is
diff --git a/config_h.SH b/config_h.SH
index b1b9c8c6c9..a774644c3c 100755
--- a/config_h.SH
+++ b/config_h.SH
@@ -2012,24 +2012,12 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
#$d_statblks USE_STAT_BLOCKS /**/
#endif
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
/* HAS_SYS_ERRLIST:
* This symbol, if defined, indicates that the sys_errlist array is
* available to translate error numbers to strings. The extern int
* sys_nerr gives the size of that table.
*/
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-#$d_strerror HAS_STRERROR /**/
#$d_syserrlst HAS_SYS_ERRLIST /**/
-#define Strerror(e) $d_strerrm
/* HAS_STRTOUL:
* This symbol, if defined, indicates that the strtoul routine is
diff --git a/configure.com b/configure.com
index 75ffbd0653..137b06d902 100644
--- a/configure.com
+++ b/configure.com
@@ -6397,8 +6397,6 @@ $ WC "d_faststdio='" + d_faststdio + "'"
$ WC "d_statvfs='" + d_statvfs + "'"
$ WC "d_strchr='define'"
$ WC "d_strcoll='" + d_strcoll + "'"
-$ WC "d_strerrm='strerror((e),vaxc$errno)'"
-$ WC "d_strerror='define'"
$ WC "d_strftime='define'"
$ WC "d_strlcat='undef'"
$ WC "d_strlcpy='undef'"
diff --git a/perl.h b/perl.h
index 358da90098..024b534289 100644
--- a/perl.h
+++ b/perl.h
@@ -1028,10 +1028,6 @@ EXTERN_C int usleep(unsigned int);
# include <sys/times.h>
#endif
-#if defined(HAS_STRERROR) && (!defined(HAS_MKDIR) || !defined(HAS_RMDIR))
-# undef HAS_STRERROR
-#endif
-
#include <errno.h>
#if defined(WIN32) && defined(PERL_IMPLICIT_SYS)
@@ -1214,24 +1210,10 @@ EXTERN_C char *crypt(const char *, const char *);
#define UNKNOWN_ERRNO_MSG "(unknown)"
-#ifdef HAS_STRERROR
-# ifndef DONT_DECLARE_STD
-# ifdef VMS
- char *strerror (int,...);
-# else
- char *strerror (int);
-# endif
-# endif
-# ifndef Strerror
-# define Strerror strerror
-# endif
-#elif defined(HAS_SYS_ERRLIST)
- extern int sys_nerr;
- extern char *sys_errlist[];
-# ifndef Strerror
-# define Strerror(e) \
- ((e) < 0 || (e) >= sys_nerr ? UNKNOWN_ERRNO_MSG : sys_errlist[e])
-# endif
+#if VMS
+#define Strerror(e) strerror((e), vaxc$errno)
+#else
+#define Strerror(e) strerror(e)
#endif
#ifdef I_SYS_IOCTL
diff --git a/plan9/config.plan9 b/plan9/config.plan9
index 3ad7cc76f2..704a96d56e 100644
--- a/plan9/config.plan9
+++ b/plan9/config.plan9
@@ -2375,24 +2375,12 @@
#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
#endif
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
/* HAS_SYS_ERRLIST:
* This symbol, if defined, indicates that the sys_errlist array is
* available to translate error numbers to strings. The extern int
* sys_nerr gives the size of that table.
*/
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-#define HAS_STRERROR /**/
#define HAS_SYS_ERRLIST /**/
-#define Strerror(e) strerror(e)
/* HAS_STRERROR_R:
* This symbol, if defined, indicates that the strerror_r routine
diff --git a/plan9/config_h.sample b/plan9/config_h.sample
index 0bccc9fc06..2759f372a7 100644
--- a/plan9/config_h.sample
+++ b/plan9/config_h.sample
@@ -2307,24 +2307,12 @@
#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
#endif
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
/* HAS_SYS_ERRLIST:
* This symbol, if defined, indicates that the sys_errlist array is
* available to translate error numbers to strings. The extern int
* sys_nerr gives the size of that table.
*/
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-#define HAS_STRERROR /**/
#define HAS_SYS_ERRLIST /**/
-#define Strerror(e) strerror(e)
/* HAS_STRERROR_R:
* This symbol, if defined, indicates that the strerror_r routine
diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample
index 0055e3dcd8..2d30cf162d 100644
--- a/plan9/config_sh.sample
+++ b/plan9/config_sh.sample
@@ -557,8 +557,6 @@ d_stdiobase='undef'
d_stdstdio='undef'
d_strchr='define'
d_strcoll='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
d_strerror_l='undef'
d_strerror_r='undef'
d_strftime='define'
diff --git a/symbian/config.sh b/symbian/config.sh
index c0976f946b..ce2c56eaae 100644
--- a/symbian/config.sh
+++ b/symbian/config.sh
@@ -506,8 +506,6 @@ d_stdiobase='undef'
d_stdstdio='undef'
d_strchr='define'
d_strcoll='undef'
-d_strerrm='strerror(e)'
-d_strerror='define'
d_strerror_l='undef'
d_strerror_r='undef'
d_strftime='undef'
diff --git a/uconfig.h b/uconfig.h
index 34664a02ea..09a7f10d7c 100644
--- a/uconfig.h
+++ b/uconfig.h
@@ -1977,24 +1977,12 @@
/*#define USE_STAT_BLOCKS / **/
#endif
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
/* HAS_SYS_ERRLIST:
* This symbol, if defined, indicates that the sys_errlist array is
* available to translate error numbers to strings. The extern int
* sys_nerr gives the size of that table.
*/
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-/*#define HAS_STRERROR / **/
/*#define HAS_SYS_ERRLIST / **/
-#define Strerror(e) strerror(e)
/* HAS_STRTOUL:
* This symbol, if defined, indicates that the strtoul routine is
@@ -5219,6 +5207,6 @@
#endif
/* Generated from:
- * e81265de883a5cc39311fc0d3a54c848f4222c64f8b0f805900f87d6cbf1c244 config_h.SH
- * faa4a2944bbf58412d06721da4266607432d610d9d2099beebd9c08eabdea983 uconfig.sh
+ * fde6b587c10bf240fba012827a4814925eb06869ee98bdba652e94b6c77e16e2 config_h.SH
+ * 31e7d5c0dd56393cf400a70fb22e332e63a472cb46a601b3903b54d2ece44df0 uconfig.sh
* ex: set ro: */
diff --git a/uconfig.sh b/uconfig.sh
index 7b44d8e298..5dde050d20 100644
--- a/uconfig.sh
+++ b/uconfig.sh
@@ -497,8 +497,6 @@ d_stdiobase='undef'
d_stdstdio='undef'
d_strchr='undef'
d_strcoll='undef'
-d_strerrm='strerror(e)'
-d_strerror='undef'
d_strerror_l='undef'
d_strerror_r='undef'
d_strftime='undef'
diff --git a/uconfig64.sh b/uconfig64.sh
index 6ddb6c962e..b36d71edfe 100644
--- a/uconfig64.sh
+++ b/uconfig64.sh
@@ -497,8 +497,6 @@ d_stdiobase='undef'
d_stdstdio='undef'
d_strchr='undef'
d_strcoll='undef'
-d_strerrm='strerror(e)'
-d_strerror='undef'
d_strerror_l='undef'
d_strerror_r='undef'
d_strftime='undef'
diff --git a/win32/config.ce b/win32/config.ce
index e706b24742..c9711a48e0 100644
--- a/win32/config.ce
+++ b/win32/config.ce
@@ -545,8 +545,6 @@ d_stdiobase='undef'
d_stdstdio='undef'
d_strchr='define'
d_strcoll='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
d_strerror_l='undef'
d_strerror_r='undef'
d_strftime='undef'
diff --git a/win32/config.gc b/win32/config.gc
index 4681f29d91..c62ffcf73d 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -546,8 +546,6 @@ d_stdiobase='define'
d_stdstdio='define'
d_strchr='define'
d_strcoll='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
d_strerror_l='undef'
d_strerror_r='undef'
d_strftime='define'
diff --git a/win32/config.vc b/win32/config.vc
index efaec8df88..0b0148c7e7 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -545,8 +545,6 @@ d_stdiobase='define'
d_stdstdio='define'
d_strchr='define'
d_strcoll='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
d_strerror_l='undef'
d_strerror_r='undef'
d_strftime='define'
diff --git a/win32/config_H.ce b/win32/config_H.ce
index f61e9b4639..9a06c82696 100644
--- a/win32/config_H.ce
+++ b/win32/config_H.ce
@@ -2330,24 +2330,12 @@
#define FILE_bufsiz(fp)
#endif
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
/* HAS_SYS_ERRLIST:
* This symbol, if defined, indicates that the sys_errlist array is
* available to translate error numbers to strings. The extern int
* sys_nerr gives the size of that table.
*/
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-#define HAS_STRERROR /**/
#define HAS_SYS_ERRLIST /**/
-#define Strerror(e) strerror(e)
/* HAS_STRERROR_R:
* This symbol, if defined, indicates that the strerror_r routine
diff --git a/win32/config_H.gc b/win32/config_H.gc
index e0bfcfda00..dd7ea58972 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -1986,24 +1986,12 @@
/*#define USE_STAT_BLOCKS / **/
#endif
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
/* HAS_SYS_ERRLIST:
* This symbol, if defined, indicates that the sys_errlist array is
* available to translate error numbers to strings. The extern int
* sys_nerr gives the size of that table.
*/
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-#define HAS_STRERROR /**/
#define HAS_SYS_ERRLIST /**/
-#define Strerror(e) strerror(e)
/* HAS_STRTOUL:
* This symbol, if defined, indicates that the strtoul routine is
diff --git a/win32/config_H.vc b/win32/config_H.vc
index 1d1aacdb93..664dda3238 100644
--- a/win32/config_H.vc
+++ b/win32/config_H.vc
@@ -1977,24 +1977,12 @@
/*#define USE_STAT_BLOCKS / **/
#endif
-/* HAS_STRERROR:
- * This symbol, if defined, indicates that the strerror routine is
- * available to translate error numbers to strings. See the writeup
- * of Strerror() in this file before you try to define your own.
- */
/* HAS_SYS_ERRLIST:
* This symbol, if defined, indicates that the sys_errlist array is
* available to translate error numbers to strings. The extern int
* sys_nerr gives the size of that table.
*/
-/* Strerror:
- * This preprocessor symbol is defined as a macro if strerror() is
- * not available to translate error numbers to strings but sys_errlist[]
- * array is there.
- */
-#define HAS_STRERROR /**/
#define HAS_SYS_ERRLIST /**/
-#define Strerror(e) strerror(e)
/* HAS_STRTOUL:
* This symbol, if defined, indicates that the strtoul routine is