This is the first part to get user configurable timeouts I'll commit this on monday if no one objects.
the main use for this is so we can configure the DNS timeout so apache doesn't hang on a horked nameserver.. causing it to grind to a halt.
--ian
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.415
diff -u -u -r1.415 configure.in
--- configure.in 25 Feb 2002 16:55:10 -0000 1.415
+++ configure.in 8 Mar 2002 23:50:33 -0000
@@ -408,6 +408,7 @@
dnl It should check for LIBS being empty and set LIBS equal to the new value
dnl without the extra " " in that case, but they didn't do that. So, we
dnl end up LIBS="-lm -lcrypt -lnsl -ldl" which is an annoyance.
+AC_CHECK_LIB(resolv, res_init)
AC_CHECK_LIB(nsl, gethostbyname)
AC_SEARCH_LIBS(gethostname, nsl)
AC_CHECK_LIB(socket, socket)
@@ -1487,6 +1488,7 @@
AC_SUBST(acceptfilter)
AC_CHECK_FUNCS(set_h_errno) +APR_CHECK_RESOLV_RETRANS
echo $ac_n "${nl}Checking for IPv6 Networking support...${nl}"
dnl # Start of checking for IPv6 support...
@@ -1506,6 +1508,7 @@
APR_CHECK_NEGATIVE_EAI
APR_CHECK_WORKING_GETNAMEINFO
APR_CHECK_SOCKADDR_IN6
+
AC_MSG_CHECKING(if APR supports IPv6)
have_ipv6="0"
if test "$user_disabled_ipv6" = 1; then
Index: build/apr_network.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_network.m4,v
retrieving revision 1.11
diff -u -u -r1.11 apr_network.m4
--- build/apr_network.m4 7 Dec 2001 15:48:05 -0000 1.11
+++ build/apr_network.m4 8 Mar 2002 23:50:33 -0000
@@ -140,6 +140,34 @@
])dnl
+dnl check for presence of retrans/retry variables in the res_state structure
+dnl
+AC_DEFUN(APR_CHECK_RESOLV_RETRANS,[
+ AC_CACHE_CHECK(for presence of retrans/retry fields in res_state/resolv.h , ac_cv_retransretry,[
+ AC_TRY_RUN( [
+#include <sys/types.h>
+#include <inet/ip.h>
+#include <resolv.h>
+/* _res is a global defined in resolv.h */
+void main(void) {
+ _res.retrans = 2;
+ _res.retry = 1;
+ exit(0);
+}
+],[
+ ac_cv_retransretry="yes"
+],[
+ ac_cv_retransretry="no"
+],[
+ ac_cv_retransretry="no"
+])])
+if test "$ac_cv_retransretry" = "yes"; then
+ AC_DEFINE(RESOLV_RETRANSRETRY, 1, [Define if resolv.h's res_state has the fields retrans/rety])
+fi
+])
+
+
+dnl
dnl check for gethostbyname() which handles numeric address strings
dnl
AC_DEFUN(APR_CHECK_GETHOSTBYNAME_NAS,[
