xref: /PHP-7.2/ext/pcre/pcrelib/config.h (revision 8a287c0e)
1 
2 #include <php_compat.h>
3 
4 #ifdef PHP_WIN32
5 # include <config.w32.h>
6 #else
7 # include <php_config.h>
8 #endif
9 
10 #undef PACKAGE_NAME
11 #undef PACKAGE_VERSION
12 #undef PACKAGE_TARNAME
13 #undef PACKAGE_STRING
14 
15 #define SUPPORT_UCP
16 #define SUPPORT_UTF8
17 
18 #if defined(__GNUC__) && __GNUC__ >= 4
19 # ifdef __cplusplus
20 #  define PCRE_EXP_DECL		extern "C" __attribute__ ((visibility("default")))
21 # else
22 #  define PCRE_EXP_DECL		extern __attribute__ ((visibility("default")))
23 # endif
24 # define PCRE_EXP_DEFN		__attribute__ ((visibility("default")))
25 # define PCRE_EXP_DATA_DEFN	__attribute__ ((visibility("default")))
26 #endif
27 
28 
29 /* Exclude these below definitions when building within PHP */
30 #ifndef ZEND_API
31 
32 /* config.h.  Generated from config.h.in by configure.  */
33 /* config.h.in.  Generated from configure.ac by autoheader.  */
34 
35 
36 /* PCRE is written in Standard C, but there are a few non-standard things it
37 can cope with, allowing it to run on SunOS4 and other "close to standard"
38 systems.
39 
40 In environments that support the facilities, config.h.in is converted by
41 "configure", or config-cmake.h.in is converted by CMake, into config.h. If you
42 are going to build PCRE "by hand" without using "configure" or CMake, you
43 should copy the distributed config.h.generic to config.h, and then edit the
44 macro definitions to be the way you need them. You must then add
45 -DHAVE_CONFIG_H to all of your compile commands, so that config.h is included
46 at the start of every source.
47 
48 Alternatively, you can avoid editing by using -D on the compiler command line
49 to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H.
50 
51 PCRE uses memmove() if HAVE_MEMMOVE is set to 1; otherwise it uses bcopy() if
52 HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set
53 them both to 0; an emulation function will be used. */
54 
55 /* By default, the \R escape sequence matches any Unicode line ending
56    character or sequence of characters. If BSR_ANYCRLF is defined (to any
57    value), this is changed so that backslash-R matches only CR, LF, or CRLF.
58    The build-time default can be overridden by the user of PCRE at runtime. */
59 #undef BSR_ANYCRLF
60 
61 /* If you are compiling for a system that uses EBCDIC instead of ASCII
62    character codes, define this macro to any value. You must also edit the
63    NEWLINE macro below to set a suitable EBCDIC newline, commonly 21 (0x15).
64    On systems that can use "configure" or CMake to set EBCDIC, NEWLINE is
65    automatically adjusted. When EBCDIC is set, PCRE assumes that all input
66    strings are in EBCDIC. If you do not define this macro, PCRE will assume
67    input strings are ASCII or UTF-8/16/32 Unicode. It is not possible to build
68    a version of PCRE that supports both EBCDIC and UTF-8/16/32. */
69 #undef EBCDIC
70 
71 /* In an EBCDIC environment, define this macro to any value to arrange for the
72    NL character to be 0x25 instead of the default 0x15. NL plays the role that
73    LF does in an ASCII/Unicode environment. The value must also be set in the
74    NEWLINE macro below. On systems that can use "configure" or CMake to set
75    EBCDIC_NL25, the adjustment of NEWLINE is automatic. */
76 #undef EBCDIC_NL25
77 
78 /* Define to 1 if you have the `bcopy' function. */
79 #ifndef HAVE_BCOPY
80 #define HAVE_BCOPY 1
81 #endif
82 
83 /* Define to 1 if you have the <bits/type_traits.h> header file. */
84 /* #undef HAVE_BITS_TYPE_TRAITS_H */
85 
86 /* Define to 1 if you have the <bzlib.h> header file. */
87 #ifndef HAVE_BZLIB_H
88 #define HAVE_BZLIB_H 1
89 #endif
90 
91 /* Define to 1 if you have the <dirent.h> header file. */
92 #ifndef HAVE_DIRENT_H
93 #define HAVE_DIRENT_H 1
94 #endif
95 
96 /* Define to 1 if you have the <dlfcn.h> header file. */
97 #ifndef HAVE_DLFCN_H
98 #define HAVE_DLFCN_H 1
99 #endif
100 
101 /* Define to 1 if you have the <editline/readline.h> header file. */
102 /*#undef HAVE_EDITLINE_READLINE_H*/
103 
104 /* Define to 1 if you have the <edit/readline/readline.h> header file. */
105 /* #undef HAVE_EDIT_READLINE_READLINE_H */
106 
107 /* Define to 1 if you have the <inttypes.h> header file. */
108 #ifndef HAVE_INTTYPES_H
109 #define HAVE_INTTYPES_H 1
110 #endif
111 
112 /* Define to 1 if you have the <limits.h> header file. */
113 #ifndef HAVE_LIMITS_H
114 #define HAVE_LIMITS_H 1
115 #endif
116 
117 /* Define to 1 if the system has the type `long long'. */
118 #ifndef HAVE_LONG_LONG
119 #define HAVE_LONG_LONG 1
120 #endif
121 
122 /* Define to 1 if you have the `memmove' function. */
123 #ifndef HAVE_MEMMOVE
124 #define HAVE_MEMMOVE 1
125 #endif
126 
127 /* Define to 1 if you have the <memory.h> header file. */
128 #ifndef HAVE_MEMORY_H
129 #define HAVE_MEMORY_H 1
130 #endif
131 
132 /* Define if you have POSIX threads libraries and header files. */
133 #undef HAVE_PTHREAD
134 
135 /* Have PTHREAD_PRIO_INHERIT. */
136 #undef HAVE_PTHREAD_PRIO_INHERIT
137 /* Define to 1 if you have the <readline/history.h> header file. */
138 #ifndef HAVE_READLINE_HISTORY_H
139 #define HAVE_READLINE_HISTORY_H 1
140 #endif
141 
142 /* Define to 1 if you have the <readline/readline.h> header file. */
143 #ifndef HAVE_READLINE_READLINE_H
144 #define HAVE_READLINE_READLINE_H 1
145 #endif
146 
147 /* Define to 1 if you have the <stdint.h> header file. */
148 #ifndef HAVE_STDINT_H
149 #define HAVE_STDINT_H 1
150 #endif
151 
152 /* Define to 1 if you have the <stdlib.h> header file. */
153 #ifndef HAVE_STDLIB_H
154 #define HAVE_STDLIB_H 1
155 #endif
156 
157 /* Define to 1 if you have the `strerror' function. */
158 #ifndef HAVE_STRERROR
159 #define HAVE_STRERROR 1
160 #endif
161 
162 /* Define to 1 if you have the <string> header file. */
163 #ifndef HAVE_STRING
164 #define HAVE_STRING 1
165 #endif
166 
167 /* Define to 1 if you have the <strings.h> header file. */
168 #ifndef HAVE_STRINGS_H
169 #define HAVE_STRINGS_H 1
170 #endif
171 
172 /* Define to 1 if you have the <string.h> header file. */
173 #ifndef HAVE_STRING_H
174 #define HAVE_STRING_H 1
175 #endif
176 
177 /* Define to 1 if you have `strtoimax'. */
178 /* #undef HAVE_STRTOIMAX */
179 
180 /* Define to 1 if you have `strtoll'. */
181 /* #undef HAVE_STRTOLL */
182 
183 /* Define to 1 if you have `strtoq'. */
184 #ifndef HAVE_STRTOQ
185 #define HAVE_STRTOQ 1
186 #endif
187 
188 /* Define to 1 if you have the <sys/stat.h> header file. */
189 #ifndef HAVE_SYS_STAT_H
190 #define HAVE_SYS_STAT_H 1
191 #endif
192 
193 /* Define to 1 if you have the <sys/types.h> header file. */
194 #ifndef HAVE_SYS_TYPES_H
195 #define HAVE_SYS_TYPES_H 1
196 #endif
197 
198 /* Define to 1 if you have the <type_traits.h> header file. */
199 /* #undef HAVE_TYPE_TRAITS_H */
200 
201 /* Define to 1 if you have the <unistd.h> header file. */
202 #ifndef HAVE_UNISTD_H
203 #define HAVE_UNISTD_H 1
204 #endif
205 
206 /* Define to 1 if the system has the type `unsigned long long'. */
207 #ifndef HAVE_UNSIGNED_LONG_LONG
208 #define HAVE_UNSIGNED_LONG_LONG 1
209 #endif
210 
211 /* Define to 1 or 0, depending whether the compiler supports simple visibility
212    declarations. */
213 /* #undef HAVE_VISIBILITY */
214 
215 /* Define to 1 if you have the <windows.h> header file. */
216 /* #undef HAVE_WINDOWS_H */
217 
218 /* Define to 1 if you have the <zlib.h> header file. */
219 #ifndef HAVE_ZLIB_H
220 #define HAVE_ZLIB_H 1
221 #endif
222 
223 /* Define to 1 if you have `_strtoi64'. */
224 /* #undef HAVE__STRTOI64 */
225 
226 /* Exclude these above definitions when building within PHP */
227 #endif
228 
229 /* The value of LINK_SIZE determines the number of bytes used to store links
230    as offsets within the compiled regex. The default is 2, which allows for
231    compiled patterns up to 64K long. This covers the vast majority of cases.
232    However, PCRE can also be compiled to use 3 or 4 bytes instead. This allows
233    for longer patterns in extreme cases. On systems that support it,
234    "configure" can be used to override this default. */
235 #ifndef LINK_SIZE
236 #define LINK_SIZE 2
237 #endif
238 
239 /* Define to the sub-directory where libtool stores uninstalled libraries. */
240 /* This is ignored unless you are using libtool. */
241 #ifndef LT_OBJDIR
242 #define LT_OBJDIR ".libs/"
243 #endif
244 
245 /* The value of MATCH_LIMIT determines the default number of times the
246    internal match() function can be called during a single execution of
247    pcre_exec(). There is a runtime interface for setting a different limit.
248    The limit exists in order to catch runaway regular expressions that take
249    for ever to determine that they do not match. The default is set very large
250    so that it does not accidentally catch legitimate cases. On systems that
251    support it, "configure" can be used to override this default default. */
252 #ifndef MATCH_LIMIT
253 #define MATCH_LIMIT 10000000
254 #endif
255 
256 /* The above limit applies to all calls of match(), whether or not they
257    increase the recursion depth. In some environments it is desirable to limit
258    the depth of recursive calls of match() more strictly, in order to restrict
259    the maximum amount of stack (or heap, if NO_RECURSE is defined) that is
260    used. The value of MATCH_LIMIT_RECURSION applies only to recursive calls of
261    match(). To have any useful effect, it must be less than the value of
262    MATCH_LIMIT. The default is to use the same value as MATCH_LIMIT. There is
263    a runtime method for setting a different limit. On systems that support it,
264    "configure" can be used to override the default. */
265 #ifndef MATCH_LIMIT_RECURSION
266 #define MATCH_LIMIT_RECURSION MATCH_LIMIT
267 #endif
268 
269 /* This limit is parameterized just in case anybody ever wants to change it.
270    Care must be taken if it is increased, because it guards against integer
271    overflow caused by enormously large patterns. */
272 #ifndef MAX_NAME_COUNT
273 #define MAX_NAME_COUNT 10000
274 #endif
275 
276 /* This limit is parameterized just in case anybody ever wants to change it.
277    Care must be taken if it is increased, because it guards against integer
278    overflow caused by enormously large patterns. */
279 #ifndef MAX_NAME_SIZE
280 #define MAX_NAME_SIZE 32
281 #endif
282 
283 /* The value of NEWLINE determines the default newline character sequence.
284    PCRE client programs can override this by selecting other values at run
285    time. In ASCII environments, the value can be 10 (LF), 13 (CR), or 3338
286    (CRLF); in EBCDIC environments the value can be 21 or 37 (LF), 13 (CR), or
287    3349 or 3365 (CRLF) because there are two alternative codepoints (0x15 and
288    0x25) that are used as the NL line terminator that is equivalent to ASCII
289    LF. In both ASCII and EBCDIC environments the value can also be -1 (ANY),
290    or -2 (ANYCRLF). */
291 #ifndef NEWLINE
292 #define NEWLINE 10
293 #endif
294 
295 /* Define to 1 if your C compiler doesn't accept -c and -o together. */
296 /* #undef NO_MINUS_C_MINUS_O */
297 
298 /* PCRE uses recursive function calls to handle backtracking while matching.
299    This can sometimes be a problem on systems that have stacks of limited
300    size. Define NO_RECURSE to any value to get a version that doesn't use
301    recursion in the match() function; instead it creates its own stack by
302    steam using pcre_recurse_malloc() to obtain memory from the heap. For more
303    detail, see the comments and other stuff just above the match() function.
304    */
305 /* #undef NO_RECURSE */
306 
307 #define PARENS_NEST_LIMIT 250
308 
309 /* Name of package */
310 #define PACKAGE "pcre"
311 
312 /* Define to the address where bug reports for this package should be sent. */
313 #define PACKAGE_BUGREPORT ""
314 
315 /* Define to the full name of this package. */
316 #define PACKAGE_NAME "PCRE"
317 
318 /* Define to the full name and version of this package. */
319 #define PACKAGE_STRING "PCRE 8.41"
320 
321 /* Define to the one symbol short name of this package. */
322 #define PACKAGE_TARNAME "pcre"
323 
324 /* Define to the home page for this package. */
325 #define PACKAGE_URL ""
326 
327 /* Define to the version of this package. */
328 #define PACKAGE_VERSION "8.41"
329 
330 /* to make a symbol visible */
331 /* #undef PCRECPP_EXP_DECL */
332 
333 /* to make a symbol visible */
334 /* #undef PCRECPP_EXP_DEFN */
335 
336 /* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
337    parentheses (of any kind) in a pattern. This limits the amount of system
338    stack that is used while compiling a pattern. */
339 #ifndef PARENS_NEST_LIMIT
340 #define PARENS_NEST_LIMIT 250
341 #endif
342 
343 /* The value of PCREGREP_BUFSIZE determines the size of buffer used by
344    pcregrep to hold parts of the file it is searching. This is also the
345    minimum value. The actual amount of memory used by pcregrep is three times
346    this number, because it allows for the buffering of "before" and "after"
347    lines. */
348 /* #undef PCREGREP_BUFSIZE */
349 
350 /* to make a symbol visible */
351 /* #undef PCREPOSIX_EXP_DECL */
352 
353 /* to make a symbol visible */
354 /* #undef PCREPOSIX_EXP_DEFN */
355 
356 /* to make a symbol visible */
357 /* #undef PCRE_EXP_DATA_DEFN */
358 
359 /* to make a symbol visible */
360 /* #undef PCRE_EXP_DECL */
361 
362 
363 /* If you are compiling for a system other than a Unix-like system or
364    Win32, and it needs some magic to be inserted before the definition
365    of a function that is exported by the library, define this macro to
366    contain the relevant magic. If you do not define this macro, a suitable
367     __declspec value is used for Windows systems; in other environments
368    "extern" is used for a C compiler and "extern C" for a C++ compiler.
369    This macro apears at the start of every exported function that is part
370    of the external API. It does not appear on functions that are "external"
371    in the C sense, but which are internal to the library. */
372 /* #undef PCRE_EXP_DEFN */
373 
374 /* Define to any value if linking statically (TODO: make nice with Libtool) */
375 /* #undef PCRE_STATIC */
376 
377 /* When calling PCRE via the POSIX interface, additional working storage is
378    required for holding the pointers to capturing substrings because PCRE
379    requires three integers per substring, whereas the POSIX interface provides
380    only two. If the number of expected substrings is small, the wrapper
381    function uses space on the stack, because this is faster than using
382    malloc() for each call. The threshold above which the stack is no longer
383    used is defined by POSIX_MALLOC_THRESHOLD. */
384 #ifndef POSIX_MALLOC_THRESHOLD
385 #define POSIX_MALLOC_THRESHOLD 10
386 #endif
387 
388 /* Define to necessary symbol if this constant uses a non-standard name on
389    your system. */
390 /* #undef PTHREAD_CREATE_JOINABLE */
391 
392 /* Define to 1 if you have the ANSI C header files. */
393 #ifndef STDC_HEADERS
394 #define STDC_HEADERS 1
395 #endif
396 
397 /* Define to allow pcretest and pcregrep to be linked with gcov, so that they
398    are able to generate code coverage reports. */
399 #undef SUPPORT_GCOV
400 
401 /* Define to any value to enable support for Just-In-Time compiling. */
402 #if HAVE_PCRE_JIT_SUPPORT
403 #define SUPPORT_JIT
404 #endif
405 
406 /* Define to any value to allow pcregrep to be linked with libbz2, so that it
407    is able to handle .bz2 files. */
408 /* #undef SUPPORT_LIBBZ2 */
409 
410 /* Define to any value to allow pcretest to be linked with libedit. */
411 #undef SUPPORT_LIBEDIT
412 
413 /* Define to any value to allow pcretest to be linked with libreadline. */
414 /* #undef SUPPORT_LIBREADLINE */
415 
416 /* Define to any value to allow pcregrep to be linked with libz, so that it is
417    able to handle .gz files. */
418 /* #undef SUPPORT_LIBZ */
419 
420 /* Define to any value to enable the 16 bit PCRE library. */
421 /* #undef SUPPORT_PCRE16 */
422 
423 /* Define to any value to enable the 32 bit PCRE library. */
424 /* #undef SUPPORT_PCRE32 */
425 
426 /* Define to any value to enable the 8 bit PCRE library. */
427 /* #undef SUPPORT_PCRE8 */
428 
429 /* Define to any value to enable JIT support in pcregrep. */
430 /* #undef SUPPORT_PCREGREP_JIT */
431 
432 /* Define to enable support for Unicode properties */
433 /* #undef SUPPORT_UCP */
434 
435 /* Define to any value to enable support for the UTF-8/16/32 Unicode encoding.
436    This will work even in an EBCDIC environment, but it is incompatible with
437    the EBCDIC macro. That is, PCRE can support *either* EBCDIC code *or*
438    ASCII/UTF-8/16/32, but not both at once. */
439 /* #undef SUPPORT_UTF8 */
440 
441 /* Valgrind support to find invalid memory reads. */
442 #if HAVE_PCRE_VALGRIND_SUPPORT
443 #define SUPPORT_VALGRIND 1
444 #endif
445 
446 /* Version number of package */
447 #ifndef VERSION
448 #define VERSION "8.41"
449 #endif
450 
451 /* Define to empty if `const' does not conform to ANSI C. */
452 /* #undef const */
453 
454 /* Define to the type of a signed integer type of width exactly 64 bits if
455    such a type exists and the standard includes do not define it. */
456 /* #undef int64_t */
457 
458 /* Define to `unsigned int' if <sys/types.h> does not define. */
459 /* #undef size_t */
460