]>
Commit | Line | Data |
---|---|---|
f04e1182 AJ |
1 | #ifndef SQUID_CONFIG_H |
2 | #include "config.h" | |
3 | #endif | |
4 | ||
5 | #ifndef _SQUID_COMPAT_H | |
6 | #define _SQUID_COMPAT_H | |
7 | ||
8 | /* | |
9 | * From discussions it was chosen to push compat code as far down as possible. | |
eee95dfe | 10 | * That means we can have a seperate compat for most |
f04e1182 | 11 | * compatability and portability hacks and resolutions. |
af6a12ee | 12 | * |
f04e1182 | 13 | * This file is meant to collate all those hacks files together and |
5cf3b000 | 14 | * provide a simple include for them in the core squid headers |
af6a12ee | 15 | * (presently squid.h and config.h) |
f04e1182 AJ |
16 | * |
17 | * It should not be included directly in any of the squid sources. | |
18 | * If your code requires any symbols from here you should be importing | |
5cf3b000 | 19 | * config.h/squid.h at the top line of your .cc or .h file. |
f04e1182 AJ |
20 | */ |
21 | ||
22 | ||
23 | /******************************************************/ | |
24 | /* Define the _SQUID_TYPE_ based on a guess of the OS */ | |
25 | /* NP: this MUST come first within compat.h */ | |
26 | /******************************************************/ | |
eee95dfe | 27 | #include "compat/osdetect.h" |
f04e1182 AJ |
28 | |
29 | ||
30 | /*****************************************************/ | |
31 | /* FDSETSIZE is messy and needs to be done before */ | |
32 | /* sys/types.h are defined. */ | |
33 | /*****************************************************/ | |
eee95dfe | 34 | #include "compat/fdsetsize.h" |
f04e1182 AJ |
35 | |
36 | ||
37 | /*****************************************************/ | |
38 | /* Global type re-definitions */ | |
39 | /* this also takes care of the basic system includes */ | |
40 | /*****************************************************/ | |
41 | ||
42 | /** On linux this must be defined to get PRId64 and friends */ | |
43 | #define __STDC_FORMAT_MACROS | |
44 | ||
45 | #include "squid_types.h" | |
46 | ||
47 | /*****************************************************/ | |
48 | /* per-OS hacks. One file per OS. */ | |
49 | /* OS-macro wrapping should be done inside the OS .h */ | |
50 | /*****************************************************/ | |
51 | ||
eee95dfe AJ |
52 | #include "compat/os/aix.h" |
53 | #include "compat/os/dragonfly.h" | |
54 | #include "compat/os/freebsd.h" | |
55 | #include "compat/os/hpux.h" | |
56 | #include "compat/os/linux.h" | |
57 | #include "compat/os/mswin.h" | |
58 | #include "compat/os/next.h" | |
59 | #include "compat/os/openbsd.h" | |
60 | #include "compat/os/os2.h" | |
61 | #include "compat/os/qnx.h" | |
62 | #include "compat/os/sgi.h" | |
63 | #include "compat/os/solaris.h" | |
64 | #include "compat/os/sunos.h" | |
65 | #include "compat/os/windows.h" | |
f04e1182 | 66 | |
5cf3b000 | 67 | |
f04e1182 AJ |
68 | /*****************************************************/ |
69 | /* portabilities shared between all platforms and */ | |
70 | /* components as found to be needed */ | |
71 | /*****************************************************/ | |
72 | ||
eee95dfe AJ |
73 | #include "compat/compat_shared.h" |
74 | #include "compat/stdvarargs.h" | |
75 | #include "compat/assert.h" | |
f04e1182 | 76 | |
fdbb3b19 | 77 | |
f04e1182 AJ |
78 | /*****************************************************/ |
79 | /* component-specific portabilities */ | |
80 | /*****************************************************/ | |
81 | ||
fdbb3b19 AJ |
82 | /* helper debugging requires some hacks to be clean */ |
83 | #include "compat/helper_debug.h" | |
84 | ||
f04e1182 | 85 | /* Valgrind API macros changed between two versions squid supports */ |
eee95dfe | 86 | #include "compat/valgrind.h" |
f04e1182 AJ |
87 | |
88 | /* Endian functions are usualy handled by the OS but not always. */ | |
89 | #include "squid_endian.h" | |
90 | ||
91 | /** | |
92 | * A Regular Expression library is bundled with Squid. | |
93 | * Default is to use a system provided one, but the bundle | |
94 | * may be used instead with explicit configuration. | |
95 | */ | |
eee95dfe | 96 | #include "compat/GnuRegex.h" |
f04e1182 AJ |
97 | |
98 | ||
99 | #endif /* _SQUID_COMPAT_H */ |