aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-04-17 09:16:20 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-04-17 09:16:20 +0800
commit37a6a67b83419b7d616642ed988f55f474e8f68e (patch)
tree8b538f73f888389566b29332949416e6fb0f8801
parent710bf5228834951eed958f27ffe309272d28cb21 (diff)
downloadgsoc2013-evolution-37a6a67b83419b7d616642ed988f55f474e8f68e.tar.gz
gsoc2013-evolution-37a6a67b83419b7d616642ed988f55f474e8f68e.tar.zst
gsoc2013-evolution-37a6a67b83419b7d616642ed988f55f474e8f68e.zip
Add checks for gethostbyaddr_r
2002-04-16 Jeffrey Stedfast <fejj@ximian.com> * configure.in: Add checks for gethostbyaddr_r svn path=/trunk/; revision=16482
-rw-r--r--ChangeLog4
-rw-r--r--acconfig.h3
-rw-r--r--configure.in37
3 files changed, 42 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fd0a3beff0..e9a483cc4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-04-16 Jeffrey Stedfast <fejj@ximian.com>
+
+ * configure.in: Add checks for gethostbyaddr_r
+
2002-04-14 Jeffrey Stedfast <fejj@ximian.com>
* configure.in: Check for socklen_t and if it doesn't exist,
diff --git a/acconfig.h b/acconfig.h
index 5e1b0b0a41..e4aed8a2d6 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -43,5 +43,8 @@
/* Define if gethostbyname_r takes five arguments */
#undef GETHOSTBYNAME_R_FIVE_ARGS
+/* Define if gethostbyaddr_r takes seven arguments */
+#undef GETHOSTBYADDR_R_SEVEN_ARGS
+
/* Define to `int' if your system doesn't have `socklen_t'. */
#undef socklen_t
diff --git a/configure.in b/configure.in
index 8514145180..7608f0d3ca 100644
--- a/configure.in
+++ b/configure.in
@@ -265,7 +265,7 @@ AC_CACHE_CHECK([if gethostbyname_r wants five arguments], ac_cv_gethostbyname_r_
int bufsize=BUFSIZE;
int h_errno;
- (void)gethostbyname_r( "www.ximian.com", &hent, buffer, bufsize, &h_errno);
+ (void)gethostbyname_r ("www.ximian.com", &hent, buffer, bufsize, &h_errno);
],[
ac_cv_gethostbyname_r_five_args=yes
],[
@@ -273,10 +273,43 @@ AC_CACHE_CHECK([if gethostbyname_r wants five arguments], ac_cv_gethostbyname_r_
])
])])
-if test x"$ac_cv_gethostbyname_r_five_args" = xyes ; then
+if test "x$ac_cv_gethostbyname_r_five_args" = "xyes" ; then
AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS)
fi
+dnl **************************************************
+dnl gethostbyaddr_r prototype
+dnl **************************************************
+
+AC_CHECK_FUNCS(gethostbyaddr_r,[
+AC_CACHE_CHECK([if gethostbyaddr_r wants seven arguments], ac_cv_gethostbyaddr_r_seven_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)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno);
+ ],[
+ ac_cv_gethostbyaddr_r_seven_args=yes
+ ],[
+ ac_cv_gethostbyaddr_r_seven_args=no
+ ])
+])])
+
+if test "x$ac_cv_gethostbyaddr_r_seven_args" = "xyes" ; then
+ AC_DEFINE(GETHOSTBYADDR_R_SEVEN_ARGS)
+fi
+
dnl ***********
dnl * db3 stuff
dnl ***********