]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - include/config.h
Cleanup: zap CVS Id tags
[thirdparty/squid.git] / include / config.h
index fa59c7770522fb1de787de1b17cdda56573ce81d..a267e258d1c3a9f4d7817c388dcccb97fc83a73d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: config.h,v 1.23 2006/09/03 04:09:35 hno Exp $
+ * $Id$
  *
  * AUTHOR: Duane Wessels
  *
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *  
+ *
  */
 
 #ifndef SQUID_CONFIG_H
 #define SQUID_CONFIG_H
 
 #include "autoconf.h"          /* For GNU autoconf variables */
+
+#if !defined(HAVE_SQUID)
+/* sub-packages define their own version details */
 #include "version.h"
 
+#endif
+
 /* To keep API definitions clear */
 #ifdef __cplusplus
 #define SQUIDCEXTERN extern "C"
 #elif defined(__OpenBSD__)
 #define _SQUID_OPENBSD_
 
+#elif defined(__DragonFly__)
+#define _SQUID_DRAGONFLY_
+
 #elif defined(__CYGWIN32__)  || defined(__CYGWIN__)
 #define _SQUID_CYGWIN_
 #define _SQUID_WIN32_
 #elif defined(__EMX__) || defined(OS2) || defined(__OS2__)
 #define _SQUID_OS2_
 /*
- *  FIXME: the os2 port of bash seems to have problems checking
- *  the return codes of programs in if statements.  These options
- *  need to be overridden.
- */
+*  FIXME: the os2 port of bash seems to have problems checking
+*  the return codes of programs in if statements.  These options
+*  need to be overridden.
+*/
 #endif
 
 /* FD_SETSIZE must be redefined before including sys/types.h */
 #define FD_SETSIZE SQUID_MAXFD
 #endif
 
-
-
-/* 
- * This is hack to allow compiling IPv6-IPv4 version,
- * not disturbing branches others than squid3-ipv6 
- */
-
-#ifdef INET6 
-#define IN_ADDR in6_addr
-#else
-#define IN_ADDR in_addr
-#endif
-
 /* Typedefs for missing entries on a system */
 
 #include "squid_types.h"
@@ -330,25 +325,33 @@ typedef long mtyp_t;
 #if defined(_SQUID_SOLARIS_) && (defined(i386) || defined(__i386))
 #ifndef HAVE_PAD128_T
 typedef union {
-       long double     _q;
-       int32_t         _l[4];
+    long double        _q;
+    int32_t            _l[4];
 } pad128_t;
 #endif
 #ifndef HAVE_UPAD128_T
 typedef union {
-       long double     _q;
-       uint32_t        _l[4];
+    long double        _q;
+    uint32_t   _l[4];
 } upad128_t;
 #endif
 #endif
 
-/* 
- * Don't allow inclusion of malloc.h on FreeBSD, Next and OpenBSD 
+/*
+ * Don't allow inclusion of malloc.h on FreeBSD, Next and OpenBSD
  */
-#if defined(HAVE_MALLOC_H) && (defined(_SQUID_FREEBSD_) || defined(_SQUID_NEXT_) || defined(_SQUID_OPENBSD_))
+#if defined(HAVE_MALLOC_H) && (defined(_SQUID_FREEBSD_) || defined(_SQUID_NEXT_) || defined(_SQUID_OPENBSD_) || defined(_SQUID_DRAGONFLY_))
 #undef HAVE_MALLOC_H
 #endif
 
+/*
+ * res_init() is just a macro re-definition of __res_init on Linux (Debian/Ubuntu)
+ */
+#if !defined(HAVE_RES_INIT) && defined(HAVE___RES_INIT) && !defined(res_init)
+#define res_init  __res_init
+#define HAVE_RES_INIT  HAVE___RES_INIT
+#endif
+
 #if !defined(CACHEMGR_HOSTNAME)
 #define CACHEMGR_HOSTNAME ""
 #else
@@ -409,7 +412,7 @@ typedef union {
 
 /* gcc doesn't recognize the Windows native 64 bit formatting tags causing
  * the compile fail, so we must disable the check on native Windows.
- */  
+ */
 
 #if __GNUC__ && !defined(_SQUID_MSWIN_)
 #define PRINTF_FORMAT_ARG1 __attribute__ ((format (printf, 1, 2)))
@@ -437,15 +440,32 @@ typedef union {
  */
 #if WITH_VALGRIND
 #include <valgrind/memcheck.h>
+/* A little glue for older valgrind version prior to 3.2.0 */
+#ifndef VALGRIND_MAKE_MEM_NOACCESS
+#define VALGRIND_MAKE_MEM_NOACCESS VALGRIND_MAKE_NOACCESS
+#define VALGRIND_MAKE_MEM_UNDEFINED VALGRIND_MAKE_WRITABLE
+#define VALGRIND_MAKE_MEM_DEFINED VALGRIND_MAKE_READABLE
+#define VALGRIND_CHECK_MEM_IS_ADDRESSABLE VALGRIND_CHECK_WRITABLE
 #else
-#define VALGRIND_MAKE_NOACCESS(a,b) (0)
-#define VALGRIND_MAKE_WRITABLE(a,b) (0)
-#define VALGRIND_MAKE_READABLE(a,b) (0)
-#define VALGRIND_CHECK_WRITABLE(a,b) (0)
-#define VALGRIND_CHECK_READABLE(a,b) (0)
+#undef VALGRIND_MAKE_NOACCESS
+#undef VALGRIND_MAKE_WRITABLE
+#undef VALGRIND_MAKE_READABLE
+#endif
+#else
+#define VALGRIND_MAKE_MEM_NOACCESS(a,b) (0)
+#define VALGRIND_MAKE_MEM_UNDEFINED(a,b) (0)
+#define VALGRIND_MAKE_MEM_DEFINED(a,b) (0)
+#define VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,b) (0)
+#define VALGRIND_CHECK_MEM_IS_DEFINED(a,b) (0)
 #define VALGRIND_MALLOCLIKE_BLOCK(a,b,c,d)
 #define VALGRIND_FREELIKE_BLOCK(a,b)
 #define RUNNING_ON_VALGRIND 0
 #endif /* WITH_VALGRIND */
 
+
+/*
+ * strnstr() is needed. The OS may not provide a working copy.
+ */
+#include "strnstr.h"
+
 #endif /* SQUID_CONFIG_H */