Skip to content

Commit 1080799

Browse files
upstream: update to pcre2 10.43 release
PR #40
1 parent de949d1 commit 1080799

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+22824
-9459
lines changed

pcre2-sys/src/bindings.rs

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
/* automatically generated by rust-bindgen 0.66.0 */
1+
/* automatically generated by rust-bindgen 0.69.4 */
22

33
pub const PCRE2_MAJOR: u32 = 10;
4-
pub const PCRE2_MINOR: u32 = 42;
5-
pub const PCRE2_DATE: u32 = 1999;
4+
pub const PCRE2_MINOR: u32 = 43;
5+
pub const PCRE2_DATE: u32 = 2006;
66
pub const PCRE2_ANCHORED: u32 = 2147483648;
77
pub const PCRE2_NO_UTF_CHECK: u32 = 1073741824;
88
pub const PCRE2_ENDANCHORED: u32 = 536870912;
@@ -40,6 +40,12 @@ pub const PCRE2_EXTRA_MATCH_LINE: u32 = 8;
4040
pub const PCRE2_EXTRA_ESCAPED_CR_IS_LF: u32 = 16;
4141
pub const PCRE2_EXTRA_ALT_BSUX: u32 = 32;
4242
pub const PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK: u32 = 64;
43+
pub const PCRE2_EXTRA_CASELESS_RESTRICT: u32 = 128;
44+
pub const PCRE2_EXTRA_ASCII_BSD: u32 = 256;
45+
pub const PCRE2_EXTRA_ASCII_BSS: u32 = 512;
46+
pub const PCRE2_EXTRA_ASCII_BSW: u32 = 1024;
47+
pub const PCRE2_EXTRA_ASCII_POSIX: u32 = 2048;
48+
pub const PCRE2_EXTRA_ASCII_DIGIT: u32 = 4096;
4349
pub const PCRE2_JIT_COMPLETE: u32 = 1;
4450
pub const PCRE2_JIT_PARTIAL_SOFT: u32 = 2;
4551
pub const PCRE2_JIT_PARTIAL_HARD: u32 = 4;
@@ -62,6 +68,7 @@ pub const PCRE2_COPY_MATCHED_SUBJECT: u32 = 16384;
6268
pub const PCRE2_SUBSTITUTE_LITERAL: u32 = 32768;
6369
pub const PCRE2_SUBSTITUTE_MATCHED: u32 = 65536;
6470
pub const PCRE2_SUBSTITUTE_REPLACEMENT_ONLY: u32 = 131072;
71+
pub const PCRE2_DISABLE_RECURSELOOP_CHECK: u32 = 262144;
6572
pub const PCRE2_CONVERT_UTF: u32 = 1;
6673
pub const PCRE2_CONVERT_NO_UTF_CHECK: u32 = 2;
6774
pub const PCRE2_CONVERT_POSIX_BASIC: u32 = 4;
@@ -243,6 +250,7 @@ pub const PCRE2_ERROR_HEAPLIMIT: i32 = -63;
243250
pub const PCRE2_ERROR_CONVERT_SYNTAX: i32 = -64;
244251
pub const PCRE2_ERROR_INTERNAL_DUPMATCH: i32 = -65;
245252
pub const PCRE2_ERROR_DFA_UINVALID_UTF: i32 = -66;
253+
pub const PCRE2_ERROR_INVALIDOFFSET: i32 = -67;
246254
pub const PCRE2_INFO_ALLOPTIONS: u32 = 0;
247255
pub const PCRE2_INFO_ARGOPTIONS: u32 = 1;
248256
pub const PCRE2_INFO_BACKREFMAX: u32 = 2;
@@ -288,6 +296,7 @@ pub const PCRE2_CONFIG_HEAPLIMIT: u32 = 12;
288296
pub const PCRE2_CONFIG_NEVER_BACKSLASH_C: u32 = 13;
289297
pub const PCRE2_CONFIG_COMPILED_WIDTHS: u32 = 14;
290298
pub const PCRE2_CONFIG_TABLES_LENGTH: u32 = 15;
299+
pub const PCRE2_SIZE_MAX: i32 = -1;
291300
pub const PCRE2_CALLOUT_STARTMATCH: u32 = 1;
292301
pub const PCRE2_CALLOUT_BACKTRACK: u32 = 2;
293302
pub const PCRE2_LOCAL_WIDTH: u32 = 8;
@@ -410,6 +419,12 @@ extern "C" {
410419
arg2: usize,
411420
) -> ::libc::c_int;
412421
}
422+
extern "C" {
423+
pub fn pcre2_set_max_varlookbehind_8(
424+
arg1: *mut pcre2_compile_context_8,
425+
arg2: u32,
426+
) -> ::libc::c_int;
427+
}
413428
extern "C" {
414429
pub fn pcre2_set_newline_8(
415430
arg1: *mut pcre2_compile_context_8,
@@ -607,6 +622,11 @@ extern "C" {
607622
pub fn pcre2_get_match_data_size_8(arg1: *mut pcre2_match_data_8)
608623
-> usize;
609624
}
625+
extern "C" {
626+
pub fn pcre2_get_match_data_heapframes_size_8(
627+
arg1: *mut pcre2_match_data_8,
628+
) -> usize;
629+
}
610630
extern "C" {
611631
pub fn pcre2_get_ovector_count_8(arg1: *mut pcre2_match_data_8) -> u32;
612632
}
@@ -682,7 +702,7 @@ extern "C" {
682702
) -> ::libc::c_int;
683703
}
684704
extern "C" {
685-
pub fn pcre2_substring_list_free_8(arg1: *mut PCRE2_SPTR8);
705+
pub fn pcre2_substring_list_free_8(arg1: *mut *mut PCRE2_UCHAR8);
686706
}
687707
extern "C" {
688708
pub fn pcre2_substring_list_get_8(
@@ -896,6 +916,12 @@ extern "C" {
896916
arg2: usize,
897917
) -> ::libc::c_int;
898918
}
919+
extern "C" {
920+
pub fn pcre2_set_max_varlookbehind_16(
921+
arg1: *mut pcre2_compile_context_16,
922+
arg2: u32,
923+
) -> ::libc::c_int;
924+
}
899925
extern "C" {
900926
pub fn pcre2_set_newline_16(
901927
arg1: *mut pcre2_compile_context_16,
@@ -1096,6 +1122,11 @@ extern "C" {
10961122
arg1: *mut pcre2_match_data_16,
10971123
) -> usize;
10981124
}
1125+
extern "C" {
1126+
pub fn pcre2_get_match_data_heapframes_size_16(
1127+
arg1: *mut pcre2_match_data_16,
1128+
) -> usize;
1129+
}
10991130
extern "C" {
11001131
pub fn pcre2_get_ovector_count_16(arg1: *mut pcre2_match_data_16) -> u32;
11011132
}
@@ -1171,7 +1202,7 @@ extern "C" {
11711202
) -> ::libc::c_int;
11721203
}
11731204
extern "C" {
1174-
pub fn pcre2_substring_list_free_16(arg1: *mut PCRE2_SPTR16);
1205+
pub fn pcre2_substring_list_free_16(arg1: *mut *mut PCRE2_UCHAR16);
11751206
}
11761207
extern "C" {
11771208
pub fn pcre2_substring_list_get_16(
@@ -1388,6 +1419,12 @@ extern "C" {
13881419
arg2: usize,
13891420
) -> ::libc::c_int;
13901421
}
1422+
extern "C" {
1423+
pub fn pcre2_set_max_varlookbehind_32(
1424+
arg1: *mut pcre2_compile_context_32,
1425+
arg2: u32,
1426+
) -> ::libc::c_int;
1427+
}
13911428
extern "C" {
13921429
pub fn pcre2_set_newline_32(
13931430
arg1: *mut pcre2_compile_context_32,
@@ -1588,6 +1625,11 @@ extern "C" {
15881625
arg1: *mut pcre2_match_data_32,
15891626
) -> usize;
15901627
}
1628+
extern "C" {
1629+
pub fn pcre2_get_match_data_heapframes_size_32(
1630+
arg1: *mut pcre2_match_data_32,
1631+
) -> usize;
1632+
}
15911633
extern "C" {
15921634
pub fn pcre2_get_ovector_count_32(arg1: *mut pcre2_match_data_32) -> u32;
15931635
}
@@ -1663,7 +1705,7 @@ extern "C" {
16631705
) -> ::libc::c_int;
16641706
}
16651707
extern "C" {
1666-
pub fn pcre2_substring_list_free_32(arg1: *mut PCRE2_SPTR32);
1708+
pub fn pcre2_substring_list_free_32(arg1: *mut *mut PCRE2_UCHAR32);
16671709
}
16681710
extern "C" {
16691711
pub fn pcre2_substring_list_get_32(

pcre2-sys/update-pcre2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pcre2_sys_dir="$(dirname "$0")"
1111
cd "$pcre2_sys_dir"
1212

1313
dest="upstream"
14-
version="10.42"
14+
version="10.43"
1515
dir="pcre2-$version"
1616
archive="$dir.tar.gz"
1717
url="https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$version/$archive"
@@ -27,6 +27,7 @@ mkdir -p "$dest"/{src,include}
2727

2828
needed=(
2929
pcre2_auto_possess.c
30+
pcre2_chkdint.c
3031
pcre2_compile.c
3132
pcre2_config.c
3233
pcre2_context.c

pcre2-sys/upstream/include/config.h

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ sure both macros are undefined; an emulation function will then be used. */
5555
/* Define this if your compiler supports __attribute__((uninitialized)) */
5656
/* #undef HAVE_ATTRIBUTE_UNINITIALIZED */
5757

58-
/* Define to 1 if you have the `bcopy' function. */
58+
/* Define to 1 if you have the 'bcopy' function. */
5959
/* #undef HAVE_BCOPY */
6060

61+
/* Define this if your compiler provides __builtin_mul_overflow() */
62+
/* #undef HAVE_BUILTIN_MUL_OVERFLOW */
63+
6164
/* Define to 1 if you have the <bzlib.h> header file. */
6265
/* #undef HAVE_BZLIB_H */
6366

@@ -79,16 +82,16 @@ sure both macros are undefined; an emulation function will then be used. */
7982
/* Define to 1 if you have the <limits.h> header file. */
8083
/* #undef HAVE_LIMITS_H */
8184

82-
/* Define to 1 if you have the `memfd_create' function. */
85+
/* Define to 1 if you have the 'memfd_create' function. */
8386
/* #undef HAVE_MEMFD_CREATE */
8487

85-
/* Define to 1 if you have the `memmove' function. */
88+
/* Define to 1 if you have the 'memmove' function. */
8689
/* #undef HAVE_MEMMOVE */
8790

8891
/* Define to 1 if you have the <minix/config.h> header file. */
8992
/* #undef HAVE_MINIX_CONFIG_H */
9093

91-
/* Define to 1 if you have the `mkostemp' function. */
94+
/* Define to 1 if you have the 'mkostemp' function. */
9295
/* #undef HAVE_MKOSTEMP */
9396

9497
/* Define if you have POSIX threads libraries and header files. */
@@ -109,7 +112,7 @@ sure both macros are undefined; an emulation function will then be used. */
109112
/* Define to 1 if you have the `realpath' function. */
110113
/* #undef HAVE_REALPATH */
111114

112-
/* Define to 1 if you have the `secure_getenv' function. */
115+
/* Define to 1 if you have the 'secure_getenv' function. */
113116
/* #undef HAVE_SECURE_GETENV */
114117

115118
/* Define to 1 if you have the <stdint.h> header file. */
@@ -121,7 +124,7 @@ sure both macros are undefined; an emulation function will then be used. */
121124
/* Define to 1 if you have the <stdlib.h> header file. */
122125
/* #undef HAVE_STDLIB_H */
123126

124-
/* Define to 1 if you have the `strerror' function. */
127+
/* Define to 1 if you have the 'strerror' function. */
125128
/* #undef HAVE_STRERROR */
126129

127130
/* Define to 1 if you have the <strings.h> header file. */
@@ -181,7 +184,7 @@ sure both macros are undefined; an emulation function will then be used. */
181184
matching attempt. The value is also used to limit a loop counter in
182185
pcre2_dfa_match(). There is a runtime interface for setting a different
183186
limit. The limit exists in order to catch runaway regular expressions that
184-
take for ever to determine that they do not match. The default is set very
187+
take forever to determine that they do not match. The default is set very
185188
large so that it does not accidentally catch legitimate cases. */
186189
#ifndef MATCH_LIMIT
187190
#define MATCH_LIMIT 10000000
@@ -215,6 +218,12 @@ sure both macros are undefined; an emulation function will then be used. */
215218
#define MAX_NAME_SIZE 32
216219
#endif
217220

221+
/* The value of MAX_VARLOOKBEHIND specifies the default maximum length, in
222+
characters, for a variable-length lookbehind assertion. */
223+
#ifndef MAX_VARLOOKBEHIND
224+
#define MAX_VARLOOKBEHIND 255
225+
#endif
226+
218227
/* Defining NEVER_BACKSLASH_C locks out the use of \C in all patterns. */
219228
/* #undef NEVER_BACKSLASH_C */
220229

@@ -236,7 +245,7 @@ sure both macros are undefined; an emulation function will then be used. */
236245
#define PACKAGE_NAME "PCRE2"
237246

238247
/* Define to the full name and version of this package. */
239-
#define PACKAGE_STRING "PCRE2 10.42"
248+
#define PACKAGE_STRING "PCRE2 10.43"
240249

241250
/* Define to the one symbol short name of this package. */
242251
#define PACKAGE_TARNAME "pcre2"
@@ -245,7 +254,7 @@ sure both macros are undefined; an emulation function will then be used. */
245254
#define PACKAGE_URL ""
246255

247256
/* Define to the version of this package. */
248-
#define PACKAGE_VERSION "10.42"
257+
#define PACKAGE_VERSION "10.43"
249258

250259
/* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
251260
parentheses (of any kind) in a pattern. This limits the amount of system
@@ -275,12 +284,16 @@ sure both macros are undefined; an emulation function will then be used. */
275284
/* Define to any value to include debugging code. */
276285
/* #undef PCRE2_DEBUG */
277286

287+
/* to make a symbol visible */
288+
#define PCRE2_EXPORT
289+
278290
/* If you are compiling for a system other than a Unix-like system or
279291
Win32, and it needs some magic to be inserted before the definition
280292
of a function that is exported by the library, define this macro to
281293
contain the relevant magic. If you do not define this macro, a suitable
282-
__declspec value is used for Windows systems; in other environments
283-
"extern" is used for a C compiler and "extern C" for a C++ compiler.
294+
__declspec value is used for Windows systems; in other environments
295+
a compiler relevant "extern" is used with any "visibility" related
296+
attributes from PCRE2_EXPORT included.
284297
This macro apears at the start of every exported function that is part
285298
of the external API. It does not appear on functions that are "external"
286299
in the C sense, but which are internal to the library. */
@@ -298,11 +311,14 @@ sure both macros are undefined; an emulation function will then be used. */
298311
unless SUPPORT_JIT is also defined. */
299312
/* #undef SLJIT_PROT_EXECUTABLE_ALLOCATOR */
300313

301-
/* Define to 1 if all of the C90 standard headers exist (not just the ones
314+
/* Define to 1 if all of the C89 standard headers exist (not just the ones
302315
required in a freestanding environment). This macro is provided for
303316
backward compatibility; new code need not use it. */
304317
/* #undef STDC_HEADERS */
305318

319+
/* Define to any value to enable differential fuzzing support. */
320+
/* #undef SUPPORT_DIFF_FUZZ */
321+
306322
/* Define to any value to enable support for Just-In-Time compiling. */
307323
/* #undef SUPPORT_JIT */
308324

@@ -350,7 +366,7 @@ sure both macros are undefined; an emulation function will then be used. */
350366
/* Define to any value for valgrind support to find invalid memory reads. */
351367
/* #undef SUPPORT_VALGRIND */
352368

353-
/* Enable extensions on AIX 3, Interix. */
369+
/* Enable extensions on AIX, Interix, z/OS. */
354370
#ifndef _ALL_SOURCE
355371
# define _ALL_SOURCE 1
356372
#endif
@@ -411,11 +427,15 @@ sure both macros are undefined; an emulation function will then be used. */
411427
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
412428
# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
413429
#endif
430+
/* Enable extensions specified by C23 Annex F. */
431+
#ifndef __STDC_WANT_IEC_60559_EXT__
432+
# define __STDC_WANT_IEC_60559_EXT__ 1
433+
#endif
414434
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
415435
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
416436
# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
417437
#endif
418-
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
438+
/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */
419439
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
420440
# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
421441
#endif
@@ -438,20 +458,26 @@ sure both macros are undefined; an emulation function will then be used. */
438458
#endif
439459

440460
/* Version number of package */
441-
#define VERSION "10.42"
461+
#define VERSION "10.43"
442462

443463
/* Number of bits in a file offset, on hosts where this is settable. */
444464
/* #undef _FILE_OFFSET_BITS */
445465

446-
/* Define for large files, on AIX-style hosts. */
466+
/* Define to 1 on platforms where this makes off_t a 64-bit type. */
447467
/* #undef _LARGE_FILES */
448468

449-
/* Define to empty if `const' does not conform to ANSI C. */
469+
/* Number of bits in time_t, on hosts where this is settable. */
470+
/* #undef _TIME_BITS */
471+
472+
/* Define to 1 on platforms where this makes time_t a 64-bit type. */
473+
/* #undef __MINGW_USE_VC2005_COMPAT */
474+
475+
/* Define to empty if 'const' does not conform to ANSI C. */
450476
/* #undef const */
451477

452478
/* Define to the type of a signed integer type of width exactly 64 bits if
453479
such a type exists and the standard includes do not define it. */
454480
/* #undef int64_t */
455481

456-
/* Define to `unsigned int' if <sys/types.h> does not define. */
482+
/* Define as 'unsigned int' if <stddef.h> doesn't define. */
457483
/* #undef size_t */

0 commit comments

Comments
 (0)