From: Francesco Chemolli Date: Wed, 31 Mar 2010 15:59:21 +0000 (+0200) Subject: Merged from trunk. X-Git-Tag: SQUID_3_2_0_1~310^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4be7fcf8cad48bf113070fe238d00bb4472cbeda;p=thirdparty%2Fsquid.git Merged from trunk. --- 4be7fcf8cad48bf113070fe238d00bb4472cbeda diff --cc configure.in index dddbe3f194,13ce8cc249..f5999f0654 --- a/configure.in +++ b/configure.in @@@ -2143,8 -2398,11 +2143,10 @@@ AC_ARG_WITH(filedescriptors esac ]) -AC_PATH_PROG(CPPUNITCONFIG, cppunit-config, false) if $CPPUNITCONFIG --help >/dev/null; then - AC_MSG_NOTICE([using system installed cppunit]) + squid_cv_cppunit_version="`$CPPUNITCONFIG --version`" + AC_MSG_NOTICE([using system installed cppunit version $squid_cv_cppunit_version]) + unset squid_cv_cppunit_version SQUID_CPPUNIT_LIBS="`$CPPUNITCONFIG --libs`" SQUID_CPPUNIT_LA='' SQUID_CPPUNIT_INC="`$CPPUNITCONFIG --cflags`" diff --cc include/config.h index 23f5b8f2ca,5a5d751bc2..b98992380e --- a/include/config.h +++ b/include/config.h @@@ -63,122 -63,6 +63,121 @@@ #endif #endif - +/* Typedefs for missing entries on a system */ + +/* int8_t */ +#if !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 */ +#if !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 */ +#if !HAVE_INT16_T +#if HAVE_SHORT && SIZEOF_SHORT == 2 +typedef short int16_t; +#elif HAVE_INT && SIZEOF_INT == 2 +typedef int int16_t; +#else +#error NO 16 bit signed type available +#endif +#endif + +/* u_int16_t */ +#if !HAVE_U_INT16_T +#if HAVE_UINT16_T +typedef uint16_t u_int16_t; +#else +typedef unsigned int16_t u_int16_t; +#endif +#endif + +/* int32_t */ +#if !HAVE_INT32_T +#if HAVE_INT && SIZEOF_INT == 4 +typedef int int32_t; +#elif HAVE_LONG && SIZEOF_LONG == 4 +typedef long int32_t; +#else +#error NO 32 bit signed type available +#endif +#endif + +/* u_int32_t */ +#if !HAVE_U_INT32_T +#if HAVE_UINT32_T +typedef uint32_t u_int32_t; +#else +typedef unsigned int32_t u_int32_t; +#endif +#endif + +/* int64_t */ +#if !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 */ +#if !HAVE_U_INT64_T +#if HAVE_UINT64_T +typedef uint64_t u_int64_t; +#else +typedef unsigned int64_t u_int64_t; +#endif +#endif + + +#if !HAVE_PID_T +typedef int pid_t; +#endif + +#if !HAVE_SIZE_T +typedef unsigned int size_t; +#endif + +#if !HAVE_SSIZE_T +typedef int ssize_t; +#endif + +#if !HAVE_OFF_T +typedef int off_t; +#endif + +#if !HAVE_MODE_T +typedef unsigned short mode_t; +#endif + +#if !HAVE_FD_MASK +typedef unsigned long fd_mask; +#endif + +#if !HAVE_SOCKLEN_T +typedef int socklen_t; +#endif + +#if !HAVE_MTYP_T +typedef long mtyp_t; +#endif + #if !defined(CACHEMGR_HOSTNAME) #define CACHEMGR_HOSTNAME "" #else diff --cc lib/Profiler.c index f274b03947,d026a3ce58..015b5f4849 --- a/lib/Profiler.c +++ b/lib/Profiler.c @@@ -105,13 -113,16 +113,16 @@@ * */ - #include "profiling.h" - - #include + #define SQUID_NO_ALLOC_PROTECT 1 + #include "config.h" -#ifdef USE_XPROF_STATS +#if USE_XPROF_STATS + #include "profiling.h" + #if HAVE_ASSERT_H + #include + #endif #if HAVE_GNUMALLLOC_H #include #elif HAVE_MALLOC_H diff --cc lib/getnameinfo.c index 33c97d0fa7,bec315ba56..16aba171ce --- a/lib/getnameinfo.c +++ b/lib/getnameinfo.c @@@ -75,11 -75,11 +75,11 @@@ * - gethostbyaddr() is usually not thread safe. */ -#ifndef HAVE_GETNAMEINFO +#if !HAVE_GETNAMEINFO - #if HAVE_SYS_TYPES_H - #include - #endif + #include "compat/inet_ntop.h" + #include "compat/getaddrinfo.h" + #if HAVE_STDIO_H #include #endif diff --cc src/comm_poll.cc index 99c4ea4391,cec07ac256..82be872279 --- a/src/comm_poll.cc +++ b/src/comm_poll.cc @@@ -39,8 -38,22 +38,22 @@@ #include "Store.h" #include "fde.h" -#ifdef USE_POLL +#if USE_POLL + #if HAVE_POLL_H + #include + #endif + + /* Needed for poll() on Linux at least */ + #if USE_POLL + #ifndef POLLRDNORM + #define POLLRDNORM POLLIN + #endif + #ifndef POLLWRNORM + #define POLLWRNORM POLLOUT + #endif + #endif + static int MAX_POLL_TIME = 1000; /* see also comm_quick_poll_required() */ #ifndef howmany diff --cc src/dnsserver.cc index 44369f69bd,441815d498..b64cc9bb30 --- a/src/dnsserver.cc +++ b/src/dnsserver.cc @@@ -119,12 -109,9 +109,9 @@@ #if HAVE_BSTRING_H #include #endif -#ifdef HAVE_CRYPT_H +#if HAVE_CRYPT_H #include #endif - #if HAVE_SYS_SELECT_H - #include - #endif #if HAVE_GETOPT_H #include #endif @@@ -335,10 -322,10 +322,10 @@@ lookup(const char *buf /* deprecated. obsolete on some OS */ case EAI_NODATA: #endif -#ifdef EAI_NONAME +#if EAI_NONAME case EAI_NONAME: #endif - printf("$fail DNS Domain/IP '%s' exists without any FQDN/IPs: %s.\n", buf, xgai_strerror(res)); + printf("$fail DNS Domain/IP '%s' exists without any FQDN/IPs: %s.\n", buf, gai_strerror(res)); break; #endif default: diff --cc src/squid.h index 86b033ba93,5701aa8f41..88fc34c247 --- a/src/squid.h +++ b/src/squid.h @@@ -270,26 -157,11 +157,11 @@@ using namespace Squid #if USE_SSL #include "ssl_support.h" #endif - - /* Needed for poll() on Linux at least */ - #if USE_POLL - #ifndef POLLRDNORM - #define POLLRDNORM POLLIN - #endif - #ifndef POLLWRNORM - #define POLLWRNORM POLLOUT - #endif - #endif - -#ifdef SQUID_SNMP +#if SQUID_SNMP #include "cache_snmp.h" #endif - #include "hash.h" #include "rfc3596.h" - - #include "defines.h" #include "enums.h" #include "typedefs.h" diff --cc test-suite/pconn-banger.c index e5a95f9996,0527d06627..6f0b135c37 --- a/test-suite/pconn-banger.c +++ b/test-suite/pconn-banger.c @@@ -44,21 -10,15 +10,15 @@@ #if HAVE_FCNTL_H #include #endif -#ifdef HAVE_STRING_H +#if HAVE_STRING_H #include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H #include #endif -#ifdef HAVE_BSTRING_H +#if HAVE_BSTRING_H #include #endif - #if HAVE_SYS_TYPES_H - #include - #endif - #if HAVE_SYS_SELECT_H - #include - #endif #if HAVE_SIGNAL_H #include #endif diff --cc test-suite/tcp-banger2.c index 62a335938a,d3072c4379..4c775497eb --- a/test-suite/tcp-banger2.c +++ b/test-suite/tcp-banger2.c @@@ -45,18 -42,12 +42,12 @@@ #if HAVE_FCNTL_H #include #endif -#ifdef HAVE_STRING_H +#if HAVE_STRING_H #include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H #include #endif - #if HAVE_SYS_TYPES_H - #include - #endif - #if HAVE_SYS_SELECT_H - #include - #endif #if HAVE_SIGNAL_H #include #endif diff --cc test-suite/tcp-banger3.c index 731685d5ec,79c3470688..7161503616 --- a/test-suite/tcp-banger3.c +++ b/test-suite/tcp-banger3.c @@@ -43,18 -40,12 +40,12 @@@ #if HAVE_FCNTL_H #include #endif -#ifdef HAVE_STRING_H +#if HAVE_STRING_H #include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H #include #endif - #if HAVE_SYS_TYPES_H - #include - #endif - #if HAVE_SYS_SELECT_H - #include - #endif #if HAVE_SIGNAL_H #include #endif