]> git.ipfire.org Git - thirdparty/squid.git/blob - include/squid.h
Renamed squid.h to squid-old.h and config.h to squid.h
[thirdparty/squid.git] / include / squid.h
1 /*
2 * $Id$
3 *
4 * AUTHOR: Duane Wessels
5 *
6 * SQUID Web Proxy Cache http://www.squid-cache.org/
7 * ----------------------------------------------------------
8 *
9 * Squid is the result of efforts by numerous individuals from
10 * the Internet community; see the CONTRIBUTORS file for full
11 * details. Many organizations have provided support for Squid's
12 * development; see the SPONSORS file for full details. Squid is
13 * Copyrighted (C) 2001 by the Regents of the University of
14 * California; see the COPYRIGHT file for full details. Squid
15 * incorporates software developed and/or copyrighted by other
16 * sources; see the CREDITS file for full details.
17 *
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
22 *
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
31 *
32 */
33
34 #ifndef SQUID_CONFIG_H
35 #define SQUID_CONFIG_H
36
37 #include "autoconf.h" /* For GNU autoconf variables */
38
39 #if !defined(HAVE_SQUID)
40 /* sub-packages define their own version details */
41 #include "version.h"
42
43 #endif
44
45 /* default values for listen ports. Usually specified in squid.conf really */
46 #define CACHE_HTTP_PORT 3128
47 #define CACHE_ICP_PORT 3130
48
49 /* To keep API definitions clear */
50 #ifdef __cplusplus
51 #define SQUIDCEXTERN extern "C"
52 #else
53 #define SQUIDCEXTERN extern
54 #endif
55
56 #if _USE_INLINE_
57 #define _SQUID_INLINE_ inline
58 #else
59 #define _SQUID_INLINE_
60 #endif
61
62 /****************************************************************************
63 *--------------------------------------------------------------------------*
64 * DO *NOT* MAKE ANY CHANGES below here unless you know what you're doing...*
65 *--------------------------------------------------------------------------*
66 ****************************************************************************/
67
68 #include "compat/compat.h"
69
70 #ifdef USE_POSIX_REGEX
71 #ifndef USE_RE_SYNTAX
72 #define USE_RE_SYNTAX REG_EXTENDED /* default Syntax */
73 #endif
74 #endif
75
76 #if !defined(CACHEMGR_HOSTNAME)
77 #define CACHEMGR_HOSTNAME ""
78 #else
79 #define CACHEMGR_HOSTNAME_DEFINED 1
80 #endif
81
82 #if SQUID_DETECT_UDP_SO_SNDBUF > 16384
83 #define SQUID_UDP_SO_SNDBUF 16384
84 #else
85 #define SQUID_UDP_SO_SNDBUF SQUID_DETECT_UDP_SO_SNDBUF
86 #endif
87
88 #if SQUID_DETECT_UDP_SO_RCVBUF > 16384
89 #define SQUID_UDP_SO_RCVBUF 16384
90 #else
91 #define SQUID_UDP_SO_RCVBUF SQUID_DETECT_UDP_SO_RCVBUF
92 #endif
93
94 #if HAVE_RANDOM
95 #define squid_random random
96 #define squid_srandom srandom
97 #elif HAVE_LRAND48
98 #define squid_random lrand48
99 #define squid_srandom srand48
100 #else
101 #define squid_random rand
102 #define squid_srandom srand
103 #endif
104
105 /*
106 * Determine if this is a leak check build or standard
107 */
108 #if PURIFY
109 #define LEAK_CHECK_MODE 1
110 #elif WITH_VALGRIND
111 #define LEAK_CHECK_MODE 1
112 #elif XMALLOC_TRACE
113 #define LEAK_CHECK_MODE 1
114 #endif
115
116 /* temp hack: needs to be pre-defined for now. */
117 #define SQUID_MAXPATHLEN 256
118
119 #endif /* SQUID_CONFIG_H */