1101. [bug] Array bounds read error in lwres_gai_strerror.
+1085. [port] libbind: solaris: sys_nerr and sys_errlist do not
+ exist when compiling in 64 bit mode.
+
1084. [cleanup] libbind: gai_strerror() rewritten.
1083. [bug] The default control channel listened on the
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: strerror.c,v 1.3 2001/06/21 08:25:59 marka Exp $";
+static const char rcsid[] = "$Id: strerror.c,v 1.3.2.1 2001/11/02 17:45:31 gson Exp $";
#endif /* LIBC_SCCS and not lint */
/*
int __strerror_unneeded__;
#else
+#ifdef USE_SYSERROR_LIST
+extern int sys_nerr;
+extern char *sys_errlist[];
+#endif
+
const char *
isc_strerror(int num) {
#define UPREFIX "Unknown error: "
const char *ret;
char tmp[40];
+ errnum = num; /* convert to unsigned */
+#ifdef USE_SYSERROR_LIST
+ if (errnum < sys_nerr)
+ return (sys_errlist[errnum]);
+#else
#undef strerror
ret = strerror(num); /* call strerror() in libc */
if (ret != NULL)
return(ret);
-
- errnum = num; /* convert to unsigned */
+#endif
+
/* Do this by hand, so we don't include stdio(3). */
t = tmp;
do {
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
-AC_REVISION($Revision: 1.83 $)
+AC_REVISION($Revision: 1.83.2.1 $)
AC_INIT(resolv/herror.c)
AC_PREREQ(2.13)
AC_SUBST(ISC_EXTRA_OBJS)
AC_SUBST(ISC_EXTRA_SRCS)
+AC_CHECK_FUNC(strerror,
+ [USE_SYSERROR_LIST="#undef USE_SYSERROR_LIST"],
+ [USE_SYSERROR_LIST="#define USE_SYSERROR_LIST 1"])
+AC_SUBST(USE_SYSERROR_LIST)
#
# Determine the printf format characters to use when printing