]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Added check for 8 bit signed and unsigned integers
authorserassio <>
Mon, 21 Aug 2006 00:30:28 +0000 (00:30 +0000)
committerserassio <>
Mon, 21 Aug 2006 00:30:28 +0000 (00:30 +0000)
configure.in
include/config.h

index d1337a1bf771f3c3e29f28d913cba4f6e3b3728c..c56eb5c7eb7e4ab8c04d7baae95740b695e8beab 100644 (file)
@@ -1,7 +1,7 @@
 
 dnl  Configuration input file for Squid
 dnl
-dnl  $Id: configure.in,v 1.429 2006/08/20 09:50:05 serassio Exp $
+dnl  $Id: configure.in,v 1.430 2006/08/20 18:30:28 serassio 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.429 $)dnl
+AC_REVISION($Revision: 1.430 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -2032,7 +2032,34 @@ AC_CHECK_MEMBERS([struct iphdr.ip_hl],,,[
 dnl Check for typedefs
 AC_CHECK_SIZEOF(void *)
 
-dnl 16 bit integers - int16_t and u_int16_t
+dnl 8 bit integers - int8_t
+dnl if this is defined we trust it to be 8 bits
+AC_CHECK_TYPE(int8_t,[
+  AC_CHECK_SIZEOF(int8_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
+  AC_DEFINE(HAVE_INT8_T,1,[int8_t is defined in system headers])
+  ],,SQUID_DEFAULT_INCLUDES)
+
+dnl fallback #1
+AC_CHECK_TYPE(char,[
+  AC_CHECK_SIZEOF(char,,SQUID_DEFAULT_SIZEOF_INCLUDES)
+  AC_DEFINE(HAVE_CHAR,1,[char is defined in system headers])
+  ],,SQUID_DEFAULT_INCLUDES)
+
+dnl unsigned 8 bit ints - u_int8_t
+dnl if this is defined we trust it to be 8 bits
+AC_CHECK_TYPE(u_int8_t,[
+  AC_CHECK_SIZEOF(u_int8_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
+  AC_DEFINE(HAVE_U_INT8_T,1,[u_int8_t is defined in system headers])
+  ],,SQUID_DEFAULT_INCLUDES)
+
+dnl fallback #1
+dnl if this is defined we trust it to be 8 bits
+AC_CHECK_TYPE(uint8_t,[
+  AC_CHECK_SIZEOF(uint8_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
+  AC_DEFINE(HAVE_UINT8_T,1,[uint8_t is defined in system headers])
+  ],,SQUID_DEFAULT_INCLUDES)
+
+dnl 16 bit integers - int16_t
 dnl if this is defined we trust it to be 16 bits
 AC_CHECK_TYPE(int16_t,[
   AC_CHECK_SIZEOF(int16_t,,SQUID_DEFAULT_SIZEOF_INCLUDES)
index 0e6721dfc42767e650fe86f0e6121f55870d0b2c..ea9820184bc0258147ea3bda1b4ba5abd168ced8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: config.h,v 1.19 2005/08/07 12:16:51 serassio Exp $
+ * $Id: config.h,v 1.20 2006/08/20 18:30:28 serassio Exp $
  *
  * AUTHOR: Duane Wessels
  *
 
 #include "squid_types.h"
 
+/* int8_t */
+#ifndef HAVE_INT8_T
+#if HAVE_CHAR && SIZEOF_CHAR == 1
+typedef char int8_t;
+#else
+#error NO 8 bit signed type available
+#endif
+#endif
+
+/* u_int8_t */
+#ifndef HAVE_U_INT8_T
+#if HAVE_UINT8_T
+typedef uint8_t u_int8_t;
+#else
+typedef unsigned char u_int8_t;
+#endif
+#endif
+
 /* int16_t */
 #ifndef HAVE_INT16_T
 #if HAVE_SHORT && SIZEOF_SHORT == 2