]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Added support for sys/bitypes.h, apparently needed for some of the bittypes
authorhno <>
Tue, 18 Jun 2002 00:28:12 +0000 (00:28 +0000)
committerhno <>
Tue, 18 Jun 2002 00:28:12 +0000 (00:28 +0000)
on tru64 and possibly others.

acinclude.m4
configure.in
include/squid_types.h

index 349c57e6de054db5ac8b62b3c79b6326c9b5c397..cc1c818dca91845e7f4dd9123af18b50b1cb6768 100644 (file)
@@ -16,7 +16,8 @@ define(<<AC_CV_NAME>>, 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 <stdio.h>
+[AC_TRY_RUN([
+#include <stdio.h>
 #if STDC_HEADERS
 #include <stdlib.h>
 #include <stddef.h>
@@ -27,13 +28,17 @@ AC_CACHE_VAL(AC_CV_NAME,
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
+#if HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#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 <sys/types.h>
+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 <sys/types.h>
 #if STDC_HEADERS
 #include <stdlib.h>
 #include <stddef.h>
@@ -58,7 +68,11 @@ changequote([,]), [#include <sys/types.h>
 #endif
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
-#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
+#endif
+#if HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#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)
index af313d1da7d726ad0751684477ea32c2d5a99416..829058f85f4284a2c53d44501c74fac4cdb5d3b3 100644 (file)
@@ -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 \
index 917f4e24550973092fd0e5880eac1cfd67224e08..43c94cdf13de7cb09fd5d277315ac8b61db27f22 100644 (file)
@@ -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 * * * * * * *
  *
 
 #include "autoconf.h"
 
-#ifdef HAVE_SYS_TYPES_H
+/* This should be in synch with what we have in acinclude.m4 */
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#if HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
+#if HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#endif
 
 #endif /* SQUID_TYPES_H */