Change code status to beta.
[privoxy.git] / vc_config_winthreads.h
1 #ifndef CONFIG_H_INCLUDED
2 #define CONFIG_H_INCLUDED
3 /*********************************************************************
4  *
5  * File        :  $Source: /cvsroot/ijbswa/current/vc_config_winthreads.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 0
45
46 /*
47  * Version number - Minor (_.X._)
48  */
49 #define VERSION_MINOR 0
50
51 /*
52  * Version number - Point (_._.X)
53  */
54 #define VERSION_POINT 0
55
56 /*
57  * Version number, as a string
58  */
59 #define VERSION "0.0.0"
60
61 /*
62  * Status of the code: alpha, beta or stable
63  */
64 #define CODE_STATUS "UNRELEASED"
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_GNU 1 */
72 #define REGEX_PCRE 1
73
74 /* 
75  * Should pcre be statically built in instead of linkling with libpcre?
76  * (This is determined by configure depending on the availiability of
77  * libpcre and user preferences). The name is ugly, but pcre needs it.
78  * Don't bother to change this here! Use configure instead.
79  */
80 #define STATIC_PCRE 1
81
82 /* 
83  * Should pcrs be statically built in instead of linkling with libpcrs?
84  * (This is determined by configure depending on the availiability of
85  * libpcrs and user preferences).
86  * Don't bother to change this here! Use configure instead.
87  */
88 #define STATIC_PCRS 1
89
90 /*
91  * Allows the use of an ACL to control access to the proxy by IP address.
92  */
93 #define FEATURE_ACL 1
94
95 /*
96  * Enables the web-based configuration (actionsfile) editor.  If you
97  * have a shared proxy, you might want to turn this off.
98  */
99 #define FEATURE_CGI_EDIT_ACTIONS 1
100
101 /*
102  * Allows the use of jar files to capture cookies.
103  */
104 #define FEATURE_COOKIE_JAR 1
105
106 /*
107  * Locally redirect remote script-redirect URLs
108  */
109 #define FEATURE_FAST_REDIRECTS 1
110
111 /*
112  * Bypass filtering for 1 page only
113  */
114 #define FEATURE_FORCE_LOAD 1
115
116 /*
117  * Allow blocking using images as well as HTML.
118  * If you do not define this then everything is blocked as HTML.
119  *
120  * Note that this is required if you want to use FEATURE_IMAGE_DETECT_MSIE.
121  */
122 #define FEATURE_IMAGE_BLOCKING 1
123
124 /*
125  * Detect image requests automatically for MSIE.  Will fall back to
126  * other image-detection methods (i.e. "+image" permission) for other
127  * browsers.
128  *
129  * You must also define FEATURE_IMAGE_BLOCKING to use this feature.
130  *
131  * It detects the following header pair as an image request:
132  *
133  * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
134  * Accept: * / *
135  *
136  * And the following as a HTML request:
137  *
138  * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
139  * Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, * / *
140  *
141  * And no, I haven't got that backwards - IE is being wierd.
142  *
143  * Known limitations: 
144  * 1) If you press shift-reload on a blocked HTML page, you get
145  *    the image "blocked" page, not the HTML "blocked" page.
146  * 2) Once an image "blocked" page has been sent, viewing it 
147  *    in it's own browser window *should* bring up the HTML
148  *    "blocked" page, but it doesn't.  You need to clear the 
149  *    browser cache to get the HTML version again.
150  *
151  * These limitations are due to IE making inconsistent choices
152  * about which "Accept:" header to send.
153  */
154 #define FEATURE_IMAGE_DETECT_MSIE 1
155
156 /*
157  * Use PNG instead of GIF for built-in images
158  */
159 /* #undef FEATURE_NO_GIFS */
160
161 /*
162  * Use POSIX threads instead of native threads.
163  */
164 /* #define FEATURE_PTHREAD 1 */
165
166 /*
167  * Enables statistics function.
168  */
169 #define FEATURE_STATISTICS 1
170
171 /*
172  * Allow JunkBuster to be "disabled" so it is just a normal non-blocking
173  * non-anonymizing proxy.  This is useful if you're trying to access a
174  * blocked or broken site - just change the setting in the config file,
175  * or use the handy "Disable" menu option in the Windows GUI.
176  */
177 #define FEATURE_TOGGLE 1
178
179 /*
180  * Allows the use of trust files.
181  */
182 #define FEATURE_TRUST 1
183
184
185 /****************************************************************************
186  * The following values are correct for MS VC++97.
187  * You should normally not change them.
188  ***************************************************************************/
189
190
191 /*
192  * Defined on Solaris only.  Makes the system libraries thread safe.
193  */
194 /* #define _REENTRANT 1 */
195
196 /*
197  * Defined on Solaris only.  Without this, many important functions are not
198  * defined in the system headers.
199  */
200 /* #define __EXTENSIONS__ 1 */
201
202 /*
203  * Defined always.
204  * FIXME: Don't know what it does or why we need it.
205  * (presumably something to do with MultiThreading?)
206  */
207 #define __MT__ 1
208
209 /* If the (nonstandard and thread-safe) function gethostbyname_r
210  * is available, select which signature to use
211  */
212 /* #undef HAVE_GETHOSTBYNAME_R_6_ARGS */
213 /* #undef HAVE_GETHOSTBYNAME_R_5_ARGS */
214 /* #undef HAVE_GETHOSTBYNAME_R_3_ARGS */
215
216 /* If the (nonstandard and thread-safe) function gethostbyaddr_r
217  * is available, select which signature to use
218  */
219 /* #undef HAVE_GETHOSTBYADDR_R_8_ARGS */
220 /* #undef HAVE_GETHOSTBYADDR_R_7_ARGS */
221 /* #undef HAVE_GETHOSTBYADDR_R_5_ARGS */
222
223 /* Defined if you have gmtime_r and localtime_r with a signature
224  * of (struct time *, struct tm *)
225  */
226 #undef HAVE_GMTIME_R
227
228 /* #define HAVE_LOCALTIME_R 1 */
229
230 /* Define to 'int' if <sys/socket.h> doesn't have it.
231  */
232 #define socklen_t int
233
234 /* Define if pcre.h must be included as <pcre/pcre.h>
235  */
236 /* #undef PCRE_H_IN_SUBDIR */
237
238 /* Define if pcreposix.h must be included as <pcre/pcreposix.h>
239  */
240 /* #undef PCREPOSIX_H_IN_SUBDIR */
241
242
243 /* Define to 1 if you have the <arpa/inet.h> header file. */
244 #define HAVE_ARPA_INET_H 1
245
246 /* Define to 1 if you have the `atexit' function. */
247 #define HAVE_ATEXIT 1
248
249 /* Define if you have the `bcopy' function. */
250 /* #define HAVE_BCOPY 1 */
251
252 /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
253    */
254 #define HAVE_DIRENT_H 1
255
256 /* Define to 1 if you have the <errno.h> header file. */
257 #define HAVE_ERRNO_H 1
258
259 /* Define to 1 if you have the <fcntl.h> header file. */
260 #define HAVE_FCNTL_H 1
261
262 /* Define to 1 if you have the `getcwd' function. */
263 #define HAVE_GETCWD 1
264
265 /* Define to 1 if you have the `gethostbyaddr' function. */
266 #define HAVE_GETHOSTBYADDR 1
267
268 /* Define to 1 if you have the `gethostbyname' function. */
269 #define HAVE_GETHOSTBYNAME 1
270
271 /* Define to 1 if you have the `inet_ntoa' function. */
272 #define HAVE_INET_NTOA 1
273
274 /* Define if you have the <inttypes.h> header file. */
275 /* #define HAVE_INTTYPES_H 1 */
276
277 /* Define to 1 if you have the `nsl' library (-lnsl). */
278 /* #undef HAVE_LIBNSL */
279
280 /* Define to 1 if you have the <limits.h> header file. */
281 #define HAVE_LIMITS_H 1
282
283 /* Define to 1 if you have the <locale.h> header file. */
284 #define HAVE_LOCALE_H 1
285
286 /* Define to 1 if you have the `localtime_r' function. */
287 #undef HAVE_LOCALTIME_R
288
289 /* Define to 1 if you have the `memchr' function. */
290 #define HAVE_MEMCHR 1
291
292 /* Define if you have the `memmove' function. */
293 #define HAVE_MEMMOVE 1
294
295 /* Define if you have the <memory.h> header file. */
296 #define HAVE_MEMORY_H 1
297
298 /* Define to 1 if you have the `memset' function. */
299 #define HAVE_MEMSET 1
300
301 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
302 /* #undef HAVE_NDIR_H */
303
304 /* Define to 1 if you have the <netdb.h> header file. */
305 #define HAVE_NETDB_H 1
306
307 /* Define to 1 if you have the <netinet/in.h> header file. */
308 #define HAVE_NETINET_IN_H 1
309
310 /* Define to 1 if you have the <OS.h> header file. */
311 /* #undef HAVE_OS_H */
312
313 /* Define to 1 if you have the `regcomp' function. */
314 #define HAVE_REGCOMP 1
315
316 /* Define to 1 if you have the `select' function. */
317 #define HAVE_SELECT 1
318
319 /* Define to 1 if you have the `setlocale' function. */
320 #define HAVE_SETLOCALE 1
321
322 /* Define to 1 if you have the `socket' function. */
323 #define HAVE_SOCKET 1
324
325 /* Define to 1 if you have the <stddef.h> header file. */
326 #define HAVE_STDDEF_H 1
327
328 /* Define if you have the <stdint.h> header file. */
329 /* #define HAVE_STDINT_H 1 */
330
331 /* Define if you have the <stdlib.h> header file. */
332 #define HAVE_STDLIB_H 1
333
334 /* Define to 1 if you have the `strchr' function. */
335 #define HAVE_STRCHR 1
336
337 /* Define to 1 if you have the `strdup' function. */
338 #define HAVE_STRDUP 1
339
340 /* Define if you have the `strerror' function. */
341 #define HAVE_STRERROR 1
342
343 /* Define to 1 if you have the `strftime' function. */
344 #define HAVE_STRFTIME 1
345
346 /* Define if you have the <strings.h> header file. */
347 /* #define HAVE_STRINGS_H 1 */
348
349 /* Define if you have the <string.h> header file. */
350 #define HAVE_STRING_H 1
351
352 /* Define to 1 if you have the `strstr' function. */
353 #define HAVE_STRSTR 1
354
355 /* Define to 1 if you have the `strtoul' function. */
356 #define HAVE_STRTOUL 1
357
358 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
359    */
360 /* #undef HAVE_SYS_DIR_H */
361
362 /* Define to 1 if you have the <sys/ioctl.h> header file. */
363 #define HAVE_SYS_IOCTL_H 1
364
365 /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
366    */
367 /* #undef HAVE_SYS_NDIR_H */
368
369 /* Define to 1 if you have the <sys/socket.h> header file. */
370 #define HAVE_SYS_SOCKET_H 1
371
372 /* Define if you have the <sys/stat.h> header file. */
373 #define HAVE_SYS_STAT_H 1
374
375 /* Define to 1 if you have the <sys/timeb.h> header file. */
376 #define HAVE_SYS_TIMEB_H 1
377
378 /* Define to 1 if you have the <sys/time.h> header file. */
379 #define HAVE_SYS_TIME_H 1
380
381 /* Define to 1 if you have the <sys/types.h> header file. */
382 #define HAVE_SYS_TYPES_H 1
383
384 /* Define to 1 if you have the <sys/wait.h> header file. */
385 #define HAVE_SYS_WAIT_H 1
386
387 /* Define if you have the <unistd.h> header file. */
388 /* #define HAVE_UNISTD_H 1 */
389
390 /* Define to the address where bug reports for this package should be sent. */
391 #define PACKAGE_BUGREPORT ""
392
393 /* Define to the full name of this package. */
394 #define PACKAGE_NAME ""
395
396 /* Define to the full name and version of this package. */
397 #define PACKAGE_STRING ""
398
399 /* Define to the one symbol short name of this package. */
400 #define PACKAGE_TARNAME ""
401
402 /* Define to the version of this package. */
403 #define PACKAGE_VERSION ""
404
405 /* Define as the return type of signal handlers (`int' or `void'). */
406 #define RETSIGTYPE void
407
408 /* Define to 1 if the `setpgrp' function takes no argument. */
409 #define SETPGRP_VOID 1
410
411 /* The size of a `char *', as computed by sizeof. */
412 #define SIZEOF_CHAR_P 4
413
414 /* The size of a `int', as computed by sizeof. */
415 #define SIZEOF_INT 4
416
417 /* The size of a `long', as computed by sizeof. */
418 #define SIZEOF_LONG 4
419
420 /* The size of a `long long', as computed by sizeof. */
421 /* #define SIZEOF_LONG_LONG ---not supported--- */
422
423 /* The size of a `size_t', as computed by sizeof. */
424 #define SIZEOF_SIZE_T 4
425
426 /* Define if you have the ANSI C header files. */
427 #define STDC_HEADERS 1
428
429 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
430 #define TIME_WITH_SYS_TIME 1
431
432 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
433 /* #undef TM_IN_SYS_TIME */
434
435 /* Define to empty if `const' does not conform to ANSI C. */
436 /* #define const */
437
438 /* Define to `int' if <sys/types.h> does not define. */
439 /* #undef pid_t */
440
441 /* Define to `unsigned' if <sys/types.h> does not define. */
442 /* #define size_t unsigned */
443
444 /* Define to 'int' if <sys/socket.h> doesn't have it. */
445 #define socklen_t int
446
447 /*
448  * Defined always.
449  * FIXME: Don't know what it does or why we need it.
450  * (presumably something to do with ANSI Standard C?)
451  */
452 /* Don't define for MS VC++ or you don't get strdup() declared.
453 #ifndef __STDC__
454 #define __STDC__ 1
455 #endif
456 */
457
458 /*
459  * Need to set up this define only for the Pthreads library for
460  * Win32, available from http://sources.redhat.com/pthreads-win32/
461  */
462 #if defined(FEATURE_PTHREAD) && defined(_WIN32)
463 #define __CLEANUP_C
464 #endif /* defined(FEATURE_PTHREAD) && defined(_WIN32) */
465
466 /*
467  * Need to keep errlog.c from trying to inline the non-existent
468  * locking stubs.  Could be removed once a real platform-specific
469  * solution is generated.
470  */
471 #define inline ""
472
473 /*
474  * BEOS does not currently support POSIX threads.
475  * This *should* be detected by ./configure, but let's be sure.
476  */
477 #if defined(FEATURE_PTHREAD) && defined(__BEOS__)
478 #error BEOS does not support pthread - please run ./configure again with "--disable-pthread"
479
480 #endif /* defined(FEATURE_PTHREAD) && defined(__BEOS__) */
481
482
483 #if (!defined(_MSC_VER)) && (!defined(RC_INVOKED))
484 #error This file is only intended for MS VC++ on Win32.  For other compilers, please run configure.
485 #endif /* (!defined(_MSC_VER)) && (!defined(RC_INVOKED)) */
486
487 #pragma warning ( disable: 4100 4115 4201 4214 4244 4514 )
488
489 /*
490  * C4100 : unreferenced formal parameter
491  * Very common, not a bug
492  * 
493  * C4115 : named type definition in parentheses
494  * #include <windows.h> causes a warning about one of these.
495  *
496  * C4201 : nonstandard extension used : nameless struct/union
497  * Endemic in <windows.h>
498  *
499  * C4214 nonstandard extension used : bit field types other than int
500  * Endemic in <windows.h>
501  *
502  * C4244 conversion from 'int' to 'char', possible loss of data
503  * Should really fix this one.  Throughout the JB code.
504  *
505  * C4514 unreferenced inline/local function has been removed
506  * Caused by #include <windows.h>
507  */
508
509
510 #endif /* CONFIG_H_INCLUDED */
511