From: wessels <> Date: Fri, 21 Feb 1997 23:28:35 +0000 (+0000) Subject: do AC_REPLACE_FUNCS(strerror) X-Git-Tag: SQUID_3_0_PRE1~5091 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d38fc7e1eb627a9c5fccc0a5973fd1fac86db0c;p=thirdparty%2Fsquid.git do AC_REPLACE_FUNCS(strerror) --- diff --git a/configure.in b/configure.in index 683c4d4735..ef991b1fb2 100644 --- a/configure.in +++ b/configure.in @@ -3,13 +3,13 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.67 1997/01/31 21:14:33 wessels Exp $ +dnl $Id: configure.in,v 1.68 1997/02/21 16:28:35 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.67 $)dnl +AC_REVISION($Revision: 1.68 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(aux) @@ -349,6 +349,7 @@ AC_SUBST(LIBREGEX) AC_REPLACE_FUNCS(\ tempnam \ + strerror \ ) AC_MSG_CHECKING(Maximum number of filedescriptors we can open) diff --git a/lib/util.c b/lib/util.c index c7367eab2a..60a6e40d0c 100644 --- a/lib/util.c +++ b/lib/util.c @@ -1,5 +1,5 @@ /* - * $Id: util.c,v 1.28 1996/11/24 02:41:56 wessels Exp $ + * $Id: util.c,v 1.29 1997/02/21 16:28:36 wessels Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -134,9 +134,6 @@ void (*failure_notify) _PARAMS((const char *)) = NULL; static char msg[128]; extern int sys_nerr; -#if NEED_SYS_ERRLIST && !defined(_SQUID_NETBSD_) -extern char *sys_errlist[]; -#endif #if XMALLOC_STATISTICS #define DBG_MAXSIZE (1024*1024) @@ -433,7 +430,7 @@ xstrdup(const char *s) } /* - * xstrerror() - return sys_errlist[errno]; + * xstrerror() - strerror() wrapper */ const char * xstrerror(void) @@ -441,11 +438,7 @@ xstrerror(void) static char xstrerror_buf[BUFSIZ]; if (errno < 0 || errno >= sys_nerr) return ("Unknown"); -#if HAVE_STRERROR sprintf(xstrerror_buf, "(%d) %s", errno, strerror(errno)); -#else - sprintf(xstrerror_buf, "(%d) %s", errno, sys_errlist[errno]); -#endif /* HAVE_STRERROR */ return xstrerror_buf; }