mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
Reduce header complexity of PCRE2
This commit is contained in:
parent
b27e9fe845
commit
4a63e4a27e
14 changed files with 25 additions and 15 deletions
4
third_party/pcre/pcre2.h
vendored
4
third_party/pcre/pcre2.h
vendored
|
@ -91,10 +91,6 @@ not have stdint.h, which is why we use inttypes.h, which according to the C
|
|||
standard is a superset of stdint.h. If inttypes.h is not available the build
|
||||
will break and the relevant values must be provided by some other means. */
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
/* Allow for C++ users compiling this directly. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
2
third_party/pcre/pcre2_compile.c
vendored
2
third_party/pcre/pcre2_compile.c
vendored
|
@ -1,3 +1,5 @@
|
|||
#include "libc/str/str.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
PCRE2 (PCRE2 License)\\n\
|
||||
Copyright (c) 1997-2022 University of Cambridge\"");
|
||||
|
|
1
third_party/pcre/pcre2_config.c
vendored
1
third_party/pcre/pcre2_config.c
vendored
|
@ -39,6 +39,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "libc/str/str.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
|
|
3
third_party/pcre/pcre2_context.c
vendored
3
third_party/pcre/pcre2_context.c
vendored
|
@ -1,3 +1,6 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
|
||||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
|
2
third_party/pcre/pcre2_convert.c
vendored
2
third_party/pcre/pcre2_convert.c
vendored
|
@ -1,3 +1,5 @@
|
|||
#include "libc/str/str.h"
|
||||
|
||||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
|
2
third_party/pcre/pcre2_dfa_match.c
vendored
2
third_party/pcre/pcre2_dfa_match.c
vendored
|
@ -1,3 +1,5 @@
|
|||
#include "libc/str/str.h"
|
||||
|
||||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
|
12
third_party/pcre/pcre2_internal.h
vendored
12
third_party/pcre/pcre2_internal.h
vendored
|
@ -53,13 +53,6 @@ pcre2test.c with CODE_UNIT_WIDTH == 0. */
|
|||
|
||||
/* Standard C headers */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Macros to make boolean values more obvious. The #ifndef is to pacify
|
||||
compiler warnings in environments where these macros are defined elsewhere.
|
||||
Unfortunately, there is no way to do the same for the typedef. */
|
||||
|
@ -72,10 +65,6 @@ typedef int BOOL;
|
|||
|
||||
/* Valgrind (memcheck) support */
|
||||
|
||||
#ifdef SUPPORT_VALGRIND
|
||||
#include <valgrind/memcheck.h>
|
||||
#endif
|
||||
|
||||
/* -ftrivial-auto-var-init support supports initializing all local variables
|
||||
to avoid some classes of bug, but this can cause an unacceptable slowdown
|
||||
for large on-stack arrays in hot functions. This macro lets us annotate
|
||||
|
@ -140,6 +129,7 @@ only if it is not already set. */
|
|||
/* Include the public PCRE2 header and the definitions of UCP character
|
||||
property values. This must follow the setting of PCRE2_EXP_DECL above. */
|
||||
|
||||
#include "libc/limits.h"
|
||||
#include "pcre2.h"
|
||||
#include "pcre2_ucp.h"
|
||||
|
||||
|
|
2
third_party/pcre/pcre2_maketables.c
vendored
2
third_party/pcre/pcre2_maketables.c
vendored
|
@ -1,6 +1,8 @@
|
|||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/mem/mem.h"
|
||||
|
||||
/* PCRE is a library of functions to support regular expressions whose syntax
|
||||
and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
|
2
third_party/pcre/pcre2_match.c
vendored
2
third_party/pcre/pcre2_match.c
vendored
|
@ -1,3 +1,5 @@
|
|||
#include "libc/str/str.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
PCRE2 (PCRE2 License)\\n\
|
||||
Copyright (c) 1997-2022 University of Cambridge\"");
|
||||
|
|
2
third_party/pcre/pcre2_script_run.c
vendored
2
third_party/pcre/pcre2_script_run.c
vendored
|
@ -1,3 +1,5 @@
|
|||
#include "libc/str/str.h"
|
||||
|
||||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
|
2
third_party/pcre/pcre2_serialize.c
vendored
2
third_party/pcre/pcre2_serialize.c
vendored
|
@ -1,3 +1,5 @@
|
|||
#include "libc/str/str.h"
|
||||
|
||||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
|
2
third_party/pcre/pcre2_study.c
vendored
2
third_party/pcre/pcre2_study.c
vendored
|
@ -1,3 +1,5 @@
|
|||
#include "libc/str/str.h"
|
||||
|
||||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
|
2
third_party/pcre/pcre2_substitute.c
vendored
2
third_party/pcre/pcre2_substitute.c
vendored
|
@ -1,3 +1,5 @@
|
|||
#include "libc/str/str.h"
|
||||
|
||||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
|
2
third_party/pcre/pcre2_substring.c
vendored
2
third_party/pcre/pcre2_substring.c
vendored
|
@ -1,3 +1,5 @@
|
|||
#include "libc/str/str.h"
|
||||
|
||||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
|
Loading…
Reference in a new issue