1 #ifndef CONFIG_H_INCLUDED
2 #define CONFIG_H_INCLUDED
3 /*********************************************************************
5 * File : $Source: /cvsroot/ijbswa/current/vc_config_winthreads.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 0
47 * Version number - Minor (_.X._)
49 #define VERSION_MINOR 0
52 * Version number - Point (_._.X)
54 #define VERSION_POINT 0
57 * Version number, as a string
59 #define VERSION "0.0.0"
62 * Status of the code: alpha, beta or stable
64 #define CODE_STATUS "UNRELEASED"
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.
71 /* #define REGEX_GNU 1 */
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.
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.
91 * Allows the use of an ACL to control access to the proxy by IP address.
96 * Enables the web-based configuration (actionsfile) editor. If you
97 * have a shared proxy, you might want to turn this off.
99 #define FEATURE_CGI_EDIT_ACTIONS 1
102 * Allows the use of jar files to capture cookies.
104 #define FEATURE_COOKIE_JAR 1
107 * Locally redirect remote script-redirect URLs
109 #define FEATURE_FAST_REDIRECTS 1
112 * Bypass filtering for 1 page only
114 #define FEATURE_FORCE_LOAD 1
117 * Allow blocking using images as well as HTML.
118 * If you do not define this then everything is blocked as HTML.
120 * Note that this is required if you want to use FEATURE_IMAGE_DETECT_MSIE.
122 #define FEATURE_IMAGE_BLOCKING 1
125 * Detect image requests automatically for MSIE. Will fall back to
126 * other image-detection methods (i.e. "+image" permission) for other
129 * You must also define FEATURE_IMAGE_BLOCKING to use this feature.
131 * It detects the following header pair as an image request:
133 * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
136 * And the following as a HTML request:
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, * / *
141 * And no, I haven't got that backwards - IE is being wierd.
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.
151 * These limitations are due to IE making inconsistent choices
152 * about which "Accept:" header to send.
154 #define FEATURE_IMAGE_DETECT_MSIE 1
157 * Use PNG instead of GIF for built-in images
159 /* #undef FEATURE_NO_GIFS */
162 * Use POSIX threads instead of native threads.
164 /* #define FEATURE_PTHREAD 1 */
167 * Enables statistics function.
169 #define FEATURE_STATISTICS 1
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.
177 #define FEATURE_TOGGLE 1
180 * Allows the use of trust files.
182 #define FEATURE_TRUST 1
185 /****************************************************************************
186 * The following values are correct for MS VC++97.
187 * You should normally not change them.
188 ***************************************************************************/
192 * Defined on Solaris only. Makes the system libraries thread safe.
194 /* #define _REENTRANT 1 */
197 * Defined on Solaris only. Without this, many important functions are not
198 * defined in the system headers.
200 /* #define __EXTENSIONS__ 1 */
204 * FIXME: Don't know what it does or why we need it.
205 * (presumably something to do with MultiThreading?)
209 /* If the (nonstandard and thread-safe) function gethostbyname_r
210 * is available, select which signature to use
212 /* #undef HAVE_GETHOSTBYNAME_R_6_ARGS */
213 /* #undef HAVE_GETHOSTBYNAME_R_5_ARGS */
214 /* #undef HAVE_GETHOSTBYNAME_R_3_ARGS */
216 /* If the (nonstandard and thread-safe) function gethostbyaddr_r
217 * is available, select which signature to use
219 /* #undef HAVE_GETHOSTBYADDR_R_8_ARGS */
220 /* #undef HAVE_GETHOSTBYADDR_R_7_ARGS */
221 /* #undef HAVE_GETHOSTBYADDR_R_5_ARGS */
223 /* Defined if you have gmtime_r and localtime_r with a signature
224 * of (struct time *, struct tm *)
228 /* #define HAVE_LOCALTIME_R 1 */
230 /* Define to 'int' if <sys/socket.h> doesn't have it.
232 #define socklen_t int
234 /* Define if pcre.h must be included as <pcre/pcre.h>
236 /* #undef PCRE_H_IN_SUBDIR */
238 /* Define if pcreposix.h must be included as <pcre/pcreposix.h>
240 /* #undef PCREPOSIX_H_IN_SUBDIR */
243 /* Define to 1 if you have the <arpa/inet.h> header file. */
244 #define HAVE_ARPA_INET_H 1
246 /* Define to 1 if you have the `atexit' function. */
247 #define HAVE_ATEXIT 1
249 /* Define if you have the `bcopy' function. */
250 /* #define HAVE_BCOPY 1 */
252 /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
254 #define HAVE_DIRENT_H 1
256 /* Define to 1 if you have the <errno.h> header file. */
257 #define HAVE_ERRNO_H 1
259 /* Define to 1 if you have the <fcntl.h> header file. */
260 #define HAVE_FCNTL_H 1
262 /* Define to 1 if you have the `getcwd' function. */
263 #define HAVE_GETCWD 1
265 /* Define to 1 if you have the `gethostbyaddr' function. */
266 #define HAVE_GETHOSTBYADDR 1
268 /* Define to 1 if you have the `gethostbyname' function. */
269 #define HAVE_GETHOSTBYNAME 1
271 /* Define to 1 if you have the `inet_ntoa' function. */
272 #define HAVE_INET_NTOA 1
274 /* Define if you have the <inttypes.h> header file. */
275 /* #define HAVE_INTTYPES_H 1 */
277 /* Define to 1 if you have the `nsl' library (-lnsl). */
278 /* #undef HAVE_LIBNSL */
280 /* Define to 1 if you have the <limits.h> header file. */
281 #define HAVE_LIMITS_H 1
283 /* Define to 1 if you have the <locale.h> header file. */
284 #define HAVE_LOCALE_H 1
286 /* Define to 1 if you have the `localtime_r' function. */
287 #undef HAVE_LOCALTIME_R
289 /* Define to 1 if you have the `memchr' function. */
290 #define HAVE_MEMCHR 1
292 /* Define if you have the `memmove' function. */
293 #define HAVE_MEMMOVE 1
295 /* Define if you have the <memory.h> header file. */
296 #define HAVE_MEMORY_H 1
298 /* Define to 1 if you have the `memset' function. */
299 #define HAVE_MEMSET 1
301 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
302 /* #undef HAVE_NDIR_H */
304 /* Define to 1 if you have the <netdb.h> header file. */
305 #define HAVE_NETDB_H 1
307 /* Define to 1 if you have the <netinet/in.h> header file. */
308 #define HAVE_NETINET_IN_H 1
310 /* Define to 1 if you have the <OS.h> header file. */
311 /* #undef HAVE_OS_H */
313 /* Define to 1 if you have the `regcomp' function. */
314 #define HAVE_REGCOMP 1
316 /* Define to 1 if you have the `select' function. */
317 #define HAVE_SELECT 1
319 /* Define to 1 if you have the `setlocale' function. */
320 #define HAVE_SETLOCALE 1
322 /* Define to 1 if you have the `socket' function. */
323 #define HAVE_SOCKET 1
325 /* Define to 1 if you have the <stddef.h> header file. */
326 #define HAVE_STDDEF_H 1
328 /* Define if you have the <stdint.h> header file. */
329 /* #define HAVE_STDINT_H 1 */
331 /* Define if you have the <stdlib.h> header file. */
332 #define HAVE_STDLIB_H 1
334 /* Define to 1 if you have the `strchr' function. */
335 #define HAVE_STRCHR 1
337 /* Define to 1 if you have the `strdup' function. */
338 #define HAVE_STRDUP 1
340 /* Define if you have the `strerror' function. */
341 #define HAVE_STRERROR 1
343 /* Define to 1 if you have the `strftime' function. */
344 #define HAVE_STRFTIME 1
346 /* Define if you have the <strings.h> header file. */
347 /* #define HAVE_STRINGS_H 1 */
349 /* Define if you have the <string.h> header file. */
350 #define HAVE_STRING_H 1
352 /* Define to 1 if you have the `strstr' function. */
353 #define HAVE_STRSTR 1
355 /* Define to 1 if you have the `strtoul' function. */
356 #define HAVE_STRTOUL 1
358 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
360 /* #undef HAVE_SYS_DIR_H */
362 /* Define to 1 if you have the <sys/ioctl.h> header file. */
363 #define HAVE_SYS_IOCTL_H 1
365 /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
367 /* #undef HAVE_SYS_NDIR_H */
369 /* Define to 1 if you have the <sys/socket.h> header file. */
370 #define HAVE_SYS_SOCKET_H 1
372 /* Define if you have the <sys/stat.h> header file. */
373 #define HAVE_SYS_STAT_H 1
375 /* Define to 1 if you have the <sys/timeb.h> header file. */
376 #define HAVE_SYS_TIMEB_H 1
378 /* Define to 1 if you have the <sys/time.h> header file. */
379 #define HAVE_SYS_TIME_H 1
381 /* Define to 1 if you have the <sys/types.h> header file. */
382 #define HAVE_SYS_TYPES_H 1
384 /* Define to 1 if you have the <sys/wait.h> header file. */
385 #define HAVE_SYS_WAIT_H 1
387 /* Define if you have the <unistd.h> header file. */
388 /* #define HAVE_UNISTD_H 1 */
390 /* Define to the address where bug reports for this package should be sent. */
391 #define PACKAGE_BUGREPORT ""
393 /* Define to the full name of this package. */
394 #define PACKAGE_NAME ""
396 /* Define to the full name and version of this package. */
397 #define PACKAGE_STRING ""
399 /* Define to the one symbol short name of this package. */
400 #define PACKAGE_TARNAME ""
402 /* Define to the version of this package. */
403 #define PACKAGE_VERSION ""
405 /* Define as the return type of signal handlers (`int' or `void'). */
406 #define RETSIGTYPE void
408 /* Define to 1 if the `setpgrp' function takes no argument. */
409 #define SETPGRP_VOID 1
411 /* The size of a `char *', as computed by sizeof. */
412 #define SIZEOF_CHAR_P 4
414 /* The size of a `int', as computed by sizeof. */
417 /* The size of a `long', as computed by sizeof. */
418 #define SIZEOF_LONG 4
420 /* The size of a `long long', as computed by sizeof. */
421 /* #define SIZEOF_LONG_LONG ---not supported--- */
423 /* The size of a `size_t', as computed by sizeof. */
424 #define SIZEOF_SIZE_T 4
426 /* Define if you have the ANSI C header files. */
427 #define STDC_HEADERS 1
429 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
430 #define TIME_WITH_SYS_TIME 1
432 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
433 /* #undef TM_IN_SYS_TIME */
435 /* Define to empty if `const' does not conform to ANSI C. */
438 /* Define to `int' if <sys/types.h> does not define. */
441 /* Define to `unsigned' if <sys/types.h> does not define. */
442 /* #define size_t unsigned */
444 /* Define to 'int' if <sys/socket.h> doesn't have it. */
445 #define socklen_t int
449 * FIXME: Don't know what it does or why we need it.
450 * (presumably something to do with ANSI Standard C?)
452 /* Don't define for MS VC++ or you don't get strdup() declared.
459 * Need to set up this define only for the Pthreads library for
460 * Win32, available from http://sources.redhat.com/pthreads-win32/
462 #if defined(FEATURE_PTHREAD) && defined(_WIN32)
464 #endif /* defined(FEATURE_PTHREAD) && defined(_WIN32) */
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.
474 * BEOS does not currently support POSIX threads.
475 * This *should* be detected by ./configure, but let's be sure.
477 #if defined(FEATURE_PTHREAD) && defined(__BEOS__)
478 #error BEOS does not support pthread - please run ./configure again with "--disable-pthread"
480 #endif /* defined(FEATURE_PTHREAD) && defined(__BEOS__) */
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)) */
487 #pragma warning ( disable: 4100 4115 4201 4214 4244 4514 )
490 * C4100 : unreferenced formal parameter
491 * Very common, not a bug
493 * C4115 : named type definition in parentheses
494 * #include <windows.h> causes a warning about one of these.
496 * C4201 : nonstandard extension used : nameless struct/union
497 * Endemic in <windows.h>
499 * C4214 nonstandard extension used : bit field types other than int
500 * Endemic in <windows.h>
502 * C4244 conversion from 'int' to 'char', possible loss of data
503 * Should really fix this one. Throughout the JB code.
505 * C4514 unreferenced inline/local function has been removed
506 * Caused by #include <windows.h>
510 #endif /* CONFIG_H_INCLUDED */