From: hno <> Date: Tue, 18 Jun 2002 00:28:12 +0000 (+0000) Subject: Added support for sys/bitypes.h, apparently needed for some of the bittypes X-Git-Tag: SQUID_3_0_PRE1~970 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a4e853663ad166664306ff9fbc7335fc22244a7;p=thirdparty%2Fsquid.git Added support for sys/bitypes.h, apparently needed for some of the bittypes on tru64 and possibly others. --- diff --git a/acinclude.m4 b/acinclude.m4 index 349c57e6de..cc1c818dca 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -16,7 +16,8 @@ define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl changequote([, ])dnl AC_MSG_CHECKING(size of $1) AC_CACHE_VAL(AC_CV_NAME, -[AC_TRY_RUN([#include +[AC_TRY_RUN([ +#include #if STDC_HEADERS #include #include @@ -27,13 +28,17 @@ AC_CACHE_VAL(AC_CV_NAME, #if HAVE_SYS_TYPES_H #include #endif +#if HAVE_SYS_BITYPES_H +#include +#endif int main() { FILE *f=fopen("conftestval", "w"); if (!f) return(1); fprintf(f, "%d\n", sizeof($1)); return(0); -}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl +} +], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl AC_MSG_RESULT($AC_CV_NAME) AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) undefine([AC_TYPE_NAME])dnl @@ -48,7 +53,12 @@ AC_CACHE_VAL(ac_cv_type_$1, [AC_EGREP_CPP(dnl changequote(<<,>>)dnl <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include +changequote([,]), [ +/* What a mess.. many systems have added the (now standard) bit types + * in their own ways, so we need to scan a wide variety of headers to + * find them.. + */ +#include #if STDC_HEADERS #include #include @@ -58,7 +68,11 @@ changequote([,]), [#include #endif #if HAVE_SYS_TYPES_H #include -#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl +#endif +#if HAVE_SYS_BITYPES_H +#include +#endif +], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl AC_MSG_RESULT($ac_cv_type_$1) if test $ac_cv_type_$1 = no; then AC_DEFINE($1, $2) diff --git a/configure.in b/configure.in index af313d1da7..829058f85f 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.272 2002/05/19 23:52:56 hno Exp $ +dnl $Id: configure.in,v 1.273 2002/06/17 18:28:12 hno Exp $ dnl dnl dnl @@ -11,7 +11,7 @@ AC_INIT(src/main.c) AC_CONFIG_AUX_DIR(cfgaux) AM_INIT_AUTOMAKE(squid, 2.6-DEVEL) AM_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.272 $)dnl +AC_REVISION($Revision: 1.273 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -1190,6 +1190,7 @@ AC_CHECK_HEADERS( \ stdlib.h \ string.h \ strings.h \ + sys/bitypes.h \ sys/file.h \ sys/ioctl.h \ sys/mount.h \ diff --git a/include/squid_types.h b/include/squid_types.h index 917f4e2455..43c94cdf13 100644 --- a/include/squid_types.h +++ b/include/squid_types.h @@ -1,5 +1,5 @@ /* - * $Id: squid_types.h,v 1.3 2001/10/22 23:35:07 hno Exp $ + * $Id: squid_types.h,v 1.4 2002/06/17 18:28:13 hno Exp $ * * * * * * * * * Legal stuff * * * * * * * * @@ -55,8 +55,19 @@ #include "autoconf.h" -#ifdef HAVE_SYS_TYPES_H +/* This should be in synch with what we have in acinclude.m4 */ +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_SYS_TYPES_H #include #endif +#if HAVE_SYS_BITYPES_H +#include +#endif #endif /* SQUID_TYPES_H */