]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - compat/compat.h
SourceFormat Enforcement
[thirdparty/squid.git] / compat / compat.h
index 160029171180cda5f86a060f0fa4ce7f462c08e1..6cb68d5423aefb3fa4f5b5204626d974c57a1126 100644 (file)
@@ -1,7 +1,3 @@
-#ifndef SQUID_CONFIG_H
-#include "config.h"
-#endif
-
 #ifndef _SQUID_COMPAT_H
 #define _SQUID_COMPAT_H
 
  *
  * This file is meant to collate all those hacks files together and
  * provide a simple include for them in the core squid headers
- * (presently squid.h and config.h)
+ * (presently squid.h)
  *
  * It should not be included directly in any of the squid sources.
  * If your code requires any symbols from here you should be importing
- * config.h/squid.h at the top line of your .cc or .h file.
+ * squid.h at the top line of your .cc file.
  */
 
-
 /******************************************************/
 /* Define the _SQUID_TYPE_ based on a guess of the OS */
 /* NP: this MUST come first within compat.h           */
 /******************************************************/
 #include "compat/osdetect.h"
 
+/* ugly hack. But we need to set this REALLY soon in the header */
+#if _SQUID_SOLARIS_ && !defined(__GNUC__) && !defined(__GNUG__)
+#ifndef __EXTENSIONS__
+#define __EXTENSIONS__ 1
+#endif
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 1
+#endif
+#ifndef _XOPEN_SOURCE_EXTENDED
+#define _XOPEN_SOURCE_EXTENDED 1
+#endif
+#endif
 
 /*****************************************************/
 /* FDSETSIZE is messy and needs to be done before    */
@@ -33,7 +40,6 @@
 /*****************************************************/
 #include "compat/fdsetsize.h"
 
-
 /*****************************************************/
 /* Global type re-definitions                        */
 /* this also takes care of the basic system includes */
@@ -42,7 +48,7 @@
 /** On linux this must be defined to get PRId64 and friends */
 #define __STDC_FORMAT_MACROS
 
-#include "squid_types.h"
+#include "compat/types.h"
 
 /*****************************************************/
 /* per-OS hacks. One file per OS.                    */
@@ -54,7 +60,9 @@
 #include "compat/os/freebsd.h"
 #include "compat/os/hpux.h"
 #include "compat/os/linux.h"
+#include "compat/os/macosx.h"
 #include "compat/os/mswin.h"
+#include "compat/os/netbsd.h"
 #include "compat/os/next.h"
 #include "compat/os/openbsd.h"
 #include "compat/os/os2.h"
@@ -64,7 +72,6 @@
 #include "compat/os/sunos.h"
 #include "compat/os/windows.h"
 
-
 /*****************************************************/
 /* portabilities shared between all platforms and    */
 /* components as found to be needed                  */
@@ -74,6 +81,8 @@
 #include "compat/stdvarargs.h"
 #include "compat/assert.h"
 
+/* cstdio has a bunch of problems with 64-bit definitions */
+#include "compat/stdio.h"
 
 /*****************************************************/
 /* component-specific portabilities                  */
  */
 #include "compat/GnuRegex.h"
 
+/* some functions are unsafe to be used in Squid. */
+#include "compat/unsafe.h"
+
+/* cppunit is not quite C++0x compatible yet */
+#include "compat/cppunit.h"
 
 #endif /* _SQUID_COMPAT_H */