mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 23:55:27 +00:00
1085. [port] libbind: solaris: sys_nerr and sys_errlist do not
exist when compiling in 64 bit mode.
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
|||||||
|
1085. [port] libbind: solaris: sys_nerr and sys_errlist do not
|
||||||
|
exist when compiling in 64 bit mode.
|
||||||
|
|
||||||
1084. [cleanup] libbind: gai_strerror() re-written.
|
1084. [cleanup] libbind: gai_strerror() re-written.
|
||||||
|
|
||||||
1083. [bug] The default control channel listened on the
|
1083. [bug] The default control channel listened on the
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
static const char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93";
|
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.4 2001/11/01 00:48:03 marka Exp $";
|
||||||
#endif /* LIBC_SCCS and not lint */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -49,6 +49,11 @@ static const char rcsid[] = "$Id: strerror.c,v 1.3 2001/06/21 08:25:59 marka Exp
|
|||||||
int __strerror_unneeded__;
|
int __strerror_unneeded__;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#ifdef USE_SYSERROR_LIST
|
||||||
|
extern int sys_nerr;
|
||||||
|
extern char *sys_errlist[];
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
isc_strerror(int num) {
|
isc_strerror(int num) {
|
||||||
#define UPREFIX "Unknown error: "
|
#define UPREFIX "Unknown error: "
|
||||||
@@ -58,12 +63,17 @@ isc_strerror(int num) {
|
|||||||
const char *ret;
|
const char *ret;
|
||||||
char tmp[40];
|
char tmp[40];
|
||||||
|
|
||||||
|
errnum = num; /* convert to unsigned */
|
||||||
|
#ifdef USE_SYSERROR_LIST
|
||||||
|
if (errnum < sys_nerr)
|
||||||
|
return (sys_errlist[errnum]);
|
||||||
|
#else
|
||||||
#undef strerror
|
#undef strerror
|
||||||
ret = strerror(num); /* call strerror() in libc */
|
ret = strerror(num); /* call strerror() in libc */
|
||||||
if (ret != NULL)
|
if (ret != NULL)
|
||||||
return(ret);
|
return(ret);
|
||||||
|
#endif
|
||||||
errnum = num; /* convert to unsigned */
|
|
||||||
/* Do this by hand, so we don't include stdio(3). */
|
/* Do this by hand, so we don't include stdio(3). */
|
||||||
t = tmp;
|
t = tmp;
|
||||||
do {
|
do {
|
||||||
|
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
|||||||
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
|
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
|
||||||
AC_DIVERT_POP()dnl
|
AC_DIVERT_POP()dnl
|
||||||
|
|
||||||
AC_REVISION($Revision: 1.83 $)
|
AC_REVISION($Revision: 1.84 $)
|
||||||
|
|
||||||
AC_INIT(resolv/herror.c)
|
AC_INIT(resolv/herror.c)
|
||||||
AC_PREREQ(2.13)
|
AC_PREREQ(2.13)
|
||||||
@@ -1265,6 +1265,10 @@ AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
|
|||||||
|
|
||||||
AC_SUBST(ISC_EXTRA_OBJS)
|
AC_SUBST(ISC_EXTRA_OBJS)
|
||||||
AC_SUBST(ISC_EXTRA_SRCS)
|
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
|
# Determine the printf format characters to use when printing
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
@NEED_GETTIMEOFDAY@
|
@NEED_GETTIMEOFDAY@
|
||||||
@HAVE_STRNDUP@
|
@HAVE_STRNDUP@
|
||||||
@USE_FIONBIO_IOCTL@
|
@USE_FIONBIO_IOCTL@
|
||||||
|
@USE_SYSERROR_LIST@
|
||||||
|
|
||||||
/* XXX sunos and cygwin needs O_NDELAY */
|
/* XXX sunos and cygwin needs O_NDELAY */
|
||||||
#define PORT_NONBLOCK O_NONBLOCK
|
#define PORT_NONBLOCK O_NONBLOCK
|
||||||
|
Reference in New Issue
Block a user