00001 00002 /* On Unix-like systems config.in is converted by "configure" into config.h. 00003 Some other environments also support the use of "configure". PCRE is written in 00004 Standard C, but there are a few non-standard things it can cope with, allowing 00005 it to run on SunOS4 and other "close to standard" systems. 00006 00007 On a non-Unix-like system you should just copy this file into config.h, and set 00008 up the macros the way you need them. You should normally change the definitions 00009 of HAVE_STRERROR and HAVE_MEMMOVE to 1. Unfortunately, because of the way 00010 autoconf works, these cannot be made the defaults. If your system has bcopy() 00011 and not memmove(), change the definition of HAVE_BCOPY instead of HAVE_MEMMOVE. 00012 If your system has neither bcopy() nor memmove(), leave them both as 0; an 00013 emulation function will be used. */ 00014 00015 /* If you are compiling for a system that uses EBCDIC instead of ASCII 00016 character codes, define this macro as 1. On systems that can use "configure", 00017 this can be done via --enable-ebcdic. */ 00018 00019 #ifndef EBCDIC 00020 #define EBCDIC 0 00021 #endif 00022 00023 /* If you are compiling for a system other than a Unix-like system or Win32, 00024 and it needs some magic to be inserted before the definition of a function that 00025 is exported by the library, define this macro to contain the relevant magic. If 00026 you do not define this macro, it defaults to "extern" for a C compiler and 00027 "extern C" for a C++ compiler on non-Win32 systems. This macro apears at the 00028 start of every exported function that is part of the external API. It does not 00029 appear on functions that are "external" in the C sense, but which are internal 00030 to the library. */ 00031 00032 /* #define PCRE_DATA_SCOPE */ 00033 00034 /* Define the following macro to empty if the "const" keyword does not work. */ 00035 00036 #undef const 00037 00038 /* Define the following macro to "unsigned" if <stddef.h> does not define 00039 size_t. */ 00040 00041 #undef size_t 00042 00043 /* The following two definitions are mainly for the benefit of SunOS4, which 00044 does not have the strerror() or memmove() functions that should be present in 00045 all Standard C libraries. The macros HAVE_STRERROR and HAVE_MEMMOVE should 00046 normally be defined with the value 1 for other systems, but unfortunately we 00047 cannot make this the default because "configure" files generated by autoconf 00048 will only change 0 to 1; they won't change 1 to 0 if the functions are not 00049 found. */ 00050 00051 #define HAVE_STRERROR 1 00052 #define HAVE_MEMMOVE 1 00053 00054 /* There are some non-Unix-like systems that don't even have bcopy(). If this 00055 macro is false, an emulation is used. If HAVE_MEMMOVE is set to 1, the value of 00056 HAVE_BCOPY is not relevant. */ 00057 00058 #define HAVE_BCOPY 0 00059 00060 /* The value of NEWLINE determines the newline character. The default is to 00061 leave it up to the compiler, but some sites want to force a particular value. 00062 On Unix-like systems, "configure" can be used to override this default. */ 00063 00064 #ifndef NEWLINE 00065 #define NEWLINE '\n' 00066 #endif 00067 00068 /* The value of LINK_SIZE determines the number of bytes used to store links as 00069 offsets within the compiled regex. The default is 2, which allows for compiled 00070 patterns up to 64K long. This covers the vast majority of cases. However, PCRE 00071 can also be compiled to use 3 or 4 bytes instead. This allows for longer 00072 patterns in extreme cases. On systems that support it, "configure" can be used 00073 to override this default. */ 00074 00075 #ifndef LINK_SIZE 00076 #define LINK_SIZE 2 00077 #endif 00078 00079 /* When calling PCRE via the POSIX interface, additional working storage is 00080 required for holding the pointers to capturing substrings because PCRE requires 00081 three integers per substring, whereas the POSIX interface provides only two. If 00082 the number of expected substrings is small, the wrapper function uses space on 00083 the stack, because this is faster than using malloc() for each call. The 00084 threshold above which the stack is no longer used is defined by POSIX_MALLOC_ 00085 THRESHOLD. On systems that support it, "configure" can be used to override this 00086 default. */ 00087 00088 #ifndef POSIX_MALLOC_THRESHOLD 00089 #define POSIX_MALLOC_THRESHOLD 10 00090 #endif 00091 00092 /* PCRE uses recursive function calls to handle backtracking while matching. 00093 This can sometimes be a problem on systems that have stacks of limited size. 00094 Define NO_RECURSE to get a version that doesn't use recursion in the match() 00095 function; instead it creates its own stack by steam using pcre_recurse_malloc() 00096 to obtain memory from the heap. For more detail, see the comments and other 00097 stuff just above the match() function. On systems that support it, "configure" 00098 can be used to set this in the Makefile (use --disable-stack-for-recursion). */ 00099 00100 /* #define NO_RECURSE */ 00101 00102 /* The value of MATCH_LIMIT determines the default number of times the internal 00103 match() function can be called during a single execution of pcre_exec(). There 00104 is a runtime interface for setting a different limit. The limit exists in order 00105 to catch runaway regular expressions that take for ever to determine that they 00106 do not match. The default is set very large so that it does not accidentally 00107 catch legitimate cases. On systems that support it, "configure" can be used to 00108 override this default default. */ 00109 00110 #ifndef MATCH_LIMIT 00111 #define MATCH_LIMIT 10000000 00112 #endif 00113 00114 /* The above limit applies to all calls of match(), whether or not they 00115 increase the recursion depth. In some environments it is desirable to limit the 00116 depth of recursive calls of match() more strictly, in order to restrict the 00117 maximum amount of stack (or heap, if NO_RECURSE is defined) that is used. The 00118 value of MATCH_LIMIT_RECURSION applies only to recursive calls of match(). To 00119 have any useful effect, it must be less than the value of MATCH_LIMIT. There is 00120 a runtime method for setting a different limit. On systems that support it, 00121 "configure" can be used to override this default default. */ 00122 00123 #ifndef MATCH_LIMIT_RECURSION 00124 #define MATCH_LIMIT_RECURSION MATCH_LIMIT 00125 #endif 00126 00127 /* These three limits are parameterized just in case anybody ever wants to 00128 change them. Care must be taken if they are increased, because they guard 00129 against integer overflow caused by enormously large patterns. */ 00130 00131 #ifndef MAX_NAME_SIZE 00132 #define MAX_NAME_SIZE 32 00133 #endif 00134 00135 #ifndef MAX_NAME_COUNT 00136 #define MAX_NAME_COUNT 10000 00137 #endif 00138 00139 #ifndef MAX_DUPLENGTH 00140 #define MAX_DUPLENGTH 30000 00141 #endif 00142 00143 /* End */