Index: acconfig.h =================================================================== RCS file: /cvsroot/squid/squid/acconfig.h,v retrieving revision 1.1.1.3.10.10 diff -u -r1.1.1.3.10.10 acconfig.h --- acconfig.h 2001/01/30 12:07:05 1.1.1.3.10.10 +++ acconfig.h 2001/02/22 08:07:44 @@ -19,7 +19,10 @@ * in the Makefiles, wich is done automatically by configure. * */ -@ TOP @ + +#ifndef __CONFIGURE_H__ +#define __CONFIGURE_H__ +@TOP@ /* $Id$ */ /********************************* @@ -293,3 +296,25 @@ * Enable support for Transparent Proxy on Linux 2.4 systems */ #undef LINUX_NETFILTER + +/* + * Known-size intgers + */ + +#undef int16_t + +#undef u_int16_t + +#undef int32_t + +#undef u_int32_t + +#undef int64_t + +#undef u_int64_t + + + +@BOTTOM@ + +#endif /* __CONFIGURE_H__ */ Index: configure.in =================================================================== RCS file: /cvsroot/squid/squid/configure.in,v retrieving revision 1.1.1.3.10.28 diff -u -r1.1.1.3.10.28 configure.in --- configure.in 2001/01/30 12:07:05 1.1.1.3.10.28 +++ configure.in 2001/02/22 08:07:46 @@ -984,6 +984,8 @@ time.h \ unistd.h \ varargs.h \ + byteswap.h \ + glib.h \ ) AC_C_CONST @@ -1083,12 +1085,68 @@ fi dnl Check for typedefs +AC_CHECK_SIZEOF(void *) +AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(void *) - -dnl Check for special functions -AC_FUNC_ALLOCA +AC_CHECK_SIZEOF(long long) +AC_CHECK_SIZEOF(__int64) +AC_CHECK_SIZEOF(int16_t) +AC_CHECK_SIZEOF(uint16_t) +AC_CHECK_SIZEOF(u_int16_t) +AC_CHECK_SIZEOF(int32_t) +AC_CHECK_SIZEOF(uint32_t) +AC_CHECK_SIZEOF(u_int32_t) +AC_CHECK_SIZEOF(int64_t) +AC_CHECK_SIZEOF(uint64_t) +AC_CHECK_SIZEOF(u_int64_t) + +dnl int16_t +if test "x$ac_cv_sizeof_short" = "x2"; then + AC_CHECK_TYPE(int16_t,short) +elif test "x$ac_cv_sizeof_int" = "x2"; then + AC_CHECK_TYPE(int16_t,int) +fi +dnl u_int16t_t +if test "x$ac_cv_sizeof_uint16_t" = "x2"; then + AC_CHECK_TYPE(u_int16_t,uint16_t) +elif test "x$ac_cv_sizeof_short" = "x2"; then + AC_CHECK_TYPE(u_int16_t,unsigned short) +elif test "x$ac_cv_sizeof_int" = "x2"; then + AC_CHECK_TYPE(u_int16_t,unsigned int) +fi +dnl int32_t +if test "x$ac_cv_sizeof_int" = "x4"; then + AC_CHECK_TYPE(int32_t,int) +elif "x$ac_cv_sizeof_long" = "x4"; then + AC_CHECK_TYPE(int32_t,long) +fi +dnl u_int32_t +if test "x$ac_cv_sizeof_uint32_t" = "x4"; then + AC_CHECK_TYPE(u_int32_t,uint32_t) +elif test "x$ac_cv_sizeof_int" = "x4"; then + AC_CHECK_TYPE(u_int32_t,unsigned int) +elif test "x$ac_cv_sizeof_long" = "x4"; then + AC_CHECK_TYPE(u_int32_t,unsigned long) +fi +dnl int64_t +if test "x$ac_cv_sizeof_long" = "x8"; then + AC_CHECK_TYPE(int64_t,long) +elif test "x$ac_cv_sizeof_long_long" = "x8"; then + AC_CHECK_TYPE(int64_t,long long) +elif test "x$ac_cv_sizeof___int64" = "x8"; then + AC_CHECK_TYPE(int64_t,__int64) +fi +dnl u_int64_t +if test "x$ac_cv_sizeof_uint64_t" = "x8"; then + AC_CHECK_TYPE(u_int64_t,uint64_t) +elif test "x$ac_cv_sizeof_long" = "x8"; then + AC_CHECK_TYPE(u_int64_t,unsigned long) +elif test "x$ac_cv_sizeof_long_long" = "x8"; then + AC_CHECK_TYPE(u_int64_t,unsigned long long) +elif test "x$ac_cv_sizeof___int64" = "x8"; then + AC_CHECK_TYPE(int64_t,unsigned __int64) +fi AC_CHECK_TYPE(pid_t, int) AC_CHECK_TYPE(size_t, unsigned int) @@ -1097,6 +1155,10 @@ AC_CHECK_TYPE(mode_t, u_short) AC_CHECK_TYPE(fd_mask, int) +dnl Check for special functions +AC_FUNC_ALLOCA + + dnl Check for type in sys/socket.h AC_CACHE_CHECK(for socklen_t, ac_cv_type_socklen_t, [ AC_EGREP_CPP([socklen_t[^a-zA-Z_0-9]], [#include @@ -1344,6 +1406,8 @@ syslog \ timegm \ vsnprintf \ + bswap_16 \ + bswap_32 \ ) dnl Yay! Another Linux brokenness. Its not good enough Index: include/config.h.in =================================================================== RCS file: /cvsroot/squid/squid/include/config.h.in,v retrieving revision 1.1.1.3.10.4 diff -u -r1.1.1.3.10.4 config.h.in --- include/config.h.in 2001/01/23 10:33:37 1.1.1.3.10.4 +++ include/config.h.in 2001/02/22 08:07:46 @@ -183,17 +183,10 @@ #define squid_srandom srand #endif -/* 32 bit integer compatability hack */ -#if SIZEOF_INT == 4 -typedef int num32; -typedef unsigned int u_num32; -#elif SIZEOF_LONG == 4 -typedef long num32; -typedef unsigned long u_num32; -#else -typedef long num32; /* assume that long's are 32bit */ -typedef unsigned long u_num32; -#endif -#define NUM32LEN sizeof(num32) /* this should always be 4 */ +/* 32 bit integer compatability */ +#include "squid_types.h" +#define num32 int32_t +#define u_num32 u_int32_t + #endif /* _CONFIG_H_ */ Index: include/ntlmauth.h =================================================================== RCS file: /cvsroot/squid/squid/include/ntlmauth.h,v retrieving revision 1.1.2.3 diff -u -r1.1.2.3 ntlmauth.h --- include/ntlmauth.h 2001/01/23 10:33:37 1.1.2.3 +++ include/ntlmauth.h 2001/02/22 08:07:46 @@ -53,7 +53,8 @@ #ifndef _NTLMAUTH_H_ #define _NTLMAUTH_H_ -#include /* for *int32_t */ +/* int*_t */ +#include "squid_types.h" /* All of this cruft is little endian */ #ifdef WORDS_BIGENDIAN @@ -63,6 +64,17 @@ #define SSWAP(x) (x) #define WSWAP(x) (x) #endif + +#ifdef HAVE_BYTESWAP_H +#include +#define bswap16(x) bswap_16(x) +#define bswap32(x) bswap_32(x) +#else /* HAVE_BISTWAP_H */ +#define bswap16(x) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) +#define bswap32(x) \ + ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) +#endif /* HAVE_BITSWAP_H */ /* Used internally. Microsoft seems to think this is right, I believe them. * Right. */