diff options
Diffstat (limited to 'contrib/bind9/lib/bind')
41 files changed, 1770 insertions, 316 deletions
diff --git a/contrib/bind9/lib/bind/Makefile.in b/contrib/bind9/lib/bind/Makefile.in index 5c34c1a..61424e7 100644 --- a/contrib/bind9/lib/bind/Makefile.in +++ b/contrib/bind9/lib/bind/Makefile.in @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2001-2003 Internet Software Consortium. # # Permission to use, copy, modify, and distribute this software for any @@ -13,15 +13,12 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.12.2.5.2.9 2005/07/29 00:13:08 marka Exp $ +# $Id: Makefile.in,v 1.12.2.5.2.11 2006/06/24 00:25:38 marka Exp $ srcdir = @srcdir@ VPATH = @srcdir@ top_srcdir = @top_srcdir@ -# Attempt to disable parallel processing. -.NOTPARALLEL: -.NO_PARALLEL: @LIBBIND_API@ @@ -99,6 +96,10 @@ OBJS= ${BSDOBJS} ${DSTOBJS} ${INETOBJS} ${IRSOBJS} ${ISCOBJS} \ @BIND9_MAKE_RULES@ +# Attempt to disable parallel processing. +.NOTPARALLEL: +.NO_PARALLEL: + libbind.@SA@: ${OBJS} ${AR} ${ARFLAGS} $@ ${OBJS} ${RANLIB} $@ diff --git a/contrib/bind9/lib/bind/api b/contrib/bind9/lib/bind/api index dcc846e..8632b12 100644 --- a/contrib/bind9/lib/bind/api +++ b/contrib/bind9/lib/bind/api @@ -1,3 +1,3 @@ LIBINTERFACE = 4 -LIBREVISION = 2 +LIBREVISION = 7 LIBAGE = 0 diff --git a/contrib/bind9/lib/bind/config.h.in b/contrib/bind9/lib/bind/config.h.in index 82a1560..c4d88d3 100644 --- a/contrib/bind9/lib/bind/config.h.in +++ b/contrib/bind9/lib/bind/config.h.in @@ -4,6 +4,7 @@ #undef HAVE_INTTYPES_H #undef HAVE_STROPTS_H #undef HAVE_SYS_TIMERS_H +#undef HAVE_SYS_SELECT_H #undef SYS_CDEFS_H #undef _POSIX_PTHREAD_SEMANTICS #undef POSIX_GETPWUID_R diff --git a/contrib/bind9/lib/bind/configure b/contrib/bind9/lib/bind/configure index 8f12621..1fba616 100755 --- a/contrib/bind9/lib/bind/configure +++ b/contrib/bind9/lib/bind/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.83.2.5.2.22 . +# From configure.in Revision: 1.83.2.5.2.31 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # @@ -464,7 +464,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA STD_CINCLUDES STD_CDEFINES STD_CWARNINGS CCOPT AR ARFLAGS LN ETAGS PERL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP ISC_PLATFORM_NEEDSYSSELECTH WANT_IRS_GR WANT_IRS_GR_OBJS WANT_IRS_PW WANT_IRS_PW_OBJS WANT_IRS_NIS WANT_IRS_NIS_OBJS WANT_IRS_NISGR_OBJS WANT_IRS_NISPW_OBJS WANT_IRS_DBPW_OBJS ALWAYS_DEFINES DO_PTHREADS WANT_IRS_THREADSGR_OBJS WANT_IRS_THREADSPW_OBJS WANT_IRS_THREADS_OBJS WANT_THREADS_OBJS USE_IFNAMELINKID ISC_THREAD_DIR DAEMON_OBJS NEED_DAEMON STRSEP_OBJS NEED_STRSEP NEED_STRERROR MKDEPCC MKDEPCFLAGS MKDEPPROG IRIX_DNSSEC_WARNINGS_HACK purify_path PURIFY LN_S ECHO ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL O A SA LIBTOOL_MKDEP_SED LIBTOOL_MODE_COMPILE LIBTOOL_MODE_INSTALL LIBTOOL_MODE_LINK HAS_INET6_STRUCTS ISC_PLATFORM_NEEDNETINETIN6H ISC_PLATFORM_NEEDNETINET6IN6H HAS_IN_ADDR6 NEED_IN6ADDR_ANY ISC_PLATFORM_HAVEIN6PKTINFO ISC_PLATFORM_FIXIN6ISADDR ISC_IPV6_H ISC_IPV6_O ISC_ISCIPV6_O ISC_IPV6_C HAVE_SIN6_SCOPE_ID HAVE_SOCKADDR_STORAGE ISC_PLATFORM_NEEDNTOP ISC_PLATFORM_NEEDPTON ISC_PLATFORM_NEEDATON HAVE_SA_LEN HAVE_MINIMUM_IFREQ BSD_COMP SOLARIS_BITTYPES USE_FIONBIO_IOCTL PORT_NONBLOCK PORT_DIR USE_POLL HAVE_MD5 SOLARIS2 PORT_INCLUDE ISC_PLATFORM_MSGHDRFLAVOR ISC_PLATFORM_NEEDPORTT ISC_LWRES_ENDHOSTENTINT ISC_LWRES_SETNETENTINT ISC_LWRES_ENDNETENTINT ISC_LWRES_GETHOSTBYADDRVOID ISC_LWRES_NEEDHERRNO ISC_LWRES_GETIPNODEPROTO ISC_LWRES_GETADDRINFOPROTO ISC_LWRES_GETNAMEINFOPROTO NEED_PSELECT NEED_GETTIMEOFDAY HAVE_STRNDUP ISC_PLATFORM_NEEDSTRSEP ISC_PLATFORM_NEEDVSNPRINTF ISC_EXTRA_OBJS ISC_EXTRA_SRCS USE_SYSERROR_LIST ISC_PLATFORM_QUADFORMAT ISC_SOCKLEN_T GETGROUPLIST_ARGS NET_R_ARGS NET_R_BAD NET_R_COPY NET_R_COPY_ARGS NET_R_OK NET_R_SETANSWER NET_R_RETURN GETNETBYADDR_ADDR_T NETENT_DATA NET_R_ENT_ARGS NET_R_SET_RESULT NET_R_SET_RETURN NET_R_END_RESULT NET_R_END_RETURN GROUP_R_ARGS GROUP_R_BAD GROUP_R_OK GROUP_R_RETURN GROUP_R_END_RESULT GROUP_R_END_RETURN GROUP_R_ENT_ARGS GROUP_R_SET_RESULT GROUP_R_SET_RETURN HOST_R_ARGS HOST_R_BAD HOST_R_COPY HOST_R_COPY_ARGS HOST_R_ERRNO HOST_R_OK HOST_R_RETURN HOST_R_SETANSWER HOSTENT_DATA HOST_R_END_RESULT HOST_R_END_RETURN HOST_R_ENT_ARGS HOST_R_SET_RESULT HOST_R_SET_RETURN SETPWENT_VOID SETGRENT_VOID NGR_R_ARGS NGR_R_BAD NGR_R_COPY NGR_R_COPY_ARGS NGR_R_OK NGR_R_RETURN NGR_R_PRIVATE NGR_R_END_RESULT NGR_R_END_RETURN NGR_R_ENT_ARGS NGR_R_SET_RESULT NGR_R_SET_RETURN PROTO_R_ARGS PROTO_R_BAD PROTO_R_COPY PROTO_R_COPY_ARGS PROTO_R_OK PROTO_R_SETANSWER PROTO_R_RETURN PROTO_R_END_RESULT PROTO_R_END_RETURN PROTO_R_ENT_ARGS PROTO_R_SET_RESULT PROTO_R_SET_RETURN PASS_R_ARGS PASS_R_BAD PASS_R_COPY PASS_R_COPY_ARGS PASS_R_OK PASS_R_RETURN PASS_R_END_RESULT PASS_R_END_RETURN PASS_R_ENT_ARGS PASS_R_SET_RESULT PASS_R_SET_RETURN SERV_R_ARGS SERV_R_BAD SERV_R_COPY SERV_R_COPY_ARGS SERV_R_OK SERV_R_SETANSWER SERV_R_RETURN SERV_R_END_RESULT SERV_R_END_RETURN SERV_R_ENT_ARGS SERV_R_SET_RESULT SERV_R_SET_RETURN SETNETGRENT_ARGS INNETGR_ARGS BIND9_TOP_BUILDDIR BIND9_VERSION LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA STD_CINCLUDES STD_CDEFINES STD_CWARNINGS CCOPT AR ARFLAGS LN ETAGS PERL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP ISC_PLATFORM_NEEDSYSSELECTH WANT_IRS_GR WANT_IRS_GR_OBJS WANT_IRS_PW WANT_IRS_PW_OBJS WANT_IRS_NIS WANT_IRS_NIS_OBJS WANT_IRS_NISGR_OBJS WANT_IRS_NISPW_OBJS WANT_IRS_DBPW_OBJS ALWAYS_DEFINES DO_PTHREADS WANT_IRS_THREADSGR_OBJS WANT_IRS_THREADSPW_OBJS WANT_IRS_THREADS_OBJS WANT_THREADS_OBJS USE_IFNAMELINKID ISC_THREAD_DIR DAEMON_OBJS NEED_DAEMON STRSEP_OBJS NEED_STRSEP NEED_STRERROR MKDEPCC MKDEPCFLAGS MKDEPPROG IRIX_DNSSEC_WARNINGS_HACK purify_path PURIFY LN_S ECHO ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL O A SA LIBTOOL_MKDEP_SED LIBTOOL_MODE_COMPILE LIBTOOL_MODE_INSTALL LIBTOOL_MODE_LINK HAS_INET6_STRUCTS ISC_PLATFORM_NEEDNETINETIN6H ISC_PLATFORM_NEEDNETINET6IN6H HAS_IN_ADDR6 NEED_IN6ADDR_ANY ISC_PLATFORM_HAVEIN6PKTINFO ISC_PLATFORM_FIXIN6ISADDR ISC_IPV6_H ISC_IPV6_O ISC_ISCIPV6_O ISC_IPV6_C HAVE_SIN6_SCOPE_ID HAVE_SOCKADDR_STORAGE ISC_PLATFORM_NEEDNTOP ISC_PLATFORM_NEEDPTON ISC_PLATFORM_NEEDATON HAVE_SA_LEN HAVE_MINIMUM_IFREQ BSD_COMP SOLARIS_BITTYPES USE_FIONBIO_IOCTL PORT_NONBLOCK PORT_DIR USE_POLL HAVE_MD5 SOLARIS2 PORT_INCLUDE ISC_PLATFORM_MSGHDRFLAVOR ISC_PLATFORM_NEEDPORTT ISC_LWRES_ENDHOSTENTINT ISC_LWRES_SETNETENTINT ISC_LWRES_ENDNETENTINT ISC_LWRES_GETHOSTBYADDRVOID ISC_LWRES_NEEDHERRNO ISC_LWRES_GETIPNODEPROTO ISC_LWRES_GETADDRINFOPROTO ISC_LWRES_GETNAMEINFOPROTO NEED_PSELECT NEED_GETTIMEOFDAY HAVE_STRNDUP ISC_PLATFORM_NEEDSTRSEP ISC_PLATFORM_NEEDVSNPRINTF ISC_EXTRA_OBJS ISC_EXTRA_SRCS USE_SYSERROR_LIST ISC_PLATFORM_QUADFORMAT ISC_SOCKLEN_T GETGROUPLIST_ARGS NET_R_ARGS NET_R_BAD NET_R_COPY NET_R_COPY_ARGS NET_R_OK NET_R_SETANSWER NET_R_RETURN GETNETBYADDR_ADDR_T NETENT_DATA NET_R_ENT_ARGS NET_R_SET_RESULT NET_R_SET_RETURN NET_R_END_RESULT NET_R_END_RETURN GROUP_R_ARGS GROUP_R_BAD GROUP_R_OK GROUP_R_RETURN GROUP_R_END_RESULT GROUP_R_END_RETURN GROUP_R_ENT_ARGS GROUP_R_SET_RESULT GROUP_R_SET_RETURN HOST_R_ARGS HOST_R_BAD HOST_R_COPY HOST_R_COPY_ARGS HOST_R_ERRNO HOST_R_OK HOST_R_RETURN HOST_R_SETANSWER HOSTENT_DATA HOST_R_END_RESULT HOST_R_END_RETURN HOST_R_ENT_ARGS HOST_R_SET_RESULT HOST_R_SET_RETURN SETPWENT_VOID SETGRENT_VOID NGR_R_ARGS NGR_R_BAD NGR_R_COPY NGR_R_COPY_ARGS NGR_R_OK NGR_R_RETURN NGR_R_PRIVATE NGR_R_END_RESULT NGR_R_END_RETURN NGR_R_ENT_ARGS NGR_R_SET_RESULT NGR_R_SET_RETURN PROTO_R_ARGS PROTO_R_BAD PROTO_R_COPY PROTO_R_COPY_ARGS PROTO_R_OK PROTO_R_SETANSWER PROTO_R_RETURN PROTOENT_DATA PROTO_R_END_RESULT PROTO_R_END_RETURN PROTO_R_ENT_ARGS PROTO_R_ENT_UNUSED PROTO_R_SET_RESULT PROTO_R_SET_RETURN PASS_R_ARGS PASS_R_BAD PASS_R_COPY PASS_R_COPY_ARGS PASS_R_OK PASS_R_RETURN PASS_R_END_RESULT PASS_R_END_RETURN PASS_R_ENT_ARGS PASS_R_SET_RESULT PASS_R_SET_RETURN SERV_R_ARGS SERV_R_BAD SERV_R_COPY SERV_R_COPY_ARGS SERV_R_OK SERV_R_SETANSWER SERV_R_RETURN SERVENT_DATA SERV_R_END_RESULT SERV_R_END_RETURN SERV_R_ENT_ARGS SERV_R_ENT_UNUSED SERV_R_SET_RESULT SERV_R_SET_RETURN SETNETGRENT_ARGS INNETGR_ARGS BIND9_TOP_BUILDDIR BIND9_VERSION LIBOBJS LTLIBOBJS' ac_subst_files='BIND9_INCLUDES BIND9_MAKE_RULES LIBBIND_API' # Initialize some variables set by options. @@ -4658,6 +4658,374 @@ echo "${ECHO_T}mit-pthreads/unproven-pthreads" >&6 fi fi ;; + *-freebsd*) + # We don't want to set -lpthread as that break + # the ability to choose threads library at final + # link time and is not valid for all architectures. + + PTHREAD= + if test "X$GCC" = "Xyes"; then + saved_cc="$CC" + CC="$CC -pthread" + echo "$as_me:$LINENO: checking for gcc -pthread support" >&5 +echo $ECHO_N "checking for gcc -pthread support... $ECHO_C" >&6; + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <pthread.h> +int +main () +{ +printf("%x\n", pthread_create); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + PTHREAD="yes" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CC="$saved_cc" + fi + if test "X$PTHREAD" != "Xyes"; then + +echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 +if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_create (); +int +main () +{ +pthread_create (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pthread_pthread_create=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_pthread_pthread_create=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 +if test $ac_cv_lib_pthread_pthread_create = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPTHREAD 1 +_ACEOF + + LIBS="-lpthread $LIBS" + +else + +echo "$as_me:$LINENO: checking for thread_create in -lthr" >&5 +echo $ECHO_N "checking for thread_create in -lthr... $ECHO_C" >&6 +if test "${ac_cv_lib_thr_thread_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lthr $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char thread_create (); +int +main () +{ +thread_create (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_thr_thread_create=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_thr_thread_create=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_thr_thread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_thr_thread_create" >&6 +if test $ac_cv_lib_thr_thread_create = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBTHR 1 +_ACEOF + + LIBS="-lthr $LIBS" + +else + +echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5 +echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6 +if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc_r $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_create (); +int +main () +{ +pthread_create (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_c_r_pthread_create=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_c_r_pthread_create=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6 +if test $ac_cv_lib_c_r_pthread_create = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBC_R 1 +_ACEOF + + LIBS="-lc_r $LIBS" + +else + +echo "$as_me:$LINENO: checking for pthread_create in -lc" >&5 +echo $ECHO_N "checking for pthread_create in -lc... $ECHO_C" >&6 +if test "${ac_cv_lib_c_pthread_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_create (); +int +main () +{ +pthread_create (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_c_pthread_create=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_c_pthread_create=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_c_pthread_create" >&6 +if test $ac_cv_lib_c_pthread_create = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBC 1 +_ACEOF + + LIBS="-lc $LIBS" + +else + { { echo "$as_me:$LINENO: error: \"could not find thread libraries\"" >&5 +echo "$as_me: error: \"could not find thread libraries\"" >&2;} + { (exit 1); exit 1; }; } +fi + +fi + +fi + +fi + + fi + ;; *) echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 @@ -5043,10 +5411,160 @@ fi if $use_threads then + if test "X$GCC" = "Xyes"; then + case "$host" in + *-freebsd*) + CC="$CC -pthread" + CCOPT="$CCOPT -pthread" + STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" + ;; + *-openbsd*) + CC="$CC -pthread" + CCOPT="$CCOPT -pthread" + ;; + *-solaris*) + LIBS="$LIBS -lthread" + ;; + *-ibm-aix*) + STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" + ;; + esac + else + case $host in + *-dec-osf*) + CC="$CC -pthread" + CCOPT="$CCOPT -pthread" + ;; + *-solaris*) + CC="$CC -mt" + CCOPT="$CCOPT -mt" + ;; + *-ibm-aix*) + STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" + ;; + *-UnixWare*) + CC="$CC -Kthread" + CCOPT="$CCOPT -Kthread" + ;; + esac + fi + cat >>confdefs.h <<\_ACEOF +#define _REENTRANT 1 +_ACEOF + + ALWAYS_DEFINES="-D_REENTRANT" + DO_PTHREADS="#define DO_PTHREADS 1" + WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}" + WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}" + case $host in + ia64-hp-hpux11.*) + WANT_IRS_THREADS_OBJS="";; + *) + WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";; + esac + WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}" + thread_dir=pthreads + # # We'd like to use sigwait() too # - echo "$as_me:$LINENO: checking for sigwait in -lc" >&5 + echo "$as_me:$LINENO: checking for sigwait" >&5 +echo $ECHO_N "checking for sigwait... $ECHO_C" >&6 +if test "${ac_cv_func_sigwait+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define sigwait to an innocuous variant, in case <limits.h> declares sigwait. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define sigwait innocuous_sigwait + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char sigwait (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef sigwait + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sigwait (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_sigwait) || defined (__stub___sigwait) +choke me +#else +char (*f) () = sigwait; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != sigwait; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_sigwait=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_sigwait=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_sigwait" >&5 +echo "${ECHO_T}$ac_cv_func_sigwait" >&6 +if test $ac_cv_func_sigwait = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_SIGWAIT 1 +_ACEOF + +else + echo "$as_me:$LINENO: checking for sigwait in -lc" >&5 echo $ECHO_N "checking for sigwait in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_sigwait+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5259,6 +5777,7 @@ fi fi +fi fi @@ -5707,59 +6226,6 @@ _ACEOF fi - if test "X$GCC" = "Xyes"; then - case "$host" in - *-freebsd*) - CC="$CC -pthread" - CCOPT="$CCOPT -pthread" - STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" - ;; - *-openbsd*) - CC="$CC -pthread" - CCOPT="$CCOPT -pthread" - ;; - *-solaris*) - LIBS="$LIBS -lthread" - ;; - *-ibm-aix*) - STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" - ;; - esac - else - case $host in - *-dec-osf*) - CC="$CC -pthread" - CCOPT="$CCOPT -pthread" - ;; - *-solaris*) - CC="$CC -mt" - CCOPT="$CCOPT -mt" - ;; - *-ibm-aix*) - STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" - ;; - *-UnixWare*) - CC="$CC -Kthread" - CCOPT="$CCOPT -Kthread" - ;; - esac - fi - cat >>confdefs.h <<\_ACEOF -#define _REENTRANT 1 -_ACEOF - - ALWAYS_DEFINES="-D_REENTRANT" - DO_PTHREADS="#define DO_PTHREADS 1" - WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}" - WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}" - case $host in - ia64-hp-hpux11.*) - WANT_IRS_THREADS_OBJS="";; - *) - WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";; - esac - WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}" - thread_dir=pthreads else ALWAYS_DEFINES="" DO_PTHREADS="#undef DO_PTHREADS" @@ -6403,7 +6869,65 @@ MKDEPCFLAGS="-M" IRIX_DNSSEC_WARNINGS_HACK="" if test "X$GCC" = "Xyes"; then - STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings" + echo "$as_me:$LINENO: checking if \"$CC\" supports -fno-strict-aliasing" >&5 +echo $ECHO_N "checking if \"$CC\" supports -fno-strict-aliasing... $ECHO_C" >&6 + SAVE_CFLAGS=$CFLAGS + CFLAGS=-fno-strict-aliasing + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + FNOSTRICTALIASING=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +FNOSTRICTALIASING=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$SAVE_CFLAGS + if test "$FNOSTRICTALIASING" = "yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith" + fi else case $host in *-dec-osf*) @@ -7602,7 +8126,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7605 "configure"' > conftest.$ac_ext + echo '#line 8129 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8599,7 +9123,7 @@ fi # Provide some information about the compiler. -echo "$as_me:8602:" \ +echo "$as_me:9126:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 @@ -9660,11 +10184,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9663: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10187: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9667: \$? = $ac_status" >&5 + echo "$as_me:10191: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -9903,11 +10427,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9906: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10430: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9910: \$? = $ac_status" >&5 + echo "$as_me:10434: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -9963,11 +10487,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9966: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10490: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9970: \$? = $ac_status" >&5 + echo "$as_me:10494: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12148,7 +12672,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 12151 "configure" +#line 12675 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12246,7 +12770,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 12249 "configure" +#line 12773 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12350,7 +12874,7 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi -# Report which librarie types wil actually be built +# Report which libraries types will actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 @@ -14443,11 +14967,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14446: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14970: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14450: \$? = $ac_status" >&5 + echo "$as_me:14974: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -14503,11 +15027,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14506: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15030: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14510: \$? = $ac_status" >&5 + echo "$as_me:15034: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15864,7 +16388,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 15867 "configure" +#line 16391 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15962,7 +16486,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 15965 "configure" +#line 16489 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16799,11 +17323,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16802: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17326: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16806: \$? = $ac_status" >&5 + echo "$as_me:17330: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -16859,11 +17383,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16862: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17386: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16866: \$? = $ac_status" >&5 + echo "$as_me:17390: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18898,11 +19422,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18901: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19425: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:18905: \$? = $ac_status" >&5 + echo "$as_me:19429: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -19141,11 +19665,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:19144: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19668: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:19148: \$? = $ac_status" >&5 + echo "$as_me:19672: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -19201,11 +19725,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:19204: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19728: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:19208: \$? = $ac_status" >&5 + echo "$as_me:19732: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -21386,7 +21910,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 21389 "configure" +#line 21913 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -21484,7 +22008,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 21487 "configure" +#line 22011 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -25803,6 +26327,62 @@ cat >>conftest.$ac_ext <<_ACEOF #undef __USE_MISC #define __USE_MISC #include <netdb.h> +int getnetbyaddr_r (in_addr_t, int, struct netent *, struct netent_data *); + +int +main () +{ +return (0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr" +NET_R_BAD="#define NET_R_BAD (-1)" +NET_R_COPY="#define NET_R_COPY ndptr" +NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr" +NET_R_OK="#define NET_R_OK 0" +NET_R_SETANSWER="#undef NET_R_SETANSWER" +NET_R_RETURN="#define NET_R_RETURN int" +GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long" +NETENT_DATA="#define NETENT_DATA 1" + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> int getnetbyaddr_r (long, int, struct netent *, struct netent_data *); int @@ -25922,6 +26502,9 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + else NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen" NET_R_BAD="#define NET_R_BAD NULL" @@ -28397,10 +28980,69 @@ fi echo "$as_me:$LINENO: result: $ac_cv_func_endnetgrent_r" >&5 echo "${ECHO_T}$ac_cv_func_endnetgrent_r" >&6 if test $ac_cv_func_endnetgrent_r = yes; then - NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) return (x)" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +void endnetgrent_r(void **ptr); + + +int +main () +{ +return (0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /* empty */" +NGR_R_END_RETURN="#define NGR_R_END_RETURN void" +NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS" + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) return (x)" NGR_R_END_RETURN="#define NGR_R_END_RETURN int" NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS" + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + else NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /*empty*/" NGR_R_END_RETURN="#define NGR_R_END_RETURN void" @@ -28777,6 +29419,7 @@ PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS" PROTO_R_OK="#define PROTO_R_OK pptr" PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER" PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *" +PROTOENT_DATA="#undef PROTOENT_DATA" else @@ -28836,6 +29479,67 @@ PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS char *buf, size_t buflen" PROTO_R_OK="#define PROTO_R_OK 0" PROTO_R_SETANSWER="#define PROTO_R_SETANSWER 1" PROTO_R_RETURN="#define PROTO_R_RETURN int" +PROTOENT_DATA="#undef PROTOENT_DATA" + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +int getprotoent_r (struct protoent *, struct protoent_data *prot_data); + + + +int +main () +{ +return (0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +PROTO_R_ARGS="#define PROTO_R_ARGS struct protoent_data *prot_data" +PROTO_R_BAD="#define PROTO_R_BAD (-1)" +PROTO_R_COPY="#define PROTO_R_COPY prot_data" +PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS struct protoent_data *pdptr" +PROTO_R_OK="#define PROTO_R_OK 0" +PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER" +PROTO_R_RETURN="#define PROTO_R_RETURN int" +PROTOENT_DATA="#define PROTOENT_DATA 1" else @@ -28848,6 +29552,9 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + else PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen" PROTO_R_BAD="#define PROTO_R_BAD NULL" @@ -28856,9 +29563,11 @@ PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS" PROTO_R_OK="#define PROTO_R_OK pptr" PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER" PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *" +PROTOENT_DATA="#undef PROTOENT_DATA" fi +;; esac @@ -28868,6 +29577,7 @@ esac + case $host in ia64-hp-hpux11.*) ;; @@ -29012,12 +29722,131 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/" PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void" PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS" +PROTO_R_ENT_UNUSED="#undef PROTO_R_ENT_UNUSED" + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +void endprotoent_r(struct protoent_data *); + + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/" +PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void" +PROTO_R_ENT_ARGS="#define PROTO_R_ENT_ARGS struct protoent_data *proto_data" +PROTO_R_ENT_UNUSED="#define PROTO_R_ENT_UNUSED UNUSED(proto_data)" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +int endprotoent_r(struct protoent_data *); + + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) return(0)" +PROTO_R_END_RETURN="#define PROTO_R_END_RETURN int" +PROTO_R_ENT_ARGS="#define PROTO_R_ENT_ARGS struct protoent_data *proto_data" +PROTO_R_ENT_UNUSED="#define PROTO_R_ENT_UNUSED UNUSED(proto_data)" + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext @@ -29025,6 +29854,7 @@ else PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/" PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void" PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS /*empty*/" +PROTO_R_ENT_UNUSED="#undef PROTO_R_ENT_UNUSED" fi @@ -29033,6 +29863,7 @@ esac + case $host in ia64-hp-hpux11.*) ;; @@ -29179,6 +30010,60 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +int setprotoent_r (int, struct protoent_data *); + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + PROTO_R_SET_RESULT="#define PROTO_R_SET_RESULT (0)" +PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN int" + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext @@ -30329,6 +31214,67 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +int +getservent_r (struct servent *, struct servent_data *serv_data); + +int +main () +{ +return (0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +SERV_R_ARGS="#define SERV_R_ARGS struct servent_data *serv_data" +SERV_R_BAD="#define SERV_R_BAD (-1)" +SERV_R_COPY="#define SERV_R_COPY serv_data" +SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS struct servent_data *sdptr" +SERV_R_OK="#define SERV_R_OK (0)" +SERV_R_SETANSWER="#undef SERV_R_SETANSWER" +SERV_R_RETURN="#define SERV_R_RETURN int" +SERVENT_DATA="#define SERVENT_DATA 1" + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext @@ -30355,6 +31301,7 @@ esac + case $host in ia64-hp-hpux11.*) ;; @@ -30499,6 +31446,119 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/" SERV_R_END_RETURN="#define SERV_R_END_RETURN void " SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/" +SERV_R_ENT_UNUSED="#undef SERV_R_ENT_UNUSED /*empty*/" + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +void endservent_r(struct servent_data *serv_data); + + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/" +SERV_R_END_RETURN="#define SERV_R_END_RETURN void " +SERV_R_ENT_ARGS="#define SERV_R_ENT_ARGS struct servent_data *serv_data" +SERV_R_ENT_UNUSED="#define SERV_R_ENT_UNUSED UNUSED(serv_data)" + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +int endservent_r(struct servent_data *serv_data); + + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) return(x)" +SERV_R_END_RETURN="#define SERV_R_END_RETURN int " +SERV_R_ENT_ARGS="#define SERV_R_ENT_ARGS struct servent_data *serv_data" +SERV_R_ENT_UNUSED="#define SERV_R_ENT_UNUSED UNUSED(serv_data)" else @@ -30508,10 +31568,17 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + else SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/" SERV_R_END_RETURN="#define SERV_R_END_RETURN void " SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/" +SERV_R_ENT_UNUSED="#undef SERV_R_ENT_UNUSED /*empty*/" fi @@ -30520,6 +31587,7 @@ esac + case $host in ia64-hp-hpux11.*) ;; @@ -30627,7 +31695,7 @@ cat >>conftest.$ac_ext <<_ACEOF #undef __USE_MISC #define __USE_MISC #include <netdb.h> -void setservent_r(int); +void setservent_r(int); int @@ -30669,6 +31737,63 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +int setservent_r(int, struct servent_data *); + + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +SERV_R_SET_RESULT="#define SERV_R_SET_RESULT (0)" +SERV_R_SET_RETURN="#define SERV_R_SET_RETURN int" + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext @@ -30921,6 +32046,9 @@ case "$host" in hack_shutup_pthreadmutexinit=yes hack_shutup_in6addr_init_macros=yes ;; + *-aix5.[23].*) + hack_shutup_in6addr_init_macros=yes + ;; *-bsdi3.1*) hack_shutup_sputaux=yes ;; @@ -30944,6 +32072,9 @@ case "$host" in *-solaris2.9) hack_shutup_in6addr_init_macros=yes ;; + *-solaris2.10) + hack_shutup_in6addr_init_macros=yes + ;; esac case "$hack_shutup_pthreadmutexinit" in @@ -30997,7 +32128,8 @@ esac case "$hack_shutup_in6addr_init_macros" in yes) - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define BROKEN_IN6ADDR_INIT_MACROS 1 _ACEOF @@ -31838,9 +32970,11 @@ s,@PROTO_R_COPY_ARGS@,$PROTO_R_COPY_ARGS,;t t s,@PROTO_R_OK@,$PROTO_R_OK,;t t s,@PROTO_R_SETANSWER@,$PROTO_R_SETANSWER,;t t s,@PROTO_R_RETURN@,$PROTO_R_RETURN,;t t +s,@PROTOENT_DATA@,$PROTOENT_DATA,;t t s,@PROTO_R_END_RESULT@,$PROTO_R_END_RESULT,;t t s,@PROTO_R_END_RETURN@,$PROTO_R_END_RETURN,;t t s,@PROTO_R_ENT_ARGS@,$PROTO_R_ENT_ARGS,;t t +s,@PROTO_R_ENT_UNUSED@,$PROTO_R_ENT_UNUSED,;t t s,@PROTO_R_SET_RESULT@,$PROTO_R_SET_RESULT,;t t s,@PROTO_R_SET_RETURN@,$PROTO_R_SET_RETURN,;t t s,@PASS_R_ARGS@,$PASS_R_ARGS,;t t @@ -31861,9 +32995,11 @@ s,@SERV_R_COPY_ARGS@,$SERV_R_COPY_ARGS,;t t s,@SERV_R_OK@,$SERV_R_OK,;t t s,@SERV_R_SETANSWER@,$SERV_R_SETANSWER,;t t s,@SERV_R_RETURN@,$SERV_R_RETURN,;t t +s,@SERVENT_DATA@,$SERVENT_DATA,;t t s,@SERV_R_END_RESULT@,$SERV_R_END_RESULT,;t t s,@SERV_R_END_RETURN@,$SERV_R_END_RETURN,;t t s,@SERV_R_ENT_ARGS@,$SERV_R_ENT_ARGS,;t t +s,@SERV_R_ENT_UNUSED@,$SERV_R_ENT_UNUSED,;t t s,@SERV_R_SET_RESULT@,$SERV_R_SET_RESULT,;t t s,@SERV_R_SET_RETURN@,$SERV_R_SET_RETURN,;t t s,@SETNETGRENT_ARGS@,$SETNETGRENT_ARGS,;t t diff --git a/contrib/bind9/lib/bind/configure.in b/contrib/bind9/lib/bind/configure.in index 50ffe82..9c2877c 100644 --- a/contrib/bind9/lib/bind/configure.in +++ b/contrib/bind9/lib/bind/configure.in @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2001 Internet Software Consortium. # # Permission to use, copy, modify, and distribute this software for any @@ -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.83.2.5.2.22 $) +AC_REVISION($Revision: 1.83.2.5.2.31 $) AC_INIT(resolv/herror.c) AC_PREREQ(2.13) @@ -319,16 +319,68 @@ sinclude(../../config.threads.in)dnl if $use_threads then + if test "X$GCC" = "Xyes"; then + case "$host" in + *-freebsd*) + CC="$CC -pthread" + CCOPT="$CCOPT -pthread" + STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" + ;; + *-openbsd*) + CC="$CC -pthread" + CCOPT="$CCOPT -pthread" + ;; + *-solaris*) + LIBS="$LIBS -lthread" + ;; + *-ibm-aix*) + STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" + ;; + esac + else + case $host in + *-dec-osf*) + CC="$CC -pthread" + CCOPT="$CCOPT -pthread" + ;; + *-solaris*) + CC="$CC -mt" + CCOPT="$CCOPT -mt" + ;; + *-ibm-aix*) + STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" + ;; + *-UnixWare*) + CC="$CC -Kthread" + CCOPT="$CCOPT -Kthread" + ;; + esac + fi + AC_DEFINE(_REENTRANT) + ALWAYS_DEFINES="-D_REENTRANT" + DO_PTHREADS="#define DO_PTHREADS 1" + WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}" + WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}" + case $host in + ia64-hp-hpux11.*) + WANT_IRS_THREADS_OBJS="";; + *) + WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";; + esac + WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}" + thread_dir=pthreads + # # We'd like to use sigwait() too # - AC_CHECK_LIB(c, sigwait, - AC_DEFINE(HAVE_SIGWAIT), - AC_CHECK_LIB(pthread, sigwait, - AC_DEFINE(HAVE_SIGWAIT), - AC_CHECK_LIB(pthread, _Psigwait, - AC_DEFINE(HAVE_SIGWAIT),)) - ) + AC_CHECK_FUNC(sigwait, + AC_DEFINE(HAVE_SIGWAIT), + AC_CHECK_LIB(c, sigwait, + AC_DEFINE(HAVE_SIGWAIT), + AC_CHECK_LIB(pthread, sigwait, + AC_DEFINE(HAVE_SIGWAIT), + AC_CHECK_LIB(pthread, _Psigwait, + AC_DEFINE(HAVE_SIGWAIT),)))) AC_CHECK_FUNC(pthread_attr_getstacksize, AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),) @@ -388,56 +440,6 @@ then # AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),) - if test "X$GCC" = "Xyes"; then - case "$host" in - *-freebsd*) - CC="$CC -pthread" - CCOPT="$CCOPT -pthread" - STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" - ;; - *-openbsd*) - CC="$CC -pthread" - CCOPT="$CCOPT -pthread" - ;; - *-solaris*) - LIBS="$LIBS -lthread" - ;; - *-ibm-aix*) - STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" - ;; - esac - else - case $host in - *-dec-osf*) - CC="$CC -pthread" - CCOPT="$CCOPT -pthread" - ;; - *-solaris*) - CC="$CC -mt" - CCOPT="$CCOPT -mt" - ;; - *-ibm-aix*) - STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" - ;; - *-UnixWare*) - CC="$CC -Kthread" - CCOPT="$CCOPT -Kthread" - ;; - esac - fi - AC_DEFINE(_REENTRANT) - ALWAYS_DEFINES="-D_REENTRANT" - DO_PTHREADS="#define DO_PTHREADS 1" - WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}" - WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}" - case $host in - ia64-hp-hpux11.*) - WANT_IRS_THREADS_OBJS="";; - *) - WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";; - esac - WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}" - thread_dir=pthreads else ALWAYS_DEFINES="" DO_PTHREADS="#undef DO_PTHREADS" @@ -513,7 +515,18 @@ MKDEPCFLAGS="-M" IRIX_DNSSEC_WARNINGS_HACK="" if test "X$GCC" = "Xyes"; then - STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings" + AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing) + SAVE_CFLAGS=$CFLAGS + CFLAGS=-fno-strict-aliasing + AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no]) + CFLAGS=$SAVE_CFLAGS + if test "$FNOSTRICTALIASING" = "yes"; then + AC_MSG_RESULT(yes) + STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing" + else + AC_MSG_RESULT(no) + STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith" + fi else case $host in *-dec-osf*) @@ -1397,6 +1410,24 @@ AC_TRY_COMPILE( #undef __USE_MISC #define __USE_MISC [#include <netdb.h> +int getnetbyaddr_r (in_addr_t, int, struct netent *, struct netent_data *); +], +[return (0)], +[ +NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr" +NET_R_BAD="#define NET_R_BAD (-1)" +NET_R_COPY="#define NET_R_COPY ndptr" +NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr" +NET_R_OK="#define NET_R_OK 0" +NET_R_SETANSWER="#undef NET_R_SETANSWER" +NET_R_RETURN="#define NET_R_RETURN int" +GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long" +NETENT_DATA="#define NETENT_DATA 1" +], +AC_TRY_COMPILE( +#undef __USE_MISC +#define __USE_MISC +[#include <netdb.h> int getnetbyaddr_r (long, int, struct netent *, struct netent_data *); ], [return (0)], @@ -1435,6 +1466,7 @@ NETENT_DATA="#undef NETENT_DATA" ) ) ) +) , NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen" NET_R_BAD="#define NET_R_BAD NULL" @@ -1901,9 +1933,28 @@ AC_SUBST(NGR_R_RETURN) AC_SUBST(NGR_R_PRIVATE) AC_CHECK_FUNC(endnetgrent_r, +AC_TRY_COMPILE( +[ +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +void endnetgrent_r(void **ptr); +] +, +[return (0);] +, +[ +NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /* empty */" +NGR_R_END_RETURN="#define NGR_R_END_RETURN void" +NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS" +] +, +[ NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) return (x)" NGR_R_END_RETURN="#define NGR_R_END_RETURN int" NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS" +] +) , NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /*empty*/" NGR_R_END_RETURN="#define NGR_R_END_RETURN void" @@ -1960,6 +2011,7 @@ PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS" PROTO_R_OK="#define PROTO_R_OK pptr" PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER" PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *" +PROTOENT_DATA="#undef PROTOENT_DATA" ] , AC_TRY_COMPILE( @@ -1981,10 +2033,34 @@ PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS char *buf, size_t buflen" PROTO_R_OK="#define PROTO_R_OK 0" PROTO_R_SETANSWER="#define PROTO_R_SETANSWER 1" PROTO_R_RETURN="#define PROTO_R_RETURN int" +PROTOENT_DATA="#undef PROTOENT_DATA" +] +, +AC_TRY_COMPILE( +[ +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +int getprotoent_r (struct protoent *, struct protoent_data *prot_data); + +] +, +[return (0);] +, +[ +PROTO_R_ARGS="#define PROTO_R_ARGS struct protoent_data *prot_data" +PROTO_R_BAD="#define PROTO_R_BAD (-1)" +PROTO_R_COPY="#define PROTO_R_COPY prot_data" +PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS struct protoent_data *pdptr" +PROTO_R_OK="#define PROTO_R_OK 0" +PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER" +PROTO_R_RETURN="#define PROTO_R_RETURN int" +PROTOENT_DATA="#define PROTOENT_DATA 1" ] , ) ) +) , PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen" PROTO_R_BAD="#define PROTO_R_BAD NULL" @@ -1993,7 +2069,9 @@ PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS" PROTO_R_OK="#define PROTO_R_OK pptr" PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER" PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *" +PROTOENT_DATA="#undef PROTOENT_DATA" ) +;; esac AC_SUBST(PROTO_R_ARGS) AC_SUBST(PROTO_R_BAD) @@ -2002,6 +2080,7 @@ AC_SUBST(PROTO_R_COPY_ARGS) AC_SUBST(PROTO_R_OK) AC_SUBST(PROTO_R_SETANSWER) AC_SUBST(PROTO_R_RETURN) +AC_SUBST(PROTOENT_DATA) case $host in ia64-hp-hpux11.*) @@ -2022,18 +2101,57 @@ void endprotoent_r(void); PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/" PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void" PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS" +PROTO_R_ENT_UNUSED="#undef PROTO_R_ENT_UNUSED" ] , +AC_TRY_COMPILE( +[ +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +void endprotoent_r(struct protoent_data *); +] +,, +[ +PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/" +PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void" +PROTO_R_ENT_ARGS="#define PROTO_R_ENT_ARGS struct protoent_data *proto_data" +PROTO_R_ENT_UNUSED="#define PROTO_R_ENT_UNUSED UNUSED(proto_data)" +] +, +AC_TRY_COMPILE( +[ +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +int endprotoent_r(struct protoent_data *); +] +,, +[ +PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) return(0)" +PROTO_R_END_RETURN="#define PROTO_R_END_RETURN int" +PROTO_R_ENT_ARGS="#define PROTO_R_ENT_ARGS struct protoent_data *proto_data" +PROTO_R_ENT_UNUSED="#define PROTO_R_ENT_UNUSED UNUSED(proto_data)" +] +, +) +) ) , PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/" PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void" PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS /*empty*/" +PROTO_R_ENT_UNUSED="#undef PROTO_R_ENT_UNUSED" ) esac AC_SUBST(PROTO_R_END_RESULT) AC_SUBST(PROTO_R_END_RETURN) AC_SUBST(PROTO_R_ENT_ARGS) +AC_SUBST(PROTO_R_ENT_UNUSED) case $host in ia64-hp-hpux11.*) @@ -2052,6 +2170,19 @@ void setprotoent_r __P((int)); PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT" PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void" , +AC_TRY_COMPILE( +[ +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +int setprotoent_r (int, struct protoent_data *); +],[], +PROTO_R_SET_RESULT="#define PROTO_R_SET_RESULT (0)" +PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN int" +, +) ) , PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT" @@ -2186,6 +2317,25 @@ SERV_R_SETANSWER="#define SERV_R_SETANSWER 1" SERV_R_RETURN="#define SERV_R_RETURN int" ] , +AC_TRY_COMPILE([ +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +int +getservent_r (struct servent *, struct servent_data *serv_data); +],[return (0);], +[ +SERV_R_ARGS="#define SERV_R_ARGS struct servent_data *serv_data" +SERV_R_BAD="#define SERV_R_BAD (-1)" +SERV_R_COPY="#define SERV_R_COPY serv_data" +SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS struct servent_data *sdptr" +SERV_R_OK="#define SERV_R_OK (0)" +SERV_R_SETANSWER="#undef SERV_R_SETANSWER" +SERV_R_RETURN="#define SERV_R_RETURN int" +SERVENT_DATA="#define SERVENT_DATA 1" +] +, +) ) ) , @@ -2205,6 +2355,7 @@ AC_SUBST(SERV_R_COPY_ARGS) AC_SUBST(SERV_R_OK) AC_SUBST(SERV_R_SETANSWER) AC_SUBST(SERV_R_RETURN) +AC_SUBST(SERVENT_DATA) case $host in ia64-hp-hpux11.*) @@ -2226,18 +2377,59 @@ void endservent_r(void); SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/" SERV_R_END_RETURN="#define SERV_R_END_RETURN void " SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/" +SERV_R_ENT_UNUSED="#undef SERV_R_ENT_UNUSED /*empty*/" +] +, +AC_TRY_COMPILE( +[ +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +void endservent_r(struct servent_data *serv_data); +] +, +, +[ +SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/" +SERV_R_END_RETURN="#define SERV_R_END_RETURN void " +SERV_R_ENT_ARGS="#define SERV_R_ENT_ARGS struct servent_data *serv_data" +SERV_R_ENT_UNUSED="#define SERV_R_ENT_UNUSED UNUSED(serv_data)" +] +, +AC_TRY_COMPILE( +[ +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +int endservent_r(struct servent_data *serv_data); +] +, +, +[ +SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) return(x)" +SERV_R_END_RETURN="#define SERV_R_END_RETURN int " +SERV_R_ENT_ARGS="#define SERV_R_ENT_ARGS struct servent_data *serv_data" +SERV_R_ENT_UNUSED="#define SERV_R_ENT_UNUSED UNUSED(serv_data)" ] , ) +) +) , SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/" SERV_R_END_RETURN="#define SERV_R_END_RETURN void " SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/" +SERV_R_ENT_UNUSED="#undef SERV_R_ENT_UNUSED /*empty*/" ) esac AC_SUBST(SERV_R_END_RESULT) AC_SUBST(SERV_R_END_RETURN) AC_SUBST(SERV_R_ENT_ARGS) +AC_SUBST(SERV_R_ENT_UNUSED) case $host in ia64-hp-hpux11.*) @@ -2251,7 +2443,7 @@ AC_TRY_COMPILE( #undef __USE_MISC #define __USE_MISC #include <netdb.h> -void setservent_r(int); +void setservent_r(int); ] ,, [ @@ -2259,6 +2451,22 @@ SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT" SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void" ] , +AC_TRY_COMPILE( +[ +#undef _REENTRANT +#define _REENTRANT +#undef __USE_MISC +#define __USE_MISC +#include <netdb.h> +int setservent_r(int, struct servent_data *); +] +,, +[ +SERV_R_SET_RESULT="#define SERV_R_SET_RESULT (0)" +SERV_R_SET_RETURN="#define SERV_R_SET_RETURN int" +] +, +) ) , SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT" @@ -2345,6 +2553,9 @@ case "$host" in hack_shutup_pthreadmutexinit=yes hack_shutup_in6addr_init_macros=yes ;; + *-aix5.[[23]].*) + hack_shutup_in6addr_init_macros=yes + ;; *-bsdi3.1*) hack_shutup_sputaux=yes ;; @@ -2368,6 +2579,9 @@ case "$host" in *-solaris2.9) hack_shutup_in6addr_init_macros=yes ;; + *-solaris2.10) + hack_shutup_in6addr_init_macros=yes + ;; esac case "$hack_shutup_pthreadmutexinit" in @@ -2409,7 +2623,7 @@ esac case "$hack_shutup_in6addr_init_macros" in yes) - AC_DEFINE(BROKEN_IN6ADDR_INIT_MACROS) + AC_DEFINE(BROKEN_IN6ADDR_INIT_MACROS, 1, [Defined if IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT need to be redefined.] ) ;; esac diff --git a/contrib/bind9/lib/bind/dst/dst_api.c b/contrib/bind9/lib/bind/dst/dst_api.c index 51dfd0b..417c31f 100644 --- a/contrib/bind9/lib/bind/dst/dst_api.c +++ b/contrib/bind9/lib/bind/dst/dst_api.c @@ -1,5 +1,5 @@ #ifndef LINT -static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/dst_api.c,v 1.4.2.6.8.3 2005/10/11 00:48:14 marka Exp $"; +static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/dst_api.c,v 1.4.2.6.8.4 2006/03/10 00:17:21 marka Exp $"; #endif /* @@ -170,6 +170,10 @@ dst_s_get_key_struct(const char *name, const int alg, const int flags, memset(new_key, 0, sizeof(*new_key)); new_key->dk_key_name = strdup(name); + if (new_key->dk_key_name == NULL) { + free(new_key); + return (NULL); + } new_key->dk_alg = alg; new_key->dk_flags = flags; new_key->dk_proto = protocol; @@ -655,11 +659,13 @@ dst_dnskey_to_key(const char *in_name, const u_char *rdata, const int len) alg)); return (NULL); } - if ((key_st = dst_s_get_key_struct(in_name, alg, 0, 0, 0)) == NULL) - return (NULL); if (in_name == NULL) return (NULL); + + if ((key_st = dst_s_get_key_struct(in_name, alg, 0, 0, 0)) == NULL) + return (NULL); + key_st->dk_id = dst_s_dns_key_id(rdata, len); key_st->dk_flags = dst_s_get_int16(rdata); key_st->dk_proto = (u_int16_t) rdata[DST_KEY_PROT]; @@ -772,13 +778,11 @@ dst_buffer_to_key(const char *key_name, /* name of the key */ return (NULL); } - dkey = dst_s_get_key_struct(key_name, alg, flags, - protocol, -1); + dkey = dst_s_get_key_struct(key_name, alg, flags, protocol, -1); - if (dkey == NULL) - return (NULL); - if (dkey->dk_func == NULL || dkey->dk_func->from_dns_key == NULL) - return NULL; + if (dkey == NULL || dkey->dk_func == NULL || + dkey->dk_func->from_dns_key == NULL) + return (dst_free_key(dkey)); if (dkey->dk_func->from_dns_key(dkey, key_buf, key_len) < 0) { EREPORT(("dst_buffer_to_key(): dst_buffer_to_hmac failed\n")); @@ -1013,7 +1017,6 @@ dst_free_key(DST_KEY *f_key) else { EREPORT(("dst_free_key(): Unknown key alg %d\n", f_key->dk_alg)); - free(f_key->dk_KEY_struct); /* SHOULD NOT happen */ } if (f_key->dk_KEY_struct) { free(f_key->dk_KEY_struct); diff --git a/contrib/bind9/lib/bind/dst/hmac_link.c b/contrib/bind9/lib/bind/dst/hmac_link.c index aa66c80..028f02e 100644 --- a/contrib/bind9/lib/bind/dst/hmac_link.c +++ b/contrib/bind9/lib/bind/dst/hmac_link.c @@ -1,6 +1,6 @@ #ifdef HMAC_MD5 #ifndef LINT -static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/hmac_link.c,v 1.2.2.1.4.1 2005/07/28 07:43:16 marka Exp $"; +static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/hmac_link.c,v 1.2.2.1.4.2 2006/03/10 00:17:21 marka Exp $"; #endif /* * Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc. @@ -93,6 +93,9 @@ dst_hmac_md5_sign(const int mode, DST_KEY *d_key, void **context, int sign_len = 0; MD5_CTX *ctx = NULL; + if (d_key == NULL || d_key->dk_KEY_struct == NULL) + return (-1); + if (mode & SIG_MODE_INIT) ctx = (MD5_CTX *) malloc(sizeof(*ctx)); else if (context) @@ -100,8 +103,6 @@ dst_hmac_md5_sign(const int mode, DST_KEY *d_key, void **context, if (ctx == NULL) return (-1); - if (d_key == NULL || d_key->dk_KEY_struct == NULL) - return (-1); key = (HMAC_Key *) d_key->dk_KEY_struct; if (mode & SIG_MODE_INIT) { @@ -160,6 +161,9 @@ dst_hmac_md5_verify(const int mode, DST_KEY *d_key, void **context, HMAC_Key *key; MD5_CTX *ctx = NULL; + if (d_key == NULL || d_key->dk_KEY_struct == NULL) + return (-1); + if (mode & SIG_MODE_INIT) ctx = (MD5_CTX *) malloc(sizeof(*ctx)); else if (context) @@ -167,9 +171,6 @@ dst_hmac_md5_verify(const int mode, DST_KEY *d_key, void **context, if (ctx == NULL) return (-1); - if (d_key == NULL || d_key->dk_KEY_struct == NULL) - return (-1); - key = (HMAC_Key *) d_key->dk_KEY_struct; if (mode & SIG_MODE_INIT) { MD5Init(ctx); @@ -272,7 +273,7 @@ dst_buffer_to_hmac_md5(DST_KEY *dkey, const u_char *key, const int keylen) static int dst_hmac_md5_key_to_file_format(const DST_KEY *dkey, char *buff, - const int buff_len) + const int buff_len) { char *bp; int len, b_len, i, key_len; @@ -289,7 +290,7 @@ dst_hmac_md5_key_to_file_format(const DST_KEY *dkey, char *buff, /* write file header */ sprintf(buff, key_file_fmt_str, KEY_FILE_FORMAT, KEY_HMAC_MD5, "HMAC"); - bp = (char *) strchr(buff, '\0'); + bp = buff + strlen(buff); b_len = buff_len - (bp - buff); memset(key, 0, HMAC_LEN); @@ -334,9 +335,9 @@ dst_hmac_md5_key_from_file_format(DST_KEY *dkey, const char *buff, { const char *p = buff, *eol; u_char key[HMAC_LEN+1]; /* b64_pton needs more than 64 bytes do decode - * it should probably be fixed rather than doing - * this - */ + * it should probably be fixed rather than doing + * this + */ u_char *tmp; int key_len, len; @@ -355,6 +356,8 @@ dst_hmac_md5_key_from_file_format(DST_KEY *dkey, const char *buff, return (-4); len = eol - p; tmp = malloc(len + 2); + if (tmp == NULL) + return (-5); memcpy(tmp, p, len); *(tmp + len) = 0x0; key_len = b64_pton((char *)tmp, key, HMAC_LEN+1); /* see above */ diff --git a/contrib/bind9/lib/bind/include/arpa/nameser_compat.h b/contrib/bind9/lib/bind/include/arpa/nameser_compat.h index 464f12e..4460261 100644 --- a/contrib/bind9/lib/bind/include/arpa/nameser_compat.h +++ b/contrib/bind9/lib/bind/include/arpa/nameser_compat.h @@ -32,7 +32,7 @@ /* * from nameser.h 8.1 (Berkeley) 6/2/93 - * $Id: nameser_compat.h,v 1.1.2.3.4.2 2004/07/01 04:43:41 marka Exp $ + * $Id: nameser_compat.h,v 1.1.2.3.4.3 2006/05/19 02:38:15 marka Exp $ */ #ifndef _ARPA_NAMESER_COMPAT_ @@ -52,8 +52,9 @@ #define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp)*/ #if defined(vax) || defined(ns32000) || defined(sun386) || defined(i386) || \ - defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \ - defined(__alpha__) || defined(__alpha) || \ + defined(__i386__) || defined(__i386) || defined(__amd64__) || \ + defined(__x86_64__) || defined(MIPSEL) || defined(_MIPSEL) || \ + defined(BIT_ZERO_ON_RIGHT) || defined(__alpha__) || defined(__alpha) || \ (defined(__Lynx__) && defined(__x86__)) #define BYTE_ORDER LITTLE_ENDIAN #endif diff --git a/contrib/bind9/lib/bind/include/isc/list.h b/contrib/bind9/lib/bind/include/isc/list.h index ad574ac..4e27eb1 100644 --- a/contrib/bind9/lib/bind/include/isc/list.h +++ b/contrib/bind9/lib/bind/include/isc/list.h @@ -66,12 +66,16 @@ INSIST(LINKED(elt, link));\ if ((elt)->link.next != NULL) \ (elt)->link.next->link.prev = (elt)->link.prev; \ - else \ + else { \ + INSIST((list).tail == (elt)); \ (list).tail = (elt)->link.prev; \ + } \ if ((elt)->link.prev != NULL) \ (elt)->link.prev->link.next = (elt)->link.next; \ - else \ + else { \ + INSIST((list).head == (elt)); \ (list).head = (elt)->link.next; \ + } \ INIT_LINK_TYPE(elt, link, type); \ } while (0) #define UNLINK(list, elt, link) \ diff --git a/contrib/bind9/lib/bind/include/netdb.h b/contrib/bind9/lib/bind/include/netdb.h index 48a3829..11ee8a5 100644 --- a/contrib/bind9/lib/bind/include/netdb.h +++ b/contrib/bind9/lib/bind/include/netdb.h @@ -86,7 +86,7 @@ /* * @(#)netdb.h 8.1 (Berkeley) 6/2/93 - * $Id: netdb.h,v 1.12.2.1.4.5 2004/11/30 01:15:42 marka Exp $ + * $Id: netdb.h,v 1.12.2.1.4.9 2006/10/02 01:20:30 marka Exp $ */ #ifndef _NETDB_H_ @@ -175,7 +175,7 @@ struct addrinfo { int ai_socktype; /* SOCK_xxx */ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ #if defined(sun) && defined(_SOCKLEN_T) -#ifdef __sparc9 +#ifdef __sparcv9 int _ai_pad; #endif socklen_t ai_addrlen; @@ -291,7 +291,7 @@ struct hostent_data { struct netent_data { FILE *net_fp; -#ifdef __osf__ +#if defined(__osf__) || defined(_AIX) char line[_MAXLINELEN]; #endif #ifdef __hpux @@ -308,10 +308,21 @@ struct netent_data { char *current; int currentlen; #endif +#ifdef _AIX + int _net_stayopen; + char *current; + int currentlen; + void *_net_reserv1; /* reserved for future use */ + void *_net_reserv2; /* reserved for future use */ +#endif }; struct protoent_data { FILE *proto_fp; +#ifdef _AIX + int _proto_stayopen; + char line[_MAXLINELEN]; +#endif #ifdef __osf__ char line[1024]; #endif @@ -329,11 +340,17 @@ struct protoent_data { char *current; int currentlen; #endif +#ifdef _AIX + int currentlen; + char *current; + void *_proto_reserv1; /* reserved for future use */ + void *_proto_reserv2; /* reserved for future use */ +#endif }; struct servent_data { FILE *serv_fp; -#ifdef __osf__ +#if defined(__osf__) || defined(_AIX) char line[_MAXLINELEN]; #endif #ifdef __hpux @@ -350,6 +367,13 @@ struct servent_data { char *current; int currentlen; #endif +#ifdef _AIX + int _serv_stayopen; + char *current; + int currentlen; + void *_serv_reserv1; /* reserved for future use */ + void *_serv_reserv2; /* reserved for future use */ +#endif }; #endif #endif @@ -457,9 +481,19 @@ int endservent_r __P((struct servent_data *)); #else void endservent_r __P((struct servent_data *)); #endif +#ifdef _AIX +int setnetgrent_r __P((const char *, void **)); +void endnetgrent_r __P((void **)); +/* + * Note: AIX's netdb.h declares innetgr_r() as: + * int innetgr_r(char *, char *, char *, char *, struct innetgr_data *); + */ +int innetgr_r __P((const char *, const char *, const char *, + const char *)); +#endif #else /* defined(sun) || defined(bsdi) */ -#ifdef __GLIBC__ +#if defined(__GLIBC__) || defined(__FreeBSD__) && (__FreeBSD_version + 0 >= 601103) int gethostbyaddr_r __P((const char *, int, int, struct hostent *, char *, size_t, struct hostent **, int *)); int gethostbyname_r __P((const char *, struct hostent *, @@ -476,7 +510,7 @@ struct hostent *gethostent_r __P((struct hostent *, char *, int, int *)); void sethostent_r __P((int)); void endhostent_r __P((void)); -#ifdef __GLIBC__ +#if defined(__GLIBC__) || defined(__FreeBSD__) && (__FreeBSD_version + 0 >= 601103) int getnetbyname_r __P((const char *, struct netent *, char *, size_t, struct netent **, int*)); int getnetbyaddr_r __P((unsigned long int, int, struct netent *, @@ -492,7 +526,7 @@ struct netent *getnetent_r __P((struct netent *, char *, int)); void setnetent_r __P((int)); void endnetent_r __P((void)); -#ifdef __GLIBC__ +#if defined(__GLIBC__) || defined(__FreeBSD__) && (__FreeBSD_version + 0 >= 601103) int getprotobyname_r __P((const char *, struct protoent *, char *, size_t, struct protoent **)); int getprotobynumber_r __P((int, struct protoent *, char *, size_t, @@ -508,7 +542,7 @@ struct protoent *getprotoent_r __P((struct protoent *, char *, int)); void setprotoent_r __P((int)); void endprotoent_r __P((void)); -#ifdef __GLIBC__ +#if defined(__GLIBC__) || defined(__FreeBSD__) && (__FreeBSD_version + 0 >= 601103) int getservbyname_r __P((const char *name, const char *, struct servent *, char *, size_t, struct servent **)); int getservbyport_r __P((int port, const char *, @@ -527,9 +561,6 @@ void endservent_r __P((void)); #ifdef __GLIBC__ int getnetgrent_r __P((char **, char **, char **, char *, size_t)); #endif -#ifdef _AIX -int setnetgrent_r __P((char *, void **)); -#endif #endif #endif diff --git a/contrib/bind9/lib/bind/inet/inet_cidr_ntop.c b/contrib/bind9/lib/bind/inet/inet_cidr_ntop.c index 192cf1e..b25dc82 100644 --- a/contrib/bind9/lib/bind/inet/inet_cidr_ntop.c +++ b/contrib/bind9/lib/bind/inet/inet_cidr_ntop.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_cidr_ntop.c,v 1.1.2.1.8.3 2005/11/03 23:08:40 marka Exp $"; +static const char rcsid[] = "$Id: inet_cidr_ntop.c,v 1.1.2.1.8.4 2006/10/11 02:32:50 marka Exp $"; #endif #include "port_before.h" @@ -40,10 +40,10 @@ static const char rcsid[] = "$Id: inet_cidr_ntop.c,v 1.1.2.1.8.3 2005/11/03 23:0 # define SPRINTF(x) ((size_t)sprintf x) #endif -static char * inet_cidr_ntop_ipv4 __P((const u_char *src, int bits, - char *dst, size_t size)); -static char * inet_cidr_ntop_ipv6 __P((const u_char *src, int bits, - char *dst, size_t size)); +static char * +inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size); +static char * +inet_cidr_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size); /* * char * diff --git a/contrib/bind9/lib/bind/inet/inet_net_ntop.c b/contrib/bind9/lib/bind/inet/inet_net_ntop.c index f508629..47af6284e 100644 --- a/contrib/bind9/lib/bind/inet/inet_net_ntop.c +++ b/contrib/bind9/lib/bind/inet/inet_net_ntop.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.1.2.1.8.1 2004/03/09 08:33:32 marka Exp $"; +static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.1.2.1.8.2 2006/06/20 02:53:07 marka Exp $"; #endif #include "port_before.h" @@ -264,7 +264,7 @@ inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size) { } } /* Format CIDR /width. */ - SPRINTF((cp, "/%u", bits)); + sprintf(cp, "/%u", bits); if (strlen(outbuf) + 1 > size) goto emsgsize; strcpy(dst, outbuf); diff --git a/contrib/bind9/lib/bind/irs/dns.c b/contrib/bind9/lib/bind/irs/dns.c index ab83b3e..27529b5 100644 --- a/contrib/bind9/lib/bind/irs/dns.c +++ b/contrib/bind9/lib/bind/irs/dns.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: dns.c,v 1.1.206.2 2004/03/17 00:29:47 marka Exp $"; +static const char rcsid[] = "$Id: dns.c,v 1.1.206.3 2006/03/10 00:17:21 marka Exp $"; #endif /* @@ -114,7 +114,7 @@ dns_res_get(struct irs_acc *this) { res = (struct __res_state *)malloc(sizeof *res); if (res == NULL) return (NULL); - memset(dns->res, 0, sizeof *dns->res); + memset(res, 0, sizeof *res); dns_res_set(this, res, free); } diff --git a/contrib/bind9/lib/bind/irs/dns_ho.c b/contrib/bind9/lib/bind/irs/dns_ho.c index e8da61a..192be04 100644 --- a/contrib/bind9/lib/bind/irs/dns_ho.c +++ b/contrib/bind9/lib/bind/irs/dns_ho.c @@ -52,7 +52,7 @@ /* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.7.4.6 2005/10/11 00:48:14 marka Exp $"; +static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.7.4.8 2006/03/10 00:17:21 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* Imports. */ @@ -218,8 +218,7 @@ ho_close(struct irs_ho *this) { ho_minimize(this); if (pvt->res && pvt->free_res) (*pvt->free_res)(pvt->res); - if (pvt) - memput(pvt, sizeof *pvt); + memput(pvt, sizeof *pvt); memput(this, sizeof *this); } @@ -260,7 +259,7 @@ ho_byname2(struct irs_ho *this, const char *name, int af) errno = ENOMEM; goto cleanup; } - memset(q, 0, sizeof(q)); + memset(q, 0, sizeof(*q)); switch (af) { case AF_INET: @@ -352,8 +351,8 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af) errno = ENOMEM; goto cleanup; } - memset(q, 0, sizeof(q)); - memset(q2, 0, sizeof(q2)); + memset(q, 0, sizeof(*q)); + memset(q2, 0, sizeof(*q2)); if (af == AF_INET6 && len == IN6ADDRSZ && (!memcmp(uaddr, mapped, sizeof mapped) || @@ -578,8 +577,8 @@ ho_addrinfo(struct irs_ho *this, const char *name, const struct addrinfo *pai) errno = ENOMEM; goto cleanup; } - memset(q, 0, sizeof(q2)); - memset(q2, 0, sizeof(q2)); + memset(q, 0, sizeof(*q2)); + memset(q2, 0, sizeof(*q2)); switch (pai->ai_family) { case AF_UNSPEC: @@ -649,10 +648,9 @@ ho_addrinfo(struct irs_ho *this, const char *name, const struct addrinfo *pai) if (ai) { querystate = RESQRY_SUCCESS; cur->ai_next = ai; - while (cur && cur->ai_next) + while (cur->ai_next) cur = cur->ai_next; - } - else + } else querystate = RESQRY_FAIL; } @@ -948,7 +946,7 @@ gethostans(struct irs_ho *this, continue; } if (ret_aip) { /* need addrinfo. keep it. */ - while (cur && cur->ai_next) + while (cur->ai_next) cur = cur->ai_next; } else if (cur->ai_next) { /* need hostent */ struct addrinfo *aip = cur->ai_next; diff --git a/contrib/bind9/lib/bind/irs/gai_strerror.c b/contrib/bind9/lib/bind/irs/gai_strerror.c index 6aeaaa1..0492f8f 100644 --- a/contrib/bind9/lib/bind/irs/gai_strerror.c +++ b/contrib/bind9/lib/bind/irs/gai_strerror.c @@ -66,18 +66,26 @@ gai_strerror(int ecode) { #ifdef DO_PTHREADS if (!once) { - pthread_mutex_lock(&lock); - if (!once++) - pthread_key_create(&key, free); - pthread_mutex_unlock(&lock); + if (pthread_mutex_lock(&lock) != 0) + goto unknown; + if (!once) { + if (pthread_key_create(&key, free) != 0) + goto unknown; + once = 1; + } + if (pthread_mutex_unlock(&lock) != 0) + goto unknown; } buf = pthread_getspecific(key); if (buf == NULL) { buf = malloc(EAI_BUFSIZE); if (buf == NULL) - return ("unknown error"); - pthread_setspecific(key, buf); + goto unknown; + if (pthread_setspecific(key, buf) != 0) { + free(buf); + goto unknown; + } } #endif /* @@ -86,4 +94,9 @@ gai_strerror(int ecode) { */ sprintf(buf, "%s: %d", gai_errlist[gai_nerr - 1], ecode); return (buf); + +#ifdef DO_PTHREADS + unknown: + return ("unknown error"); +#endif } diff --git a/contrib/bind9/lib/bind/irs/gen_ho.c b/contrib/bind9/lib/bind/irs/gen_ho.c index e9e2c89..f17aa22 100644 --- a/contrib/bind9/lib/bind/irs/gen_ho.c +++ b/contrib/bind9/lib/bind/irs/gen_ho.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: gen_ho.c,v 1.1.206.2 2004/03/17 01:49:39 marka Exp $"; +static const char rcsid[] = "$Id: gen_ho.c,v 1.1.206.3 2006/03/10 00:17:21 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* Imports */ @@ -371,8 +371,6 @@ ho_addrinfo(struct irs_ho *this, const char *name, const struct addrinfo *pai) } if (softerror != 0 && pvt->res->res_h_errno == HOST_NOT_FOUND) RES_SET_H_ERRNO(pvt->res, therrno); - if (rval) - freeaddrinfo(rval); return (NULL); } diff --git a/contrib/bind9/lib/bind/irs/getaddrinfo.c b/contrib/bind9/lib/bind/irs/getaddrinfo.c index d80f298..c8d1ab3 100644 --- a/contrib/bind9/lib/bind/irs/getaddrinfo.c +++ b/contrib/bind9/lib/bind/irs/getaddrinfo.c @@ -245,7 +245,7 @@ do { \ } while (/*CONSTCOND*/0) #ifndef SOLARIS2 -#define ERR(err) \ +#define SETERROR(err) \ do { \ /* external reference: error, and label bad */ \ error = (err); \ @@ -253,7 +253,7 @@ do { \ /*NOTREACHED*/ \ } while (/*CONSTCOND*/0) #else -#define ERR(err) \ +#define SETERROR(err) \ do { \ /* external reference: error, and label bad */ \ error = (err); \ @@ -352,16 +352,16 @@ getaddrinfo(hostname, servname, hints, res) /* error check for hints */ if (hints->ai_addrlen || hints->ai_canonname || hints->ai_addr || hints->ai_next) - ERR(EAI_BADHINTS); /* xxx */ + SETERROR(EAI_BADHINTS); /* xxx */ if (hints->ai_flags & ~AI_MASK) - ERR(EAI_BADFLAGS); + SETERROR(EAI_BADFLAGS); switch (hints->ai_family) { case PF_UNSPEC: case PF_INET: case PF_INET6: break; default: - ERR(EAI_FAMILY); + SETERROR(EAI_FAMILY); } memcpy(pai, hints, sizeof(*pai)); @@ -386,7 +386,7 @@ getaddrinfo(hostname, servname, hints, res) continue; if (pai->ai_socktype == ex->e_socktype && pai->ai_protocol != ex->e_protocol) { - ERR(EAI_BADHINTS); + SETERROR(EAI_BADHINTS); } } } @@ -406,7 +406,7 @@ getaddrinfo(hostname, servname, hints, res) case AI_ALL: #if 1 /* illegal */ - ERR(EAI_BADFLAGS); + SETERROR(EAI_BADFLAGS); #else pai->ai_flags &= ~(AI_ALL | AI_V4MAPPED); break; @@ -434,7 +434,7 @@ getaddrinfo(hostname, servname, hints, res) } error = get_portmatch(pai, servname); if (error) - ERR(error); + SETERROR(error); *pai = ai0; } @@ -493,9 +493,9 @@ getaddrinfo(hostname, servname, hints, res) goto good; if (pai->ai_flags & AI_NUMERICHOST) - ERR(EAI_NONAME); + SETERROR(EAI_NONAME); if (hostname == NULL) - ERR(EAI_NONAME); + SETERROR(EAI_NONAME); /* * hostname as alphabetical name. @@ -576,10 +576,6 @@ getaddrinfo(hostname, servname, hints, res) freeaddrinfo(afai); /* afai must not be NULL at this point. */ - /* we must not have got any errors. */ - if (error != 0) /* just for diagnosis */ - abort(); - if (sentinel.ai_next) { good: *res = sentinel.ai_next; @@ -804,10 +800,10 @@ explore_numeric(pai, hostname, servname, res) pai->ai_family == PF_UNSPEC /*?*/) { GET_AI(cur->ai_next, afd, pton); GET_PORT(cur->ai_next, servname); - while (cur && cur->ai_next) + while (cur->ai_next) cur = cur->ai_next; } else - ERR(EAI_FAMILY); /*xxx*/ + SETERROR(EAI_FAMILY); /*xxx*/ } break; #endif @@ -817,10 +813,10 @@ explore_numeric(pai, hostname, servname, res) pai->ai_family == PF_UNSPEC /*?*/) { GET_AI(cur->ai_next, afd, pton); GET_PORT(cur->ai_next, servname); - while (cur && cur->ai_next) + while (cur->ai_next) cur = cur->ai_next; } else - ERR(EAI_FAMILY); /*xxx*/ + SETERROR(EAI_FAMILY); /*xxx*/ } break; } @@ -1202,7 +1198,7 @@ hostent2addrinfo(hp, pai) */ GET_CANONNAME(cur->ai_next, hp->h_name); } - while (cur && cur->ai_next) /* no need to loop, actually. */ + while (cur->ai_next) /* no need to loop, actually. */ cur = cur->ai_next; continue; diff --git a/contrib/bind9/lib/bind/irs/gethostent.c b/contrib/bind9/lib/bind/irs/gethostent.c index b471c52..cfea501 100644 --- a/contrib/bind9/lib/bind/irs/gethostent.c +++ b/contrib/bind9/lib/bind/irs/gethostent.c @@ -16,7 +16,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: gethostent.c,v 1.1.2.2.4.2 2004/03/17 01:49:40 marka Exp $"; +static const char rcsid[] = "$Id: gethostent.c,v 1.1.2.2.4.3 2006/01/10 05:09:16 marka Exp $"; #endif /* Imports */ @@ -608,7 +608,7 @@ scan_interfaces6(int *have_v4, int *have_v6) { } #endif -#ifdef __linux +#if ( defined(__linux__) || defined(__linux) || defined(LINUX) ) #ifndef IF_NAMESIZE # ifdef IFNAMSIZ # define IF_NAMESIZE IFNAMSIZ diff --git a/contrib/bind9/lib/bind/irs/getnameinfo.c b/contrib/bind9/lib/bind/irs/getnameinfo.c index 5947c03..d6d89f3 100644 --- a/contrib/bind9/lib/bind/irs/getnameinfo.c +++ b/contrib/bind9/lib/bind/irs/getnameinfo.c @@ -3,6 +3,16 @@ * - Thread safe-ness must be checked */ +#if ( defined(__linux__) || defined(__linux) || defined(LINUX) ) +#ifndef IF_NAMESIZE +# ifdef IFNAMSIZ +# define IF_NAMESIZE IFNAMSIZ +# else +# define IF_NAMESIZE 16 +# endif +#endif +#endif + /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. diff --git a/contrib/bind9/lib/bind/irs/getprotoent_r.c b/contrib/bind9/lib/bind/irs/getprotoent_r.c index 96bb4e3..58d0ec9 100644 --- a/contrib/bind9/lib/bind/irs/getprotoent_r.c +++ b/contrib/bind9/lib/bind/irs/getprotoent_r.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: getprotoent_r.c,v 1.3.206.1 2004/03/09 08:33:36 marka Exp $"; +static const char rcsid[] = "$Id: getprotoent_r.c,v 1.3.206.2 2006/08/01 01:19:28 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include <port_before.h> @@ -109,6 +109,9 @@ setprotoent_r(int stay_open, PROTO_R_ENT_ARGS) setprotoent_r(int stay_open) #endif { +#ifdef PROTO_R_ENT_UNUSED + PROTO_R_ENT_UNUSED; +#endif setprotoent(stay_open); #ifdef PROTO_R_SET_RESULT return (PROTO_R_SET_RESULT); @@ -122,6 +125,9 @@ endprotoent_r(PROTO_R_ENT_ARGS) endprotoent_r() #endif { +#ifdef PROTO_R_ENT_UNUSED + PROTO_R_ENT_UNUSED; +#endif endprotoent(); PROTO_R_END_RESULT(PROTO_R_OK); } diff --git a/contrib/bind9/lib/bind/irs/getservent_r.c b/contrib/bind9/lib/bind/irs/getservent_r.c index b24f468..6dd7034 100644 --- a/contrib/bind9/lib/bind/irs/getservent_r.c +++ b/contrib/bind9/lib/bind/irs/getservent_r.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: getservent_r.c,v 1.3.206.1 2004/03/09 08:33:36 marka Exp $"; +static const char rcsid[] = "$Id: getservent_r.c,v 1.3.206.2 2006/08/01 01:19:28 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include <port_before.h> @@ -112,7 +112,9 @@ setservent_r(int stay_open, SERV_R_ENT_ARGS) setservent_r(int stay_open) #endif { - +#ifdef SERV_R_ENT_UNUSED + SERV_R_ENT_UNUSED; +#endif setservent(stay_open); #ifdef SERV_R_SET_RESULT return (SERV_R_SET_RESULT); @@ -126,7 +128,9 @@ endservent_r(SERV_R_ENT_ARGS) endservent_r() #endif { - +#ifdef SERV_R_ENT_UNUSED + SERV_R_ENT_UNUSED; +#endif endservent(); SERV_R_END_RESULT(SERV_R_OK); } @@ -194,8 +198,8 @@ copy_servent(struct servent *se, struct servent *sptr, SERV_R_COPY_ARGS) { sptr->s_port = se->s_port; /* copy official name */ - cp = ndptr->line; - eob = ndptr->line + sizeof(ndptr->line); + cp = sdptr->line; + eob = sdptr->line + sizeof(sdptr->line); if ((n = strlen(se->s_name) + 1) < (eob - cp)) { strcpy(cp, se->s_name); sptr->s_name = cp; @@ -206,7 +210,7 @@ copy_servent(struct servent *se, struct servent *sptr, SERV_R_COPY_ARGS) { /* copy aliases */ i = 0; - sptr->s_aliases = ndptr->serv_aliases; + sptr->s_aliases = sdptr->serv_aliases; while (se->s_aliases[i] && i < (_MAXALIASES-1)) { if ((n = strlen(se->s_aliases[i]) + 1) < (eob - cp)) { strcpy(cp, se->s_aliases[i]); diff --git a/contrib/bind9/lib/bind/irs/irp.c b/contrib/bind9/lib/bind/irs/irp.c index e5620db..649079c 100644 --- a/contrib/bind9/lib/bind/irs/irp.c +++ b/contrib/bind9/lib/bind/irs/irp.c @@ -16,7 +16,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: irp.c,v 1.3.2.1.10.2 2004/03/17 01:49:41 marka Exp $"; +static const char rcsid[] = "$Id: irp.c,v 1.3.2.1.10.4 2006/03/10 00:17:21 marka Exp $"; #endif /* Imports */ @@ -425,6 +425,9 @@ irs_irp_read_body(struct irp_p *pvt, size_t *size) { char *buffer = memget(len); int idx = 0; + if (buffer == NULL) + return (NULL); + for (;;) { if (irs_irp_read_line(pvt, line, sizeof line) <= 0 || strchr(line, '\n') == NULL) @@ -517,7 +520,7 @@ irs_irp_get_full_response(struct irp_p *pvt, int *code, char *text, * int irs_irp_send_command(struct irp_p *pvt, const char *fmt, ...); * * Sends command to remote connected via the PVT - * struture. FMT and args after it are fprintf-like + * structure. FMT and args after it are fprintf-like * arguments for formatting. * * Returns: diff --git a/contrib/bind9/lib/bind/irs/irp_nw.c b/contrib/bind9/lib/bind/irs/irp_nw.c index 346e5a4..ea68612 100644 --- a/contrib/bind9/lib/bind/irs/irp_nw.c +++ b/contrib/bind9/lib/bind/irs/irp_nw.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: irp_nw.c,v 1.1.206.1 2004/03/09 08:33:37 marka Exp $"; +static const char rcsid[] = "$Id: irp_nw.c,v 1.1.206.2 2006/03/10 00:17:21 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #if 0 @@ -319,6 +319,8 @@ nw_next(struct irs_nw *this) { nw = NULL; } + if (body != NULL) + memput(body, bodylen); return (nw); } diff --git a/contrib/bind9/lib/bind/irs/irpmarshall.c b/contrib/bind9/lib/bind/irs/irpmarshall.c index 6d2ebd4..198e349 100644 --- a/contrib/bind9/lib/bind/irs/irpmarshall.c +++ b/contrib/bind9/lib/bind/irs/irpmarshall.c @@ -49,7 +49,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: irpmarshall.c,v 1.3.206.3 2004/03/17 01:13:34 marka Exp $"; +static const char rcsid[] = "$Id: irpmarshall.c,v 1.3.206.4 2006/03/10 00:17:21 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #if 0 @@ -1020,7 +1020,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) { int hoaddrtype; int holength; long t; - char *name = NULL; + char *name; char **aliases = NULL; char **hohaddrlist = NULL; size_t hoaddrsize; @@ -1143,6 +1143,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) { errno = myerrno; if (name != NULL) free(name); + free_array(hohaddrlist, 0); free_array(aliases, 0); return (-1); @@ -1313,7 +1314,6 @@ irp_unmarshall_ng(const char **hostp, const char **userp, const char **domainp, if (host != NULL) free(host); if (user != NULL) free(user); - if (domain != NULL) free(domain); return (-1); } diff --git a/contrib/bind9/lib/bind/irs/irs_data.c b/contrib/bind9/lib/bind/irs/irs_data.c index f8e65ad..7904286 100644 --- a/contrib/bind9/lib/bind/irs/irs_data.c +++ b/contrib/bind9/lib/bind/irs/irs_data.c @@ -16,7 +16,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: irs_data.c,v 1.3.2.2.4.3 2004/11/30 01:15:43 marka Exp $"; +static const char rcsid[] = "$Id: irs_data.c,v 1.3.2.2.4.4 2006/03/10 00:17:21 marka Exp $"; #endif #include "port_before.h" @@ -128,10 +128,15 @@ net_data_init(const char *conf_file) { struct net_data *net_data; if (!once) { - pthread_mutex_lock(&keylock); - if (!once++) - pthread_key_create(&key, net_data_destroy); - pthread_mutex_unlock(&keylock); + if (pthread_mutex_lock(&keylock) != 0) + return (NULL); + if (!once) { + if (pthread_key_create(&key, net_data_destroy) != 0) + return (NULL); + once = 1; + } + if (pthread_mutex_unlock(&keylock) != 0) + return (NULL); } net_data = pthread_getspecific(key); #endif @@ -141,7 +146,10 @@ net_data_init(const char *conf_file) { if (net_data == NULL) return (NULL); #ifdef DO_PTHREADS - pthread_setspecific(key, net_data); + if (pthread_setspecific(key, net_data) != 0) { + net_data_destroy(net_data); + return (NULL); + } #endif } diff --git a/contrib/bind9/lib/bind/irs/lcl_ho.c b/contrib/bind9/lib/bind/irs/lcl_ho.c index 45d2677..b59a104 100644 --- a/contrib/bind9/lib/bind/irs/lcl_ho.c +++ b/contrib/bind9/lib/bind/irs/lcl_ho.c @@ -52,7 +52,7 @@ /* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: lcl_ho.c,v 1.1.206.2 2004/03/17 00:29:50 marka Exp $"; +static const char rcsid[] = "$Id: lcl_ho.c,v 1.1.206.3 2006/03/10 00:17:21 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* Imports. */ @@ -541,7 +541,7 @@ ho_addrinfo(struct irs_ho *this, const char *name, const struct addrinfo *pai) ai = hostent2addrinfo(hp, pai); if (ai) { cur->ai_next = ai; - while (cur && cur->ai_next) + while (cur->ai_next) cur = cur->ai_next; } } diff --git a/contrib/bind9/lib/bind/irs/lcl_pr.c b/contrib/bind9/lib/bind/irs/lcl_pr.c index d8f909e..ddc92c8 100644 --- a/contrib/bind9/lib/bind/irs/lcl_pr.c +++ b/contrib/bind9/lib/bind/irs/lcl_pr.c @@ -49,7 +49,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: lcl_pr.c,v 1.1.206.1 2004/03/09 08:33:38 marka Exp $"; +static const char rcsid[] = "$Id: lcl_pr.c,v 1.1.206.2 2006/03/10 00:17:21 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* extern */ @@ -85,6 +85,7 @@ static const char rcsid[] = "$Id: lcl_pr.c,v 1.1.206.1 2004/03/09 08:33:38 marka struct pvt { FILE * fp; char line[BUFSIZ+1]; + char * dbuf; struct protoent proto; char * proto_aliases[MAXALIASES]; }; @@ -141,6 +142,8 @@ pr_close(struct irs_pr *this) { if (pvt->fp) (void) fclose(pvt->fp); + if (pvt->dbuf) + free(pvt->dbuf); memput(pvt, sizeof *pvt); memput(this, sizeof *this); } @@ -202,6 +205,10 @@ pr_next(struct irs_pr *this) { pr_rewind(this); if (!pvt->fp) return (NULL); + if (pvt->dbuf) { + free(pvt->dbuf); + pvt->dbuf = NULL; + } bufp = pvt->line; bufsiz = BUFSIZ; offset = 0; @@ -270,6 +277,7 @@ pr_next(struct irs_pr *this) { } } *q = NULL; + pvt->dbuf = dbuf; return (&pvt->proto); } diff --git a/contrib/bind9/lib/bind/isc/ev_connects.c b/contrib/bind9/lib/bind/isc/ev_connects.c index 4b0dd22..b3873b7 100644 --- a/contrib/bind9/lib/bind/isc/ev_connects.c +++ b/contrib/bind9/lib/bind/isc/ev_connects.c @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: ev_connects.c,v 1.4.206.2 2005/07/08 04:52:54 marka Exp $"; +static const char rcsid[] = "$Id: ev_connects.c,v 1.4.206.3 2006/03/10 00:17:21 marka Exp $"; #endif /* Import. */ @@ -69,7 +69,7 @@ evListen(evContext opaqueCtx, int fd, int maxconn, OKNEW(new); new->flags = EV_CONN_LISTEN; - OK(mode = fcntl(fd, F_GETFL, NULL)); /* side effect: validate fd. */ + OKFREE(mode = fcntl(fd, F_GETFL, NULL), new); /* side effect: validate fd. */ /* * Remember the nonblocking status. We assume that either evSelectFD * has not been done to this fd, or that if it has then the caller @@ -80,13 +80,13 @@ evListen(evContext opaqueCtx, int fd, int maxconn, if ((mode & PORT_NONBLOCK) == 0) { #ifdef USE_FIONBIO_IOCTL int on = 1; - OK(ioctl(fd, FIONBIO, (char *)&on)); + OKFREE(ioctl(fd, FIONBIO, (char *)&on), new); #else - OK(fcntl(fd, F_SETFL, mode | PORT_NONBLOCK)); + OKFREE(fcntl(fd, F_SETFL, mode | PORT_NONBLOCK), new); #endif new->flags |= EV_CONN_BLOCK; } - OK(listen(fd, maxconn)); + OKFREE(listen(fd, maxconn), new); if (evSelectFD(opaqueCtx, fd, EV_READ, listener, new, &new->file) < 0){ int save = errno; diff --git a/contrib/bind9/lib/bind/isc/eventlib.c b/contrib/bind9/lib/bind/isc/eventlib.c index 77b1414..11120ec 100644 --- a/contrib/bind9/lib/bind/isc/eventlib.c +++ b/contrib/bind9/lib/bind/isc/eventlib.c @@ -20,7 +20,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: eventlib.c,v 1.2.2.1.4.5 2005/07/28 07:43:20 marka Exp $"; +static const char rcsid[] = "$Id: eventlib.c,v 1.2.2.1.4.6 2006/03/10 00:17:21 marka Exp $"; #endif #include "port_before.h" @@ -784,13 +784,10 @@ pselect(int nfds, void *rfds, void *wfds, void *efds, pnfds = 0; } n = poll(fds, pnfds, polltimeout); - /* - * pselect() should return the total number of events on the file - * desriptors, not just the count of fd:s with activity. Hence, - * traverse the pollfds array and count the events. - */ if (n > 0) { int i, e; + + INSIST(ctx != NULL); for (e = 0, i = ctx->firstfd; i <= ctx->fdMax; i++) { if (ctx->pollfds[i].fd < 0) continue; diff --git a/contrib/bind9/lib/bind/isc/eventlib_p.h b/contrib/bind9/lib/bind/isc/eventlib_p.h index b95741d..5c45ab8 100644 --- a/contrib/bind9/lib/bind/isc/eventlib_p.h +++ b/contrib/bind9/lib/bind/isc/eventlib_p.h @@ -18,7 +18,7 @@ /* eventlib_p.h - private interfaces for eventlib * vix 09sep95 [initial] * - * $Id: eventlib_p.h,v 1.3.2.1.4.3 2005/07/28 07:43:20 marka Exp $ + * $Id: eventlib_p.h,v 1.3.2.1.4.4 2006/03/10 00:17:21 marka Exp $ */ #ifndef _EVENTLIB_P_H @@ -45,6 +45,8 @@ #define EV_MASK_ALL (EV_READ | EV_WRITE | EV_EXCEPT) #define EV_ERR(e) return (errno = (e), -1) #define OK(x) if ((x) < 0) EV_ERR(errno); else (void)NULL +#define OKFREE(x, y) if ((x) < 0) { FREE((y)); EV_ERR(errno); } \ + else (void)NULL #define NEW(p) if (((p) = memget(sizeof *(p))) != NULL) \ FILL(p); \ diff --git a/contrib/bind9/lib/bind/isc/heap.c b/contrib/bind9/lib/bind/isc/heap.c index f63619f..2faf6f5 100644 --- a/contrib/bind9/lib/bind/isc/heap.c +++ b/contrib/bind9/lib/bind/isc/heap.c @@ -26,7 +26,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: heap.c,v 1.1.206.1 2004/03/09 08:33:43 marka Exp $"; +static const char rcsid[] = "$Id: heap.c,v 1.1.206.2 2006/03/10 00:17:21 marka Exp $"; #endif /* not lint */ #include "port_before.h" @@ -54,9 +54,13 @@ heap_new(heap_higher_priority_func higher_priority, heap_index_func index, int array_size_increment) { heap_context ctx; + if (higher_priority == NULL) + return (NULL); + ctx = (heap_context)malloc(sizeof (struct heap_context)); - if (ctx == NULL || higher_priority == NULL) + if (ctx == NULL) return (NULL); + ctx->array_size = 0; if (array_size_increment == 0) ctx->array_size_increment = ARRAY_SIZE_INCREMENT; diff --git a/contrib/bind9/lib/bind/isc/hex.c b/contrib/bind9/lib/bind/isc/hex.c index c177ca0..7031259 100644 --- a/contrib/bind9/lib/bind/isc/hex.c +++ b/contrib/bind9/lib/bind/isc/hex.c @@ -45,8 +45,9 @@ isc_gethexstring(unsigned char *buf, size_t len, int count, FILE *fp, goto formerr; /* comment */ if (c == ';') { - while ((c = fgetc(fp)) != EOF && c != '\n') - /* empty */ + do { + c = fgetc(fp); + } while (c != EOF && c != '\n'); if (c == '\n' && *multiline) continue; goto formerr; diff --git a/contrib/bind9/lib/bind/isc/memcluster.c b/contrib/bind9/lib/bind/isc/memcluster.c index c5b7202..886f516 100644 --- a/contrib/bind9/lib/bind/isc/memcluster.c +++ b/contrib/bind9/lib/bind/isc/memcluster.c @@ -24,7 +24,7 @@ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: memcluster.c,v 1.3.206.7 2005/10/11 00:48:15 marka Exp $"; +static const char rcsid[] = "$Id: memcluster.c,v 1.3.206.8 2006/08/30 23:35:06 marka Exp $"; #endif /* not lint */ #include "port_before.h" @@ -399,7 +399,7 @@ __memput_record(void *mem, size_t size, const char *file, int line) { p = (char *)e + sizeof *e + size; memcpy(&fp, p, sizeof fp); INSIST(fp == BACK_FENCEPOST); - INSIST(((int)mem % 4) == 0); + INSIST(((u_long)mem % 4) == 0); #ifdef MEMCLUSTER_RECORD prev = NULL; if (size == max_size || new_size >= max_size) @@ -523,10 +523,11 @@ memstats(FILE *out) { for (i = 1; i <= max_size; i++) { if ((e = activelists[i]) != NULL) while (e != NULL) { - fprintf(out, "%s:%d %p:%d\n", + fprintf(out, "%s:%d %p:%lu\n", e->file != NULL ? e->file : "<UNKNOWN>", e->line, - (char *)e + sizeof *e, e->size); + (char *)e + sizeof *e, + (u_long)e->size); e = e->next; } } diff --git a/contrib/bind9/lib/bind/nameser/ns_sign.c b/contrib/bind9/lib/bind/nameser/ns_sign.c index 56248a5..7b742f1 100644 --- a/contrib/bind9/lib/bind/nameser/ns_sign.c +++ b/contrib/bind9/lib/bind/nameser/ns_sign.c @@ -16,7 +16,7 @@ */ #ifndef lint -static const char rcsid[] = "$Id: ns_sign.c,v 1.1.2.2.4.1 2004/03/09 08:33:45 marka Exp $"; +static const char rcsid[] = "$Id: ns_sign.c,v 1.1.2.2.4.2 2006/03/10 00:17:21 marka Exp $"; #endif /* Import. */ @@ -89,7 +89,7 @@ ns_sign2(u_char *msg, int *msglen, int msgsize, int error, void *k, { HEADER *hp = (HEADER *)msg; DST_KEY *key = (DST_KEY *)k; - u_char *cp = msg + *msglen, *eob = msg + msgsize; + u_char *cp, *eob; u_char *lenp; u_char *alg; int n; @@ -100,6 +100,9 @@ ns_sign2(u_char *msg, int *msglen, int msgsize, int error, void *k, if (msg == NULL || msglen == NULL || sig == NULL || siglen == NULL) return (-1); + cp = msg + *msglen; + eob = msg + msgsize; + /* Name. */ if (key != NULL && error != ns_r_badsig && error != ns_r_badkey) { n = ns_name_pton(key->dk_key_name, name, sizeof name); diff --git a/contrib/bind9/lib/bind/nameser/ns_verify.c b/contrib/bind9/lib/bind/nameser/ns_verify.c index adda249..c74a0a3 100644 --- a/contrib/bind9/lib/bind/nameser/ns_verify.c +++ b/contrib/bind9/lib/bind/nameser/ns_verify.c @@ -16,7 +16,7 @@ */ #ifndef lint -static const char rcsid[] = "$Id: ns_verify.c,v 1.1.206.2 2005/10/11 00:48:16 marka Exp $"; +static const char rcsid[] = "$Id: ns_verify.c,v 1.1.206.3 2006/03/10 00:17:21 marka Exp $"; #endif /* Import. */ @@ -343,7 +343,7 @@ ns_verify_tcp(u_char *msg, int *msglen, ns_tcp_tsig_state *state, HEADER *hp = (HEADER *)msg; u_char *recstart, *sigstart; unsigned int sigfieldlen, otherfieldlen; - u_char *cp, *eom = msg + *msglen, *cp2; + u_char *cp, *eom, *cp2; char name[MAXDNAME], alg[MAXDNAME]; u_char buf[MAXDNAME]; int n, type, length, fudge, error; @@ -352,6 +352,8 @@ ns_verify_tcp(u_char *msg, int *msglen, ns_tcp_tsig_state *state, if (msg == NULL || msglen == NULL || state == NULL) return (-1); + eom = msg + *msglen; + state->counter++; if (state->counter == 0) return (ns_verify(msg, msglen, state->key, diff --git a/contrib/bind9/lib/bind/port_after.h.in b/contrib/bind9/lib/bind/port_after.h.in index 0c956b7..f248d23 100644 --- a/contrib/bind9/lib/bind/port_after.h.in +++ b/contrib/bind9/lib/bind/port_after.h.in @@ -5,12 +5,16 @@ #include <sys/types.h> #include <sys/socket.h> #include <sys/param.h> +#include <sys/time.h> #if (!defined(BSD)) || (BSD < 199306) #include <sys/bitypes.h> #endif #ifdef HAVE_INTTYPES_H #include <inttypes.h> #endif +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif /* HAVE_SYS_SELECT_H */ @NEED_PSELECT@ @HAVE_SA_LEN@ diff --git a/contrib/bind9/lib/bind/port_before.h.in b/contrib/bind9/lib/bind/port_before.h.in index c754efd..320fff1 100644 --- a/contrib/bind9/lib/bind/port_before.h.in +++ b/contrib/bind9/lib/bind/port_before.h.in @@ -87,11 +87,13 @@ struct timezone; /* silence warning */ @PROTO_R_END_RESULT@ @PROTO_R_END_RETURN@ @PROTO_R_ENT_ARGS@ +@PROTO_R_ENT_UNUSED@ @PROTO_R_OK@ @PROTO_R_SETANSWER@ @PROTO_R_RETURN@ @PROTO_R_SET_RESULT@ @PROTO_R_SET_RETURN@ +@PROTOENT_DATA@ @PASS_R_ARGS@ @PASS_R_BAD@ @@ -112,11 +114,13 @@ struct timezone; /* silence warning */ @SERV_R_END_RESULT@ @SERV_R_END_RETURN@ @SERV_R_ENT_ARGS@ +@SERV_R_ENT_UNUSED@ @SERV_R_OK@ @SERV_R_SETANSWER@ @SERV_R_RETURN@ @SERV_R_SET_RESULT@ @SERV_R_SET_RETURN@ +@SERVENT_DATA@ #define DE_CONST(konst, var) \ diff --git a/contrib/bind9/lib/bind/resolv/mtctxres.c b/contrib/bind9/lib/bind/resolv/mtctxres.c index f33cf11..635bbd4 100644 --- a/contrib/bind9/lib/bind/resolv/mtctxres.c +++ b/contrib/bind9/lib/bind/resolv/mtctxres.c @@ -106,9 +106,10 @@ ___mtctxres(void) { */ if (!mt_key_initialized) { static pthread_mutex_t keylock = PTHREAD_MUTEX_INITIALIZER; - pthread_mutex_lock(&keylock); - _mtctxres_init(); - pthread_mutex_unlock(&keylock); + if (pthread_mutex_lock(&keylock) == 0) { + _mtctxres_init(); + (void) pthread_mutex_unlock(&keylock); + } } /* diff --git a/contrib/bind9/lib/bind/resolv/res_init.c b/contrib/bind9/lib/bind/resolv/res_init.c index 28a3ebd..fd82e872 100644 --- a/contrib/bind9/lib/bind/resolv/res_init.c +++ b/contrib/bind9/lib/bind/resolv/res_init.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; -static const char rcsid[] = "$Id: res_init.c,v 1.9.2.5.4.5 2005/11/03 00:00:52 marka Exp $"; +static const char rcsid[] = "$Id: res_init.c,v 1.9.2.5.4.6 2006/08/30 23:23:01 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include "port_before.h" @@ -237,17 +237,10 @@ __res_vinit(res_state statp, int preinit) { if (buf[0] == '+') buf[0] = '.'; cp = strchr(buf, '.'); - if (cp == NULL) { - if (strlcpy(statp->defdname, buf, - sizeof(statp->defdname)) - >= sizeof(statp->defdname)) - goto freedata; - } else { - if (strlcpy(statp->defdname, cp+1, - sizeof(statp->defdname)) - >= sizeof(statp->defdname)) - goto freedata; - } + cp = (cp == NULL) ? buf : (cp + 1); + if (strlen(cp) >= sizeof(statp->defdname)) + goto freedata; + strcpy(statp->defdname, cp); } } #endif /* SOLARIS2 */ diff --git a/contrib/bind9/lib/bind/resolv/res_send.c b/contrib/bind9/lib/bind/resolv/res_send.c index 5be2489..c47dd49 100644 --- a/contrib/bind9/lib/bind/resolv/res_send.c +++ b/contrib/bind9/lib/bind/resolv/res_send.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.7 2005/08/15 02:04:41 marka Exp $"; +static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.9 2006/10/16 23:00:50 marka Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -130,7 +130,7 @@ static struct sockaddr * get_nsaddr __P((res_state, size_t)); static int send_vc(res_state, const u_char *, int, u_char *, int, int *, int); static int send_dg(res_state, const u_char *, int, - u_char *, int, int *, int, + u_char *, int, int *, int, int, int *, int *); static void Aerror(const res_state, FILE *, const char *, int, const struct sockaddr *, int); @@ -295,7 +295,8 @@ res_nsend(res_state statp, highestFD = sysconf(_SC_OPEN_MAX) - 1; #endif - if (statp->nscount == 0) { + /* No name servers or res_init() failure */ + if (statp->nscount == 0 || EXT(statp).ext == NULL) { errno = ESRCH; return (-1); } @@ -458,7 +459,7 @@ res_nsend(res_state statp, } else { /* Use datagrams. */ n = send_dg(statp, buf, buflen, ans, anssiz, &terrno, - ns, &v_circuit, &gotsomewhere); + ns, try, &v_circuit, &gotsomewhere); if (n < 0) goto fail; if (n == 0) @@ -766,9 +767,9 @@ send_vc(res_state statp, } static int -send_dg(res_state statp, - const u_char *buf, int buflen, u_char *ans, int anssiz, - int *terrno, int ns, int *v_circuit, int *gotsomewhere) +send_dg(res_state statp, const u_char *buf, int buflen, u_char *ans, + int anssiz, int *terrno, int ns, int try, int *v_circuit, + int *gotsomewhere) { const HEADER *hp = (const HEADER *) buf; HEADER *anhp = (HEADER *) ans; @@ -849,7 +850,7 @@ send_dg(res_state statp, /* * Wait for reply. */ - seconds = (statp->retrans << ns); + seconds = (statp->retrans << try); if (ns > 0) seconds /= statp->nscount; if (seconds <= 0) diff --git a/contrib/bind9/lib/bind/resolv/res_sendsigned.c b/contrib/bind9/lib/bind/resolv/res_sendsigned.c index d1d2274..93ad5c9 100644 --- a/contrib/bind9/lib/bind/resolv/res_sendsigned.c +++ b/contrib/bind9/lib/bind/resolv/res_sendsigned.c @@ -52,6 +52,7 @@ res_nsendsigned(res_state statp, const u_char *msg, int msglen, bufsize = msglen + 1024; newmsg = (u_char *) malloc(bufsize); if (newmsg == NULL) { + free(nstatp); errno = ENOMEM; return (-1); } @@ -102,11 +103,11 @@ res_nsendsigned(res_state statp, const u_char *msg, int msglen, retry: len = res_nsend(nstatp, newmsg, newmsglen, answer, anslen); - if (ret < 0) { + if (len < 0) { free (nstatp); free (newmsg); dst_free_key(dstkey); - return (ret); + return (len); } ret = ns_verify(answer, &len, dstkey, sig, siglen, |