aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in32
1 files changed, 32 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index c861ef90c7..b94f36e309 100644
--- a/configure.in
+++ b/configure.in
@@ -151,6 +151,38 @@ if test x"$ac_cv_ctime_r_three_args" = xyes ; then
fi
dnl **************************************************
+dnl gethostbyname_r prototype
+dnl **************************************************
+
+AC_CACHE_CHECK([if gethostbyname_r wants five arguments], ac_cv_gethostbyname_r_five_args,
+[
+ AC_TRY_COMPILE([
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <netdb.h>
+
+ #define BUFSIZE (sizeof(struct hostent)+10)
+ ],[
+ struct hostent hent;
+ char buffer[BUFSIZE];
+ int bufsize=BUFSIZE;
+ int h_errno;
+
+ (void)gethostbyname_r( "www.ximian.com", &hent, buffer, bufsize, &h_errno);
+ ],[
+ ac_cv_gethostbyname_r_five_args=yes
+ ],[
+ ac_cv_gethostbyname_r_five_args=no
+ ])
+])
+
+if test x"$ac_cv_gethostbyname_r_five_args" = xyes ; then
+ AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS)
+fi
+
+dnl **************************************************
dnl * pas-backend-file stuff.
dnl * check for db_185.h. if it's there, we use it.
dnl * otherwise, we use db.h (since it'll be 185).