From 43fe2897fc80bbec2115310ca79d432a252f3ea4 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 5 Oct 2004 03:17:18 +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 | 7 +++++-- bin/tests/system/ifconfig.sh | 6 +++--- config.h.in | 7 +++++-- configure.in | 19 ++++++++++++++++++- lib/isc/unix/socket.c | 6 +----- 6 files changed, 36 insertions(+), 15 deletions(-) diff --git a/CHANGES b/CHANGES index 5f4a1d9914..6384cbff79 100644 --- a/CHANGES +++ b/CHANGES @@ -15,9 +15,11 @@ 1732. [placeholder] rt12467 -1731. [placeholder] rt12581 +1731. [port] darwin: relax version test in ifconfig.sh. + [RT #12581] -1730. [placeholder] rt12581 +1730. [port] Determine the length type used by the socket API. + [RT #12581] 1729. [placeholder] rt12634 diff --git a/acconfig.h b/acconfig.h index c44755fd40..8bbbbcba4b 100644 --- a/acconfig.h +++ b/acconfig.h @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: acconfig.h,v 1.45 2004/05/21 08:09:27 marka Exp $ */ +/* $Id: acconfig.h,v 1.46 2004/10/05 03:17:16 marka Exp $ */ /*** *** This file is not to be included by any public header files, because @@ -134,8 +134,11 @@ int sigwait(const unsigned int *set, int *sig); /* define if you have strerror in the C library. */ #undef HAVE_STRERROR -/* Define if you are running under Compaq TruCluster.. */ +/* Define if you are running under Compaq TruCluster. */ #undef HAVE_TRUCLUSTER /* Define if OpenSSL includes DSA support */ #undef HAVE_OPENSSL_DSA + +/* 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 9624b55c69..165bda4a2b 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.48 2004/09/24 05:35:49 marka Exp $ +# $Id: ifconfig.sh,v 1.49 2004/10/05 03:17:17 marka Exp $ # # Set up interface aliases for bind9 system tests. @@ -106,7 +106,7 @@ case "$1" in *-sco3.2v*) ifconfig lo0 alias 10.53.0.$ns ;; - *-darwin5*) + *-darwin*) ifconfig lo0 alias 10.53.0.$ns ;; *) @@ -166,7 +166,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 4bc0c9fe2e..d8963dd05c 100644 --- a/config.h.in +++ b/config.h.in @@ -16,7 +16,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: config.h.in,v 1.62 2004/09/01 07:25:51 marka Exp $ */ +/* $Id: config.h.in,v 1.63 2004/10/05 03:17:16 marka Exp $ */ /*** *** This file is not to be included by any public header files, because @@ -134,12 +134,15 @@ int sigwait(const unsigned int *set, int *sig); /* define if you have strerror in the C library. */ #undef HAVE_STRERROR -/* Define if you are running under Compaq TruCluster.. */ +/* Define if you are running under Compaq TruCluster. */ #undef HAVE_TRUCLUSTER /* Define if OpenSSL includes DSA support */ #undef HAVE_OPENSSL_DSA +/* 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 1dd2ed5c0e..7c05990913 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.362 $) +AC_REVISION($Revision: 1.363 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.13) @@ -261,6 +261,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 572f5856ae..e7ad2670c6 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.241 2004/07/01 04:53:14 marka Exp $ */ +/* $Id: socket.c,v 1.242 2004/10/05 03:17:18 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