]> git.ipfire.org Git - thirdparty/squid.git/blame - include/squid.h
SourceFormat Enforcement
[thirdparty/squid.git] / include / squid.h
CommitLineData
4d683a65 1/*
bde978a6 2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
c5dd4956 3 *
5c193dec
AJ
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
4d683a65 7 */
8
b5638623 9#ifndef SQUID_CONFIG_H
10#define SQUID_CONFIG_H
4d683a65 11
f53969cc 12#include "autoconf.h" /* For GNU autoconf variables */
d1f95b42
AJ
13
14#if !defined(HAVE_SQUID)
15/* sub-packages define their own version details */
4d683a65 16#include "version.h"
17
d1f95b42
AJ
18#endif
19
cdb352bb
FC
20/* default values for listen ports. Usually specified in squid.conf really */
21#define CACHE_HTTP_PORT 3128
22#define CACHE_ICP_PORT 3130
23
e6ccf245 24/* To keep API definitions clear */
25#ifdef __cplusplus
26#define SQUIDCEXTERN extern "C"
27#else
28#define SQUIDCEXTERN extern
29#endif
30
73862432
FC
31#if _USE_INLINE_
32#define _SQUID_INLINE_ inline
33#else
34#define _SQUID_INLINE_
35#endif
36
4d683a65 37/****************************************************************************
38 *--------------------------------------------------------------------------*
39 * DO *NOT* MAKE ANY CHANGES below here unless you know what you're doing...*
40 *--------------------------------------------------------------------------*
41 ****************************************************************************/
42
eee95dfe 43#include "compat/compat.h"
f04e1182 44
4d683a65 45#ifdef USE_POSIX_REGEX
46#ifndef USE_RE_SYNTAX
f53969cc 47#define USE_RE_SYNTAX REG_EXTENDED /* default Syntax */
4d683a65 48#endif
49#endif
50
4d683a65 51#if !defined(CACHEMGR_HOSTNAME)
52#define CACHEMGR_HOSTNAME ""
42ad37af 53#else
54#define CACHEMGR_HOSTNAME_DEFINED 1
4d683a65 55#endif
56
6a9f6389 57#if SQUID_DETECT_UDP_SO_SNDBUF > 16384
4d683a65 58#define SQUID_UDP_SO_SNDBUF 16384
6a9f6389 59#else
60#define SQUID_UDP_SO_SNDBUF SQUID_DETECT_UDP_SO_SNDBUF
4d683a65 61#endif
62
6a9f6389 63#if SQUID_DETECT_UDP_SO_RCVBUF > 16384
4d683a65 64#define SQUID_UDP_SO_RCVBUF 16384
6a9f6389 65#else
66#define SQUID_UDP_SO_RCVBUF SQUID_DETECT_UDP_SO_RCVBUF
4d683a65 67#endif
68
4d683a65 69#if HAVE_RANDOM
70#define squid_random random
71#define squid_srandom srandom
72#elif HAVE_LRAND48
73#define squid_random lrand48
74#define squid_srandom srand48
75#else
76#define squid_random rand
77#define squid_srandom srand
78#endif
79
b4bab919 80/*
81 * Determine if this is a leak check build or standard
82 */
95ba9ef0 83#if PURIFY || WITH_VALGRIND
b4bab919 84#define LEAK_CHECK_MODE 1
85#endif
86
82b7abe3
AJ
87/* temp hack: needs to be pre-defined for now. */
88#define SQUID_MAXPATHLEN 256
cee08cbc 89
26799597
AJ
90// TODO: determine if this is required. OR if compat/os/mswindows.h works
91#if _SQUID_WINDOWS_ && defined(__cplusplus)
aff65b83
AJ
92/** \cond AUTODOCS-IGNORE */
93using namespace Squid;
94/** \endcond */
95#endif
96
dbfe23be
AJ
97// temporary for the definition of LOCAL_ARRAY
98#include "leakcheck.h"
99
b5638623 100#endif /* SQUID_CONFIG_H */
f53969cc 101