also hilight
[privoxy.git] / vc_config_pthreads.h
1 #ifndef CONFIG_H_INCLUDED
2 #define CONFIG_H_INCLUDED
3 /*********************************************************************
4  *
5  * File        :  $Source: /cvsroot/ijbswa/current/vc_config_pthreads.h,v $
6  *
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.
12  *
13  * Copyright   :  Written by and Copyright (C) 2001 the SourceForge
14  *                Privoxy team. http://www.privoxy.org/
15  *
16  *                Based on the Internet Junkbuster originally written
17  *                by and Copyright (C) 1997 Anonymous Coders and 
18  *                Junkbusters Corporation.  http://www.junkbusters.com
19  *
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.
25  *
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.
31  *
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.
37  *
38  *********************************************************************/
39
40
41 /*
42  * Version number - Major (X._._)
43  */
44 #define VERSION_MAJOR 2
45
46 /*
47  * Version number - Minor (_.X._)
48  */
49 #define VERSION_MINOR 9
50
51 /*
52  * Version number - Point (_._.X)
53  */
54 #define VERSION_POINT 15
55
56 /*
57  * Version number, as a string
58  */
59 #define VERSION "2.9.15"
60
61 /*
62  * Status of the code: alpha, beta or stable
63  */
64 #define CODE_STATUS "beta"
65
66 /*
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.
70  */
71 #define REGEX_PCRE 1
72
73 /* 
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.
78  */
79 #define STATIC_PCRE 1
80
81 /* 
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.
86  */
87 #define STATIC_PCRS 1
88
89 /*
90  * Allows the use of an ACL to control access to the proxy by IP address.
91  */
92 #define FEATURE_ACL 1
93
94 /*
95  * Enables the web-based configuration (actionsfile) editor.  If you
96  * have a shared proxy, you might want to turn this off.
97  */
98 #define FEATURE_CGI_EDIT_ACTIONS 1
99
100 /*
101  * Allows the use of jar files to capture cookies.
102  */
103 #define FEATURE_COOKIE_JAR 1
104
105 /*
106  * Locally redirect remote script-redirect URLs
107  */
108 #define FEATURE_FAST_REDIRECTS 1
109
110 /*
111  * Bypass filtering for 1 page only
112  */
113 #define FEATURE_FORCE_LOAD 1
114
115 /*
116  * Allow blocking using images as well as HTML.
117  * If you do not define this then everything is blocked as HTML.
118  *
119  * Note that this is required if you want to use FEATURE_IMAGE_DETECT_MSIE.
120  */
121 #define FEATURE_IMAGE_BLOCKING 1
122
123 /*
124  * Detect image requests automatically for MSIE.  Will fall back to
125  * other image-detection methods (i.e. "+image" permission) for other
126  * browsers.
127  *
128  * You must also define FEATURE_IMAGE_BLOCKING to use this feature.
129  *
130  * It detects the following header pair as an image request:
131  *
132  * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
133  * Accept: * / *
134  *
135  * And the following as a HTML request:
136  *
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, * / *
139  *
140  * And no, I haven't got that backwards - IE is being wierd.
141  *
142  * Known limitations: 
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.
149  *
150  * These limitations are due to IE making inconsistent choices
151  * about which "Accept:" header to send.
152  */
153 #define FEATURE_IMAGE_DETECT_MSIE 1
154
155 /*
156  * Use POSIX threads instead of native threads.
157  */
158 #define FEATURE_PTHREAD 1
159
160 /*
161  * Enables statistics function.
162  */
163 #define FEATURE_STATISTICS 1
164
165 /*
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.
170  */
171 #define FEATURE_TOGGLE 1
172
173 /*
174  * Allows the use of trust files.
175  */
176 #define FEATURE_TRUST 1
177
178
179 /****************************************************************************
180  * The following values are correct for MS VC++97.
181  * You should normally not change them.
182  ***************************************************************************/
183
184
185 /*
186  * Defined on Solaris only.  Makes the system libraries thread safe.
187  */
188 /* #define _REENTRANT 1 */
189
190 /*
191  * Defined on Solaris only.  Without this, many important functions are not
192  * defined in the system headers.
193  */
194 /* #define __EXTENSIONS__ 1 */
195
196 /*
197  * Defined always.
198  * FIXME: Don't know what it does or why we need it.
199  * (presumably something to do with MultiThreading?)
200  */
201 #define __MT__ 1
202
203
204 /* Define if you have the `bcopy' function. */
205 /* #define HAVE_BCOPY 1 */
206
207 /* Define if you have the <inttypes.h> header file. */
208 /* #define HAVE_INTTYPES_H 1 */
209
210 /* Define if you have the `memmove' function. */
211 #define HAVE_MEMMOVE 1
212
213 /* Define if you have the <memory.h> header file. */
214 #define HAVE_MEMORY_H 1
215
216 /* Define if you have the <stdint.h> header file. */
217 /* #define HAVE_STDINT_H 1 */
218
219 /* Define if you have the <stdlib.h> header file. */
220 #define HAVE_STDLIB_H 1
221
222 /* Define if you have the `strerror' function. */
223 #define HAVE_STRERROR 1
224
225 /* Define if you have the <strings.h> header file. */
226 /* #define HAVE_STRINGS_H 1 */
227
228 /* Define if you have the <string.h> header file. */
229 #define HAVE_STRING_H 1
230
231 /* Define if you have the <sys/stat.h> header file. */
232 #define HAVE_SYS_STAT_H 1
233
234 /* Define if you have the <sys/types.h> header file. */
235 #define HAVE_SYS_TYPES_H 1
236
237 /* Define if you have the <unistd.h> header file. */
238 /* #define HAVE_UNISTD_H 1 */
239
240 /* The size of a `char *', as computed by sizeof. */
241 #define SIZEOF_CHAR_P 4
242
243 /* The size of a `int', as computed by sizeof. */
244 #define SIZEOF_INT 4
245
246 /* The size of a `long', as computed by sizeof. */
247 #define SIZEOF_LONG 4
248
249 /* The size of a `long long', as computed by sizeof. */
250 /* #define SIZEOF_LONG_LONG ---not supported--- */
251
252 /* The size of a `size_t', as computed by sizeof. */
253 #define SIZEOF_SIZE_T 4
254
255 /* Define if you have the ANSI C header files. */
256 #define STDC_HEADERS 1
257
258 /* Define to empty if `const' does not conform to ANSI C. */
259 /* #define const */
260
261 /* Define to `unsigned' if <sys/types.h> does not define. */
262 /* #define size_t unsigned */
263
264 /*
265  * Defined always.
266  * FIXME: Don't know what it does or why we need it.
267  * (presumably something to do with ANSI Standard C?)
268  */
269 /* Don't define for MS VC++ or you don't get strdup() declared.
270 #ifndef __STDC__
271 #define __STDC__ 1
272 #endif
273 */
274
275 /*
276  * Need to set up this define only for the Pthreads library for
277  * Win32, available from http://sources.redhat.com/pthreads-win32/
278  */
279 #if defined(FEATURE_PTHREAD) && defined(_WIN32)
280 #define __CLEANUP_C
281 #endif /* defined(FEATURE_PTHREAD) && defined(_WIN32) */
282
283 /*
284  * BEOS does not currently support POSIX threads.
285  * This *should* be detected by ./configure, but let's be sure.
286  */
287 #if defined(FEATURE_PTHREAD) && defined(__BEOS__)
288 #error BEOS does not support pthread - please run ./configure again with "--disable-pthread"
289
290 #endif /* defined(FEATURE_PTHREAD) && defined(__BEOS__) */
291
292
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)) */
296
297 #pragma warning ( disable: 4100 4115 4201 4214 4244 4514 )
298
299 /*
300  * C4100 : unreferenced formal parameter
301  * Very common, not a bug
302  * 
303  * C4115 : named type definition in parentheses
304  * #include <windows.h> causes a warning about one of these.
305  *
306  * C4201 : nonstandard extension used : nameless struct/union
307  * Endemic in <windows.h>
308  *
309  * C4214 nonstandard extension used : bit field types other than int
310  * Endemic in <windows.h>
311  *
312  * C4244 conversion from 'int' to 'char', possible loss of data
313  * Should really fix this one.  Throughout the JB code.
314  *
315  * C4514 unreferenced inline/local function has been removed
316  * Caused by #include <windows.h>
317  */
318
319 #endif /* CONFIG_H_INCLUDED */
320