From d47570198191c7d345ec95956fc4337dc09e161e Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 5 Oct 2004 03:18:54 +0000 Subject: [PATCH] 1731. [port] darwin: relax version test in ifconfig.sh. [RT #12581] 1730. [port] Determine the length type used by the socket API. [RT #12581] --- CHANGES | 6 ++++++ acconfig.h | 5 ++++- bin/tests/system/ifconfig.sh | 6 +++--- config.h.in | 5 ++++- configure.in | 19 ++++++++++++++++++- lib/isc/unix/socket.c | 6 +----- 6 files changed, 36 insertions(+), 11 deletions(-) diff --git a/CHANGES b/CHANGES index e5fbbfeeff..e8d423bdb7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,10 @@ 1734. [cleanup] 'rndc-confgen -a -t' remove extra '/' in path. +1731. [port] darwin: relax version test in ifconfig.sh. + [RT #12581] + +1730. [port] Determine the length type used by the socket API. + [RT #12581] + [RT #12588] 1733. [bug] Return non-zero exit status on initial load failure. diff --git a/acconfig.h b/acconfig.h index 9c578984d7..b7eee3bd9d 100644 --- a/acconfig.h +++ b/acconfig.h @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: acconfig.h,v 1.35.2.8 2004/03/09 06:09:07 marka Exp $ */ +/* $Id: acconfig.h,v 1.35.2.9 2004/10/05 03:18:51 marka Exp $ */ /*** *** This file is not to be included by any public header files, because @@ -130,3 +130,6 @@ int sigwait(const unsigned int *set, int *sig); /* define if you have strerror in the C library. */ #undef HAVE_STRERROR + +/* Define to the length type used by the socket API (socklen_t, size_t, int). */ +#undef ISC_SOCKADDR_LEN_T diff --git a/bin/tests/system/ifconfig.sh b/bin/tests/system/ifconfig.sh index f15c7f15db..8b0ca9b1d0 100644 --- a/bin/tests/system/ifconfig.sh +++ b/bin/tests/system/ifconfig.sh @@ -15,7 +15,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: ifconfig.sh,v 1.35.2.11 2004/09/24 06:04:47 marka Exp $ +# $Id: ifconfig.sh,v 1.35.2.12 2004/10/05 03:18:53 marka Exp $ # # Set up interface aliases for bind9 system tests. @@ -88,7 +88,7 @@ case "$1" in *-sco3.2v*) ifconfig lo0 alias 10.53.0.$ns ;; - *-darwin5*) + *-darwin*) ifconfig lo0 alias 10.53.0.$ns ;; *) @@ -148,7 +148,7 @@ case "$1" in *-sco3.2v*) ifconfig lo0 -alias 10.53.0.$ns ;; - *darwin5*) + *darwin*) ifconfig lo0 -alias 10.53.0.$ns ;; *) diff --git a/config.h.in b/config.h.in index cb60d1fb4b..513c9f6e07 100644 --- a/config.h.in +++ b/config.h.in @@ -16,7 +16,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: config.h.in,v 1.47.2.9 2004/09/01 07:11:22 marka Exp $ */ +/* $Id: config.h.in,v 1.47.2.10 2004/10/05 03:18:51 marka Exp $ */ /*** *** This file is not to be included by any public header files, because @@ -131,6 +131,9 @@ int sigwait(const unsigned int *set, int *sig); /* define if you have strerror in the C library. */ #undef HAVE_STRERROR +/* Define to the length type used by the socket API (socklen_t, size_t, int). */ +#undef ISC_SOCKADDR_LEN_T + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H diff --git a/configure.in b/configure.in index be76a6d332..72c97a6982 100644 --- a/configure.in +++ b/configure.in @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -AC_REVISION($Revision: 1.294.2.35 $) +AC_REVISION($Revision: 1.294.2.36 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.13) @@ -245,6 +245,23 @@ AC_TRY_COMPILE(, [ AC_TYPE_SIZE_T AC_CHECK_TYPE(ssize_t, int) +AC_CHECK_TYPE(socklen_t, +[AC_DEFINE(ISC_SOCKADDR_LEN_T, socklen_t)], +[ +AC_TRY_COMPILE( +[ +#include +#include +int getsockname(int, struct sockaddr *, size_t *); +],[], +[AC_DEFINE(ISC_SOCKADDR_LEN_T, size_t)], +[AC_DEFINE(ISC_SOCKADDR_LEN_T, int)]) +], +[ +#include +#include +]) +AC_SUBST(ISC_SOCKADDR_LEN_T) AC_HEADER_TIME AC_MSG_CHECKING(for long long) AC_TRY_COMPILE([],[long long i = 0; return (0);], diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 373817ca80..9e84163ed3 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.207.2.29 2004/07/01 04:51:44 marka Exp $ */ +/* $Id: socket.c,v 1.207.2.30 2004/10/05 03:18:54 marka Exp $ */ #include @@ -62,12 +62,8 @@ * some as socklen_t. This is here so it can be easily changed if needed. */ #ifndef ISC_SOCKADDR_LEN_T -#ifdef _BSD_SOCKLEN_T_ -#define ISC_SOCKADDR_LEN_T _BSD_SOCKLEN_T_ -#else #define ISC_SOCKADDR_LEN_T unsigned int #endif -#endif /* * Define what the possible "soft" errors can be. These are non-fatal returns