---------------------
PatchSet 4581 
Date: 2002/07/25 11:55:16
Author: rbcollins
Branch: autoconf-25
Tag: (none) 
Log:
updated 64 bit type detection

Members: 
	configure.in:1.61.4.2->1.61.4.3 
	include/config.h:1.5.42.2->1.5.42.3 

Index: squid/configure.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/configure.in,v
retrieving revision 1.61.4.2
retrieving revision 1.61.4.3
diff -u -r1.61.4.2 -r1.61.4.3
--- squid/configure.in	25 Jul 2002 11:29:49 -0000	1.61.4.2
+++ squid/configure.in	25 Jul 2002 11:55:16 -0000	1.61.4.3
@@ -3,7 +3,7 @@
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.61.4.2 2002/07/25 11:29:49 rbcollins Exp $
+dnl  $Id: configure.in,v 1.61.4.3 2002/07/25 11:55:16 rbcollins Exp $
 dnl
 dnl
 dnl
@@ -12,7 +12,7 @@
 AC_CONFIG_AUX_DIR(cfgaux)
 AM_INIT_AUTOMAKE(squid, 2.6-DEVEL-autoconf25)
 AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.61.4.2 $)dnl
+AC_REVISION($Revision: 1.61.4.3 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -1385,36 +1385,41 @@
   AC_DEFINE(HAVE_U_INT32_T,1,[u_int32_t is defined in system headers]),
   ,SQUID_DEFAULT_INCLUDES)
 
-#fallback #1
+dnl fallback #1
 dnl if this is defined we trust it to be 32 bits
 AC_CHECK_TYPE(uint32_t,
   AC_DEFINE(HAVE_UINT32_T,1,[uint32_t is defined in system headers]),
     ,SQUID_DEFAULT_INCLUDES)
 
-AC_CHECK_SIZEOF(long long)
-AC_CHECK_SIZEOF(__int64,,SQUID_DEFAULT_SIZEOF_INCLUDES)
-AC_CHECK_SIZEOF(int64_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
-AC_CHECK_SIZEOF(uint64_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
-AC_CHECK_SIZEOF(u_int64_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
-
-dnl int64_t
-if test "x$ac_cv_sizeof_long" = "x8"; then
-	AC_CHECK_SYSTYPE(int64_t,long)
-elif test "x$ac_cv_sizeof_long_long" = "x8"; then
-	AC_CHECK_SYSTYPE(int64_t,long long)
-elif test "x$ac_cv_sizeof___int64" = "x8"; then
-	AC_CHECK_SYSTYPE(int64_t,__int64)
-fi
-dnl u_int64_t
-if test "x$ac_cv_sizeof_uint64_t" = "x8"; then
-	AC_CHECK_SYSTYPE(u_int64_t,uint64_t)
-elif test "x$ac_cv_sizeof_long" = "x8"; then
-	AC_CHECK_SYSTYPE(u_int64_t,unsigned long)
-elif test "x$ac_cv_sizeof_long_long" = "x8"; then
-	AC_CHECK_SYSTYPE(u_int64_t,unsigned long long)
-elif test "x$ac_cv_sizeof___int64" = "x8"; then
-	AC_CHECK_SYSTYPE(int64_t,unsigned __int64)
-fi
+dnl 64 bit signed - int64_t
+dnl if this is defind we trust it to be 64 bits
+AC_CHECK_TYPE(int64_t,
+  AC_DEFINE(HAVE_INT64_T,1,[int64_t is defined in system headers]),
+  ,SQUID_DEFAULT_INCLUDES)
+
+dnl fallback #1
+dnl if this is defind we trust it to be 64 bits
+AC_CHECK_TYPE(__int64,
+  AC_DEFINE(HAVE___INT64,1,[__int64 is defined in system headers]),
+  ,SQUID_DEFAULT_INCLUDES)
+
+dnl fallback #2
+AC_CHECK_TYPE(long long,[
+  AC_CHECK_SIZEOF(long long,,SQUID_DEFAULT_INCLUDES)
+  AC_DEFINE(HAVE_LONG_LONG,1,[long long is defined in system headers])
+  ],,SQUID_DEFAULT_INCLUDES)
+
+dnl 64 bit unsigned - u_int64_t
+dnl if this is defind we trust it to be 64 bits
+AC_CHECK_TYPE(u_int64_t,
+  AC_DEFINE(HAVE_U_INT64_T,1,[u_int64_t is defined in system headers]),
+  ,SQUID_DEFAULT_INCLUDES)
+
+dnl fallback #1
+dnl if this is defind we trust it to be 64 bits
+AC_CHECK_TYPE(uint64_t,
+  AC_DEFINE(HAVE_UINT64_T,1,[uint64_t is defined in system headers]),
+  ,SQUID_DEFAULT_INCLUDES)
 
 AC_CHECK_TYPE(pid_t, AC_DEFINE(HAVE_PID_T,1,[pid_t is defined by the system headers]),,SQUID_DEFAULT_INCLUDES)
 AC_CHECK_TYPE(size_t, unsigned int)
Index: squid/include/config.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/config.h,v
retrieving revision 1.5.42.2
retrieving revision 1.5.42.3
diff -u -r1.5.42.2 -r1.5.42.3
--- squid/include/config.h	25 Jul 2002 11:29:51 -0000	1.5.42.2
+++ squid/include/config.h	25 Jul 2002 11:55:16 -0000	1.5.42.3
@@ -166,6 +166,28 @@
 #endif
 #endif
 
+/* int64_t */
+#ifndef HAVE_INT64_T
+#if HAVE___INT64
+typedef __int64 int64_t
+#elif HAVE_LONG && SIZEOF_LONG == 8
+typedef long int64_t
+#elif HAVE_LONG_LONG && SIZEOF_LONG_LONG == 8
+typedef long long int64_t
+#else
+#error NO 64 bit signed type available
+#endif
+#endif
+
+/* u_int64_t */
+#ifndef HAVE_U_INT64_T
+#if HAVE_UINT64_T
+typedef uint64_t u_int64_t
+#else
+typedef unsigned int64_t u_int64_t
+#endif
+#endif
+
 #ifndef HAVE_SOCKLEN_T
 typedef int socklen_t
 #endif
