1 #ifndef CONFIG_H_INCLUDED
2 #define CONFIG_H_INCLUDED
3 /*********************************************************************
5 * File : $Source: /cvsroot/ijbswa/current/vc_config_pthreads.h,v $
7 * Purpose : This file should be the first thing included in every
8 * .c file. (Before even system headers). It contains
9 * #define statements for various features. It was
10 * introduced because the compile command line started
11 * getting ludicrously long with feature defines.
13 * Copyright : Written by and Copyright (C) 2001 the SourceForge
14 * Privoxy team. http://www.privoxy.org/
16 * Based on the Internet Junkbuster originally written
17 * by and Copyright (C) 1997 Anonymous Coders and
18 * Junkbusters Corporation. http://www.junkbusters.com
20 * This program is free software; you can redistribute it
21 * and/or modify it under the terms of the GNU General
22 * Public License as published by the Free Software
23 * Foundation; either version 2 of the License, or (at
24 * your option) any later version.
26 * This program is distributed in the hope that it will
27 * be useful, but WITHOUT ANY WARRANTY; without even the
28 * implied warranty of MERCHANTABILITY or FITNESS FOR A
29 * PARTICULAR PURPOSE. See the GNU General Public
30 * License for more details.
32 * The GNU General Public License should be included with
33 * this file. If not, you can view it at
34 * http://www.gnu.org/copyleft/gpl.html
35 * or write to the Free Software Foundation, Inc., 59
36 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
38 *********************************************************************/
42 * Version number - Major (X._._)
44 #define VERSION_MAJOR 2
47 * Version number - Minor (_.X._)
49 #define VERSION_MINOR 9
52 * Version number - Point (_._.X)
54 #define VERSION_POINT 15
57 * Version number, as a string
59 #define VERSION "2.9.15"
62 * Status of the code: alpha, beta or stable
64 #define CODE_STATUS "beta"
67 * Regular expression matching for URLs. (Highly recommended).
68 * If neither of these are defined then you can ony use prefix matching.
69 * Don't bother to change this here! Use configure instead.
74 * Should pcre be statically built in instead of linkling with libpcre?
75 * (This is determined by configure depending on the availiability of
76 * libpcre and user preferences). The name is ugly, but pcre needs it.
77 * Don't bother to change this here! Use configure instead.
82 * Should pcrs be statically built in instead of linkling with libpcrs?
83 * (This is determined by configure depending on the availiability of
84 * libpcrs and user preferences).
85 * Don't bother to change this here! Use configure instead.
90 * Allows the use of an ACL to control access to the proxy by IP address.
95 * Enables the web-based configuration (actionsfile) editor. If you
96 * have a shared proxy, you might want to turn this off.
98 #define FEATURE_CGI_EDIT_ACTIONS 1
101 * Allows the use of jar files to capture cookies.
103 #define FEATURE_COOKIE_JAR 1
106 * Locally redirect remote script-redirect URLs
108 #define FEATURE_FAST_REDIRECTS 1
111 * Bypass filtering for 1 page only
113 #define FEATURE_FORCE_LOAD 1
116 * Allow blocking using images as well as HTML.
117 * If you do not define this then everything is blocked as HTML.
119 * Note that this is required if you want to use FEATURE_IMAGE_DETECT_MSIE.
121 #define FEATURE_IMAGE_BLOCKING 1
124 * Detect image requests automatically for MSIE. Will fall back to
125 * other image-detection methods (i.e. "+image" permission) for other
128 * You must also define FEATURE_IMAGE_BLOCKING to use this feature.
130 * It detects the following header pair as an image request:
132 * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
135 * And the following as a HTML request:
137 * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
138 * Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, * / *
140 * And no, I haven't got that backwards - IE is being wierd.
143 * 1) If you press shift-reload on a blocked HTML page, you get
144 * the image "blocked" page, not the HTML "blocked" page.
145 * 2) Once an image "blocked" page has been sent, viewing it
146 * in it's own browser window *should* bring up the HTML
147 * "blocked" page, but it doesn't. You need to clear the
148 * browser cache to get the HTML version again.
150 * These limitations are due to IE making inconsistent choices
151 * about which "Accept:" header to send.
153 #define FEATURE_IMAGE_DETECT_MSIE 1
156 * Use POSIX threads instead of native threads.
158 #define FEATURE_PTHREAD 1
161 * Enables statistics function.
163 #define FEATURE_STATISTICS 1
166 * Allow JunkBuster to be "disabled" so it is just a normal non-blocking
167 * non-anonymizing proxy. This is useful if you're trying to access a
168 * blocked or broken site - just change the setting in the config file,
169 * or use the handy "Disable" menu option in the Windows GUI.
171 #define FEATURE_TOGGLE 1
174 * Allows the use of trust files.
176 #define FEATURE_TRUST 1
179 /****************************************************************************
180 * The following values are correct for MS VC++97.
181 * You should normally not change them.
182 ***************************************************************************/
186 * Defined on Solaris only. Makes the system libraries thread safe.
188 /* #define _REENTRANT 1 */
191 * Defined on Solaris only. Without this, many important functions are not
192 * defined in the system headers.
194 /* #define __EXTENSIONS__ 1 */
198 * FIXME: Don't know what it does or why we need it.
199 * (presumably something to do with MultiThreading?)
204 /* Define if you have the `bcopy' function. */
205 /* #define HAVE_BCOPY 1 */
207 /* Define if you have the <inttypes.h> header file. */
208 /* #define HAVE_INTTYPES_H 1 */
210 /* Define if you have the `memmove' function. */
211 #define HAVE_MEMMOVE 1
213 /* Define if you have the <memory.h> header file. */
214 #define HAVE_MEMORY_H 1
216 /* Define if you have the <stdint.h> header file. */
217 /* #define HAVE_STDINT_H 1 */
219 /* Define if you have the <stdlib.h> header file. */
220 #define HAVE_STDLIB_H 1
222 /* Define if you have the `strerror' function. */
223 #define HAVE_STRERROR 1
225 /* Define if you have the <strings.h> header file. */
226 /* #define HAVE_STRINGS_H 1 */
228 /* Define if you have the <string.h> header file. */
229 #define HAVE_STRING_H 1
231 /* Define if you have the <sys/stat.h> header file. */
232 #define HAVE_SYS_STAT_H 1
234 /* Define if you have the <sys/types.h> header file. */
235 #define HAVE_SYS_TYPES_H 1
237 /* Define if you have the <unistd.h> header file. */
238 /* #define HAVE_UNISTD_H 1 */
240 /* The size of a `char *', as computed by sizeof. */
241 #define SIZEOF_CHAR_P 4
243 /* The size of a `int', as computed by sizeof. */
246 /* The size of a `long', as computed by sizeof. */
247 #define SIZEOF_LONG 4
249 /* The size of a `long long', as computed by sizeof. */
250 /* #define SIZEOF_LONG_LONG ---not supported--- */
252 /* The size of a `size_t', as computed by sizeof. */
253 #define SIZEOF_SIZE_T 4
255 /* Define if you have the ANSI C header files. */
256 #define STDC_HEADERS 1
258 /* Define to empty if `const' does not conform to ANSI C. */
261 /* Define to `unsigned' if <sys/types.h> does not define. */
262 /* #define size_t unsigned */
266 * FIXME: Don't know what it does or why we need it.
267 * (presumably something to do with ANSI Standard C?)
269 /* Don't define for MS VC++ or you don't get strdup() declared.
276 * Need to set up this define only for the Pthreads library for
277 * Win32, available from http://sources.redhat.com/pthreads-win32/
279 #if defined(FEATURE_PTHREAD) && defined(_WIN32)
281 #endif /* defined(FEATURE_PTHREAD) && defined(_WIN32) */
284 * BEOS does not currently support POSIX threads.
285 * This *should* be detected by ./configure, but let's be sure.
287 #if defined(FEATURE_PTHREAD) && defined(__BEOS__)
288 #error BEOS does not support pthread - please run ./configure again with "--disable-pthread"
290 #endif /* defined(FEATURE_PTHREAD) && defined(__BEOS__) */
293 #if (!defined(_MSC_VER)) && (!defined(RC_INVOKED))
294 #error This file is only intended for MS VC++ on Win32. For other compilers, please run configure.
295 #endif /* (!defined(_MSC_VER)) && (!defined(RC_INVOKED)) */
297 #pragma warning ( disable: 4100 4115 4201 4214 4244 4514 )
300 * C4100 : unreferenced formal parameter
301 * Very common, not a bug
303 * C4115 : named type definition in parentheses
304 * #include <windows.h> causes a warning about one of these.
306 * C4201 : nonstandard extension used : nameless struct/union
307 * Endemic in <windows.h>
309 * C4214 nonstandard extension used : bit field types other than int
310 * Endemic in <windows.h>
312 * C4244 conversion from 'int' to 'char', possible loss of data
313 * Should really fix this one. Throughout the JB code.
315 * C4514 unreferenced inline/local function has been removed
316 * Caused by #include <windows.h>
319 #endif /* CONFIG_H_INCLUDED */