From f132c28d7f50f16f0d1fe5c93a68eb17ba6d55ac Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 11 Apr 2001 16:10:30 +0000 Subject: Check if gethostbyname_r take five params 2001-04-11 JP Rosevear * configure.in: Check if gethostbyname_r take five params * acconfig.h: add GETHOSTBYNAME_R_FIVE_ARGS 2001-04-11 JP Rosevear * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome files are included in the top level camel headers and the gtk include dir is now versioned and such * providers/local/Makefile.am: ditto * providers/pop3/Makefile.am: ditto * providers/smtp/Makefile.am: ditto * providers/sendmail/Makefile.am: ditto * camel-service.c: use five arg version of gethostbyname_r if appropriate (camel_get_host_byname): check if msg->herr is non-zero instead of checking if msg->hp is null since we may not always have msg->hp svn path=/trunk/; revision=9239 --- configure.in | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index c861ef90c7..b94f36e309 100644 --- a/configure.in +++ b/configure.in @@ -150,6 +150,38 @@ if test x"$ac_cv_ctime_r_three_args" = xyes ; then AC_DEFINE(CTIME_R_THREE_ARGS) 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 + #include + #include + #include + + #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. -- cgit v1.2.3