]> git.ipfire.org Git - thirdparty/squid.git/blame - include/config.h
The rearrangement of store/file numbers broke the on-disk STORE_META_STD
[thirdparty/squid.git] / include / config.h
CommitLineData
4d683a65 1/*
2 * $Id: config.h,v 1.1 2001/09/25 23:45:15 robertc Exp $
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 _CONFIG_H_
35#define _CONFIG_H_
36
37#include "autoconf.h" /* For GNU autoconf variables */
38#include "version.h"
39
40/****************************************************************************
41 *--------------------------------------------------------------------------*
42 * DO *NOT* MAKE ANY CHANGES below here unless you know what you're doing...*
43 *--------------------------------------------------------------------------*
44 ****************************************************************************/
45
46#ifdef USE_POSIX_REGEX
47#ifndef USE_RE_SYNTAX
48#define USE_RE_SYNTAX REG_EXTENDED /* default Syntax */
49#endif
50#endif
51
52/* define the _SQUID_TYPE_ based on a guess of the OS */
53#if defined(__sun__) || defined(__sun) /* SUN */
54#define _SQUID_SUN_
55#if defined(__SVR4) /* SOLARIS */
56#define _SQUID_SOLARIS_
57#else /* SUNOS */
58#define _SQUID_SUNOS_
59#endif
60
61#elif defined(__hpux) /* HP-UX - SysV-like? */
62#define _SQUID_HPUX_
63#define _SQUID_SYSV_
64
65#elif defined(__osf__) /* OSF/1 */
66#define _SQUID_OSF_
67
68#elif defined(__ultrix) /* Ultrix */
69#define _SQUID_ULTRIX_
70
71#elif defined(_AIX) /* AIX */
72#define _SQUID_AIX_
73
74#elif defined(__linux__) /* Linux */
75#define _SQUID_LINUX_
76#if USE_ASYNC_IO
77#define _SQUID_LINUX_THREADS_
78#endif
79
80#elif defined(__FreeBSD__) /* FreeBSD */
81#define _SQUID_FREEBSD_
82#if USE_ASYNC_IO && defined(LINUXTHREADS)
83#define _SQUID_LINUX_THREADS_
84#endif
85
86#elif defined(__sgi__) || defined(sgi) || defined(__sgi) /* SGI */
87#define _SQUID_SGI_
88#if !defined(_SVR4_SOURCE)
89#define _SVR4_SOURCE /* for tempnam(3) */
90#endif
91#if USE_ASYNC_IO
92#define _ABI_SOURCE
93#endif /* USE_ASYNC_IO */
94
95#elif defined(__NeXT__)
96#define _SQUID_NEXT_
97
98#elif defined(__bsdi__)
99#define _SQUID_BSDI_ /* BSD/OS */
100
101#elif defined(__NetBSD__)
102#define _SQUID_NETBSD_
103
104#elif defined(__CYGWIN32__) || defined(__CYGWIN__)
105#define _SQUID_CYGWIN_
106
107#elif defined(WIN32) || defined(WINNT) || defined(__WIN32__) || defined(__WIN32)
108#define _SQUID_MSWIN_
109
110#elif defined(__APPLE__)
111#define _SQUID_APPLE_
112
113#elif defined(sony_news) && defined(__svr4)
114#define _SQUID_NEWSOS6_
115
116#elif defined(__EMX__) || defined(OS2) || defined(__OS2__)
117#define _SQUID_OS2_
118/*
119 * FIXME: the os2 port of bash seems to have problems checking
120 * the return codes of programs in if statements. These options
121 * need to be overridden.
122 */
123#ifndef socklen_t
124#define socklen_t int
125#endif
126#ifndef fd_mask
127#define fd_mask unsigned long
128#endif
129#endif
130
131#if !defined(CACHEMGR_HOSTNAME)
132#define CACHEMGR_HOSTNAME ""
133#endif
134
135#if SQUID_UDP_SO_SNDBUF > 16384
136#undef SQUID_UDP_SO_SNDBUF
137#define SQUID_UDP_SO_SNDBUF 16384
138#endif
139
140#if SQUID_UDP_SO_RCVBUF > 16384
141#undef SQUID_UDP_SO_RCVBUF
142#define SQUID_UDP_SO_RCVBUF 16384
143#endif
144
145#ifdef HAVE_MEMCPY
146#define xmemcpy(d,s,n) memcpy((d),(s),(n))
147#elif HAVE_BCOPY
148#define xmemcpy(d,s,n) bcopy((s),(d),(n))
149#elif HAVE_MEMMOVE
150#define xmemcpy(d,s,n) memmove((d),(s),(n))
151#endif
152
153#ifdef HAVE_MEMMOVE
154#define xmemmove(d,s,n) memmove((d),(s),(n))
155#elif HAVE_BCOPY
156#define xmemmove(d,s,n) bcopy((s),(d),(n))
157#endif
158
159#define xisspace(x) isspace((unsigned char)x)
160#define xtoupper(x) toupper((unsigned char)x)
161#define xtolower(x) tolower((unsigned char)x)
162#define xisdigit(x) isdigit((unsigned char)x)
163#define xisascii(x) isascii((unsigned char)x)
164#define xislower(x) islower((unsigned char)x)
165#define xisalpha(x) isalpha((unsigned char)x)
166
167#if HAVE_RANDOM
168#define squid_random random
169#define squid_srandom srandom
170#elif HAVE_LRAND48
171#define squid_random lrand48
172#define squid_srandom srand48
173#else
174#define squid_random rand
175#define squid_srandom srand
176#endif
177
178#endif /* _CONFIG_H_ */