]> git.ipfire.org Git - thirdparty/squid.git/blame - src/compat/compat.h
Initial import of libcompat code
[thirdparty/squid.git] / src / compat / compat.h
CommitLineData
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.
10 * That means we can eventually have a seperate libcompat for most
11 * compatability and portability hacks and resolutions.
12 *
13 * This file is meant to collate all those hacks files together and
14 * provide a simple include form them in the core squid headers
15 * (presently squid.h and config.h)
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
19 * squid.h at the top line of your .cc or .h file.
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/******************************************************/
27#include "compat/osdetect.h"
28
29
30/*****************************************************/
31/* FDSETSIZE is messy and needs to be done before */
32/* sys/types.h are defined. */
33/*****************************************************/
34#include "compat/squid_fdsetsize.h"
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
52#include "os/squid_aix.h"
53#include "os/squid_freebsd.h"
54#include "os/squid_hpux.h"
55#include "os/squid_linux.h"
56#include "os/squid_mswin.h"
57#include "os/squid_next.h"
58#include "os/squid_openbsd.h"
59#include "os/squid_qnx.h"
60#include "os/squid_sgi.h"
61#include "os/squid_solaris.h"
62#include "os/squid_windows.h"
63
64/*****************************************************/
65/* portabilities shared between all platforms and */
66/* components as found to be needed */
67/*****************************************************/
68
69#include "compat_shared.h"
70#include "squid_stdvarargs.h"
71#include "compat/assert.h"
72
73/*****************************************************/
74/* component-specific portabilities */
75/*****************************************************/
76
77/* Valgrind API macros changed between two versions squid supports */
78#include "squid_valgrind.h"
79
80/* Endian functions are usualy handled by the OS but not always. */
81#include "squid_endian.h"
82
83/**
84 * A Regular Expression library is bundled with Squid.
85 * Default is to use a system provided one, but the bundle
86 * may be used instead with explicit configuration.
87 */
88#include "compat/GnuRegex.h"
89
90
91#endif /* _SQUID_COMPAT_H */