From 56741f75b6b13c1a3f8a4dfd90afdd8f91901c37 Mon Sep 17 00:00:00 2001 From: Stephane Bortzmeyer Date: Wed, 5 Nov 2003 12:29:15 +0000 Subject: [PATCH] Now uses strerror instead of sys_errlist --- SRC/acconfig.h | 6 -- SRC/acinclude.m4 | 12 --- SRC/aclocal.m4 | 12 --- SRC/config.h.in | 9 +- SRC/configure | 239 ++++++++++++++--------------------------------- SRC/configure.in | 3 +- SRC/echoping.h | 3 - SRC/error.c | 8 +- 8 files changed, 75 insertions(+), 217 deletions(-) diff --git a/SRC/acconfig.h b/SRC/acconfig.h index f3d5efe..57bf87d 100644 --- a/SRC/acconfig.h +++ b/SRC/acconfig.h @@ -15,12 +15,6 @@ /* Do we have socket priority? */ #undef HAVE_SOCKET_PRIORITY -/* Is sys_errlist declared? */ -#undef DECL_SYS_ERRLIST - -/* Is sys_nerr declared? */ -#undef DECL_SYS_NERR - /* HTTP support */ #undef HTTP diff --git a/SRC/acinclude.m4 b/SRC/acinclude.m4 index c07ab00..9b74cb2 100644 --- a/SRC/acinclude.m4 +++ b/SRC/acinclude.m4 @@ -78,18 +78,6 @@ fi CF_CHECK_EXTERN_DATA($1,int) ])dnl -dnl --------------------------------------------------------------------------- -dnl Check for declaration of sys_nerr and sys_errlist in one of stdio.h and -dnl errno.h. Declaration of sys_errlist on BSD4.4 interferes with our -dnl declaration. Reported by Keith Bostic. -AC_DEFUN([CF_SYS_ERRLIST], -[ -for cf_name in sys_nerr sys_errlist -do - CF_CHECK_ERRNO($cf_name) -done -])dnl - dnl Useful macros to check libraries which are not implicit dnl in Solaris, for instance. AC_DEFUN([CF_LIB_NSL], diff --git a/SRC/aclocal.m4 b/SRC/aclocal.m4 index 0ed71fc..2d78a54 100644 --- a/SRC/aclocal.m4 +++ b/SRC/aclocal.m4 @@ -90,18 +90,6 @@ fi CF_CHECK_EXTERN_DATA($1,int) ])dnl -dnl --------------------------------------------------------------------------- -dnl Check for declaration of sys_nerr and sys_errlist in one of stdio.h and -dnl errno.h. Declaration of sys_errlist on BSD4.4 interferes with our -dnl declaration. Reported by Keith Bostic. -AC_DEFUN([CF_SYS_ERRLIST], -[ -for cf_name in sys_nerr sys_errlist -do - CF_CHECK_ERRNO($cf_name) -done -])dnl - dnl Useful macros to check libraries which are not implicit dnl in Solaris, for instance. AC_DEFUN([CF_LIB_NSL], diff --git a/SRC/config.h.in b/SRC/config.h.in index 8380aec..699ad6c 100644 --- a/SRC/config.h.in +++ b/SRC/config.h.in @@ -36,6 +36,9 @@ /* Define if you have the socket function. */ #undef HAVE_SOCKET +/* Define if you have the strerror function. */ +#undef HAVE_STRERROR + /* Define if you have the usleep function. */ #undef HAVE_USLEEP @@ -67,12 +70,6 @@ /* Do we have socket priority? */ #undef HAVE_SOCKET_PRIORITY -/* Is sys_errlist declared? */ -#undef DECL_SYS_ERRLIST - -/* Is sys_nerr declared? */ -#undef DECL_SYS_NERR - /* HTTP support */ #undef HTTP diff --git a/SRC/configure b/SRC/configure index 69ae84e..e7afdba 100755 --- a/SRC/configure +++ b/SRC/configure @@ -1419,107 +1419,6 @@ fi done -for cf_name in sys_nerr sys_errlist -do - -echo $ac_n "checking if external $cf_name is declared""... $ac_c" 1>&6 -echo "configure:1427: checking if external $cf_name is declared" >&5 -if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext < -#endif -#include -#include -#include -int main() { -long x = (long) $cf_name -; return 0; } -EOF -if { (eval echo configure:1446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - eval 'cf_cv_dcl_'$cf_name'=yes' -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval 'cf_cv_dcl_'$cf_name'=no' -fi -rm -f conftest* - -fi - -eval 'cf_result=$cf_cv_dcl_'$cf_name -echo "$ac_t""$cf_result" 1>&6 - -if test "$cf_result" = no ; then - eval 'cf_result=DECL_'$cf_name - -cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'` - - cat >> confdefs.h <&6 -echo "configure:1476: checking if external $cf_name exists" >&5 -if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval 'cf_cv_have_'$cf_name'=yes' -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval 'cf_cv_have_'$cf_name'=no' -fi -rm -f conftest* -fi - - -eval 'cf_result=$cf_cv_have_'$cf_name -echo "$ac_t""$cf_result" 1>&6 - -if test "$cf_result" = yes ; then - eval 'cf_result=HAVE_'$cf_name - -cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'` - - cat >> confdefs.h <&6 -echo "configure:1533: checking for working const" >&5 +echo "configure:1432: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1604,12 +1503,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1608: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1507: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1618,7 +1517,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1641,7 +1540,7 @@ fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:1645: checking for socket in -lsocket" >&5 +echo "configure:1544: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1649,7 +1548,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1677,9 +1576,9 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking if libsocket is mandatory""... $ac_c" 1>&6 -echo "configure:1681: checking if libsocket is mandatory" >&5 +echo "configure:1580: checking if libsocket is mandatory" >&5 cat > conftest.$ac_ext < #include @@ -1695,7 +1594,7 @@ int main() { socket (AF_INET, SOCK_STREAM, 0) ; return 0; } EOF -if { (eval echo configure:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -1713,7 +1612,7 @@ fi echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1717: checking for gethostbyname in -lnsl" >&5 +echo "configure:1616: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1721,7 +1620,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1749,9 +1648,9 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking if libnsl is mandatory""... $ac_c" 1>&6 -echo "configure:1753: checking if libnsl is mandatory" >&5 +echo "configure:1652: checking if libnsl is mandatory" >&5 cat > conftest.$ac_ext < #include @@ -1760,7 +1659,7 @@ int main() { gethostbyname(domain) ; return 0; } EOF -if { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -1778,7 +1677,7 @@ fi echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6 -echo "configure:1782: checking for pow in -lm" >&5 +echo "configure:1681: checking for pow in -lm" >&5 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1786,7 +1685,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1814,9 +1713,9 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking if libmath is mandatory""... $ac_c" 1>&6 -echo "configure:1818: checking if libmath is mandatory" >&5 +echo "configure:1717: checking if libmath is mandatory" >&5 cat > conftest.$ac_ext < double a,b; @@ -1824,7 +1723,7 @@ int main() { pow(a,b) ; return 0; } EOF -if { (eval echo configure:1828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -1841,12 +1740,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1845: checking return type of signal handlers" >&5 +echo "configure:1744: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1863,7 +1762,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1882,12 +1781,12 @@ EOF echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:1886: checking for vprintf" >&5 +echo "configure:1785: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -1934,12 +1833,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:1938: checking for _doprnt" >&5 +echo "configure:1837: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -1989,12 +1888,12 @@ fi for ac_func in getaddrinfo getnameinfo inet_ntop do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1993: checking for $ac_func" >&5 +echo "configure:1892: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2039,9 +1938,9 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking $ac_func again by including ""... $ac_c" 1>&6 -echo "configure:2043: checking $ac_func again by including " >&5 +echo "configure:1942: checking $ac_func again by including " >&5 cat > conftest.$ac_ext < #include @@ -2050,7 +1949,7 @@ int main() { $ac_func(NULL, NULL, NULL, NULL); ; return 0; } EOF -if { (eval echo configure:2054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -2065,15 +1964,15 @@ fi done -for ac_func in gettimeofday socket sigaction +for ac_func in gettimeofday socket sigaction strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2072: checking for $ac_func" >&5 +echo "configure:1971: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2124,12 +2023,12 @@ done for ac_func in usleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2128: checking for $ac_func" >&5 +echo "configure:2027: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2183,7 +2082,7 @@ fi if test "$OPENSSL" = "1"; then echo $ac_n "checking for SSL_CTX_new in -lssl""... $ac_c" 1>&6 -echo "configure:2187: checking for SSL_CTX_new in -lssl" >&5 +echo "configure:2086: checking for SSL_CTX_new in -lssl" >&5 ac_lib_var=`echo ssl'_'SSL_CTX_new | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2192,7 +2091,7 @@ else LIBS="-lssl -lcrypto $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2228,7 +2127,7 @@ fi if test "$GNUTLS" = "1"; then echo $ac_n "checking for gnutls_global_init in -lgnutls""... $ac_c" 1>&6 -echo "configure:2232: checking for gnutls_global_init in -lgnutls" >&5 +echo "configure:2131: checking for gnutls_global_init in -lgnutls" >&5 ac_lib_var=`echo gnutls'_'gnutls_global_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2236,7 +2135,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgnutls $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2271,9 +2170,9 @@ fi fi echo $ac_n "checking T/TCP""... $ac_c" 1>&6 -echo "configure:2275: checking T/TCP" >&5 +echo "configure:2174: checking T/TCP" >&5 cat > conftest.$ac_ext < #include @@ -2282,7 +2181,7 @@ int main() { int foobar = MSG_EOF; ; return 0; } EOF -if { (eval echo configure:2286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define TTCP 1 @@ -2323,9 +2222,9 @@ fi echo $ac_n "checking Type Of Service""... $ac_c" 1>&6 -echo "configure:2327: checking Type Of Service" >&5 +echo "configure:2226: checking Type Of Service" >&5 cat > conftest.$ac_ext < #include @@ -2334,7 +2233,7 @@ int main() { int foobar = IP_TOS; ; return 0; } EOF -if { (eval echo configure:2338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TOS 1 @@ -2375,9 +2274,9 @@ fi echo $ac_n "checking Socket priority""... $ac_c" 1>&6 -echo "configure:2379: checking Socket priority" >&5 +echo "configure:2278: checking Socket priority" >&5 cat > conftest.$ac_ext < #include @@ -2386,7 +2285,7 @@ int main() { int foobar = SO_PRIORITY; ; return 0; } EOF -if { (eval echo configure:2390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_SOCKET_PRIORITY 1 @@ -2808,7 +2707,7 @@ echo "Configuration of echoping:" echo $ac_n "checking HTTP""... $ac_c" 1>&6 -echo "configure:2812: checking HTTP" >&5 +echo "configure:2711: checking HTTP" >&5 if eval 'test "$HTTP" = "1"' > /dev/null; then echo "$ac_t""enabled" 1>&6 else @@ -2817,7 +2716,7 @@ fi echo $ac_n "checking ICP""... $ac_c" 1>&6 -echo "configure:2821: checking ICP" >&5 +echo "configure:2720: checking ICP" >&5 if eval 'test "$ICP" = "1"' > /dev/null; then echo "$ac_t""enabled" 1>&6 else @@ -2826,7 +2725,7 @@ fi echo $ac_n "checking OPENSSL""... $ac_c" 1>&6 -echo "configure:2830: checking OPENSSL" >&5 +echo "configure:2729: checking OPENSSL" >&5 if eval 'test "$OPENSSL" = "1"' > /dev/null; then echo "$ac_t""enabled" 1>&6 else @@ -2835,7 +2734,7 @@ fi echo $ac_n "checking GNUTLS""... $ac_c" 1>&6 -echo "configure:2839: checking GNUTLS" >&5 +echo "configure:2738: checking GNUTLS" >&5 if eval 'test "$GNUTLS" = "1"' > /dev/null; then echo "$ac_t""enabled" 1>&6 else @@ -2844,7 +2743,7 @@ fi echo $ac_n "checking SMTP""... $ac_c" 1>&6 -echo "configure:2848: checking SMTP" >&5 +echo "configure:2747: checking SMTP" >&5 if eval 'test "$SMTP" = "1"' > /dev/null; then echo "$ac_t""enabled" 1>&6 else @@ -2853,7 +2752,7 @@ fi echo $ac_n "checking TTCP""... $ac_c" 1>&6 -echo "configure:2857: checking TTCP" >&5 +echo "configure:2756: checking TTCP" >&5 if eval 'test "$TTCP" = "1"' > /dev/null; then echo "$ac_t""enabled" 1>&6 else @@ -2862,7 +2761,7 @@ fi echo $ac_n "checking TOS""... $ac_c" 1>&6 -echo "configure:2866: checking TOS" >&5 +echo "configure:2765: checking TOS" >&5 if eval 'test "$TOS" = "1"' > /dev/null; then echo "$ac_t""enabled" 1>&6 else @@ -2871,7 +2770,7 @@ fi echo $ac_n "checking PRIORITY""... $ac_c" 1>&6 -echo "configure:2875: checking PRIORITY" >&5 +echo "configure:2774: checking PRIORITY" >&5 if eval 'test "$PRIORITY" = "1"' > /dev/null; then echo "$ac_t""enabled" 1>&6 else diff --git a/SRC/configure.in b/SRC/configure.in index 0d8220a..07bcd5d 100644 --- a/SRC/configure.in +++ b/SRC/configure.in @@ -71,7 +71,6 @@ dnl Checks for libraries. dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(sys/time.h unistd.h) -CF_SYS_ERRLIST case $host_os in osf*) @@ -104,7 +103,7 @@ AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_ntop, , [AC_MSG_ERROR([Missing mandatory function - echoping now uses the new network functions (RFC 2133) which are mandatory for IPv6])] )]) -AC_CHECK_FUNCS(gettimeofday socket sigaction, , AC_MSG_ERROR(Missing mandatory function)) +AC_CHECK_FUNCS(gettimeofday socket sigaction strerror, , AC_MSG_ERROR(Missing mandatory function)) AC_CHECK_FUNCS(usleep) if test "$OPENSSL" = "1" && test "$GNUTLS" = "1"; then diff --git a/SRC/echoping.h b/SRC/echoping.h index 8721fba..083bbb4 100644 --- a/SRC/echoping.h +++ b/SRC/echoping.h @@ -73,9 +73,6 @@ /* These entities should be in errno.h but some systems do not define them. */ -#ifdef DECL_SYS_ERRLIST -extern char *sys_errlist[]; -#endif #ifdef DECL_SYS_NERR extern int sys_nerr; #endif diff --git a/SRC/error.c b/SRC/error.c index 2740bd3..0840938 100644 --- a/SRC/error.c +++ b/SRC/error.c @@ -110,15 +110,11 @@ sys_err_str () if (errno != 0) { - if (errno > 0 && errno < sys_nerr) - sprintf (msgstr, "(%s)", sys_errlist[errno]); - else - sprintf (msgstr, "(errno = %d)", errno); + sprintf (msgstr, "(%s)", strerror(errno)); } else { msgstr[0] = '\0'; - } - + } return (msgstr); }