diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-04-17 09:16:20 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-04-17 09:16:20 +0800 |
commit | 37a6a67b83419b7d616642ed988f55f474e8f68e (patch) | |
tree | 8b538f73f888389566b29332949416e6fb0f8801 /configure.in | |
parent | 710bf5228834951eed958f27ffe309272d28cb21 (diff) | |
download | gsoc2013-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
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 37 |
1 files changed, 35 insertions, 2 deletions
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 *********** |