From: amosjeffries <> Date: Thu, 20 Sep 2007 17:07:53 +0000 (+0000) Subject: Improve support on Linux for res_init X-Git-Tag: SQUID_3_0_RC1~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af76ec93f0b0e7d1bf774f489e11e1e58e3a9981;p=thirdparty%2Fsquid.git Improve support on Linux for res_init res_init() is just a macro re-define of __res_init on Linux (Debian/Ubuntu) This patch adds a check for the underlying structure and uses it if needed --- diff --git a/configure.in b/configure.in index 239f7c2a9b..43e7c7bea7 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl Configuration input file for Squid dnl -dnl $Id: configure.in,v 1.479 2007/09/20 11:03:42 amosjeffries Exp $ +dnl $Id: configure.in,v 1.480 2007/09/20 11:07:53 amosjeffries Exp $ dnl dnl dnl @@ -11,7 +11,7 @@ AM_CONFIG_HEADER(include/autoconf.h) AC_CONFIG_AUX_DIR(cfgaux) AC_CONFIG_SRCDIR([src/main.cc]) AM_INIT_AUTOMAKE([tar-ustar]) -AC_REVISION($Revision: 1.479 $)dnl +AC_REVISION($Revision: 1.480 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -2522,6 +2522,7 @@ AC_CHECK_FUNCS(\ regexec \ regfree \ res_init \ + __res_init \ rint \ sbrk \ select \ diff --git a/include/config.h b/include/config.h index d1ab6215ca..c468320310 100644 --- a/include/config.h +++ b/include/config.h @@ -1,5 +1,5 @@ /* - * $Id: config.h,v 1.24 2007/09/20 10:59:30 amosjeffries Exp $ + * $Id: config.h,v 1.25 2007/09/20 11:07:53 amosjeffries Exp $ * * AUTHOR: Duane Wessels * @@ -344,6 +344,14 @@ typedef union { #undef HAVE_MALLOC_H #endif +/* + * res_init() is just a macro re-definition of __res_init on Linux (Debian/Ubuntu) + */ +#if !defined(HAVE_RES_INIT) && defined(HAVE___RES_INIT) && !defined(res_init) +#define res_init __res_init +#define HAVE_RES_INIT HAVE___RES_INIT +#endif + #if !defined(CACHEMGR_HOSTNAME) #define CACHEMGR_HOSTNAME "" #else