Skip to content

Commit

Permalink
Update pcre2 to 10.43
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Strickroth <email@cs-ware.de>
  • Loading branch information
csware committed Feb 20, 2024
1 parent 6d72ee9 commit 34e56cc
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 27 deletions.
5 changes: 3 additions & 2 deletions ext/build/pcre2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@
<AdditionalIncludeDirectories>pcre2;..\pcre2\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>HAVE_CONFIG_H;PCRE2_CODE_UNIT_WIDTH=8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>HAVE_CONFIG_H;PCRE2_CODE_UNIT_WIDTH=8;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level2</WarningLevel>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\pcre2\src\pcre2posix.c" />
<ClCompile Include="..\pcre2\src\pcre2_auto_possess.c" />
<ClCompile Include="..\pcre2\src\pcre2_chkdint.c" />
<ClCompile Include="..\pcre2\src\pcre2_compile.c" />
<ClCompile Include="..\pcre2\src\pcre2_config.c" />
<ClCompile Include="..\pcre2\src\pcre2_context.c" />
Expand Down
3 changes: 3 additions & 0 deletions ext/build/pcre2.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
<ClCompile Include="..\pcre2\src\pcre2posix.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\pcre2\src\pcre2_chkdint.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="pcre2\config.h">
Expand Down
15 changes: 8 additions & 7 deletions ext/build/pcre2/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ sure both macros are undefined; an emulation function will then be used. */

#define MAX_NAME_SIZE 32

/* The value of MAX_VARLOOKBEHIND specifies the default maximum length, in
characters, for a variable-length lookbehind assertion. */
#define MAX_VARLOOKBEHIND 255

/* Defining NEVER_BACKSLASH_C locks out the use of \C in all patterns. */
#undef NEVER_BACKSLASH_C

Expand Down Expand Up @@ -247,17 +251,11 @@ sure both macros are undefined; an emulation function will then be used. */
allows for the buffering of "before" and "after" lines. */
#define PCRE2GREP_MAX_BUFSIZE 1048576

/* to make a symbol visible */
#undef PCRE2POSIX_EXP_DECL

/* to make a symbol visible */
#undef PCRE2POSIX_EXP_DEFN

/* Define to any value to include debugging code. */
#undef PCRE2_DEBUG

/* to make a symbol visible */
#undef PCRE2_EXP_DECL
#define PCRE2_EXPORT


/* If you are compiling for a system other than a Unix-like system or
Expand Down Expand Up @@ -288,6 +286,9 @@ sure both macros are undefined; an emulation function will then be used. */
backward compatibility; new code need not use it. */
#undef STDC_HEADERS

/* Define to any value to enable differential fuzzing support. */
#undef SUPPORT_DIFF_FUZZ

/* Define to any value to enable support for Just-In-Time compiling. */
#undef SUPPORT_JIT

Expand Down
30 changes: 22 additions & 8 deletions ext/build/pcre2/pcre2.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* This is the public header file for the PCRE library, second API, to be
#included by applications that call PCRE2 functions.
Copyright (c) 2016-2021 University of Cambridge
Copyright (c) 2016-2024 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */

#define PCRE2_MAJOR 10
#define PCRE2_MINOR 42
#define PCRE2_MINOR 43
#define PCRE2_PRERELEASE
#define PCRE2_DATE 2022-12-11
#define PCRE2_DATE 2024-02-16

/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE2, the appropriate
Expand Down Expand Up @@ -153,6 +153,12 @@ D is inspected during pcre2_dfa_match() execution
#define PCRE2_EXTRA_ESCAPED_CR_IS_LF 0x00000010u /* C */
#define PCRE2_EXTRA_ALT_BSUX 0x00000020u /* C */
#define PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK 0x00000040u /* C */
#define PCRE2_EXTRA_CASELESS_RESTRICT 0x00000080u /* C */
#define PCRE2_EXTRA_ASCII_BSD 0x00000100u /* C */
#define PCRE2_EXTRA_ASCII_BSS 0x00000200u /* C */
#define PCRE2_EXTRA_ASCII_BSW 0x00000400u /* C */
#define PCRE2_EXTRA_ASCII_POSIX 0x00000800u /* C */
#define PCRE2_EXTRA_ASCII_DIGIT 0x00001000u /* C */

/* These are for pcre2_jit_compile(). */

Expand Down Expand Up @@ -180,11 +186,12 @@ pcre2_jit_match() ignores the latter since it bypasses all sanity checks). */
#define PCRE2_SUBSTITUTE_UNSET_EMPTY 0x00000400u /* pcre2_substitute() only */
#define PCRE2_SUBSTITUTE_UNKNOWN_UNSET 0x00000800u /* pcre2_substitute() only */
#define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH 0x00001000u /* pcre2_substitute() only */
#define PCRE2_NO_JIT 0x00002000u /* Not for pcre2_dfa_match() */
#define PCRE2_NO_JIT 0x00002000u /* not for pcre2_dfa_match() */
#define PCRE2_COPY_MATCHED_SUBJECT 0x00004000u
#define PCRE2_SUBSTITUTE_LITERAL 0x00008000u /* pcre2_substitute() only */
#define PCRE2_SUBSTITUTE_MATCHED 0x00010000u /* pcre2_substitute() only */
#define PCRE2_SUBSTITUTE_REPLACEMENT_ONLY 0x00020000u /* pcre2_substitute() only */
#define PCRE2_DISABLE_RECURSELOOP_CHECK 0x00040000u /* not for pcre2_dfa_match() or pcre2_jit_match() */

/* Options for pcre2_pattern_convert(). */

Expand Down Expand Up @@ -399,6 +406,7 @@ released, the numbers must not be changed. */
#define PCRE2_ERROR_CONVERT_SYNTAX (-64)
#define PCRE2_ERROR_INTERNAL_DUPMATCH (-65)
#define PCRE2_ERROR_DFA_UINVALID_UTF (-66)
#define PCRE2_ERROR_INVALIDOFFSET (-67)


/* Request types for pcre2_pattern_info() */
Expand Down Expand Up @@ -575,7 +583,7 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION pcre2_config(uint32_t, void *);
PCRE2_EXP_DECL pcre2_general_context *PCRE2_CALL_CONVENTION \
pcre2_general_context_copy(pcre2_general_context *); \
PCRE2_EXP_DECL pcre2_general_context *PCRE2_CALL_CONVENTION \
pcre2_general_context_create(void *(*)(PCRE2_SIZE, void *), \
pcre2_general_context_create(void *(*)(size_t, void *), \
void (*)(void *, void *), void *); \
PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
pcre2_general_context_free(pcre2_general_context *);
Expand All @@ -595,6 +603,8 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
pcre2_set_compile_extra_options(pcre2_compile_context *, uint32_t); \
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
pcre2_set_max_pattern_length(pcre2_compile_context *, PCRE2_SIZE); \
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
pcre2_set_max_varlookbehind(pcre2_compile_context *, uint32_t); \
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
pcre2_set_newline(pcre2_compile_context *, uint32_t); \
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
Expand Down Expand Up @@ -628,7 +638,7 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
pcre2_set_recursion_limit(pcre2_match_context *, uint32_t); \
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
pcre2_set_recursion_memory_management(pcre2_match_context *, \
void *(*)(PCRE2_SIZE, void *), void (*)(void *, void *), void *);
void *(*)(size_t, void *), void (*)(void *, void *), void *);

#define PCRE2_CONVERT_CONTEXT_FUNCTIONS \
PCRE2_EXP_DECL pcre2_convert_context *PCRE2_CALL_CONVENTION \
Expand Down Expand Up @@ -687,6 +697,8 @@ PCRE2_EXP_DECL PCRE2_SPTR PCRE2_CALL_CONVENTION \
pcre2_get_mark(pcre2_match_data *); \
PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \
pcre2_get_match_data_size(pcre2_match_data *); \
PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \
pcre2_get_match_data_heapframes_size(pcre2_match_data *); \
PCRE2_EXP_DECL uint32_t PCRE2_CALL_CONVENTION \
pcre2_get_ovector_count(pcre2_match_data *); \
PCRE2_EXP_DECL PCRE2_SIZE *PCRE2_CALL_CONVENTION \
Expand Down Expand Up @@ -722,7 +734,7 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
pcre2_substring_number_from_name(const pcre2_code *, PCRE2_SPTR); \
PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
pcre2_substring_list_free(PCRE2_SPTR *); \
pcre2_substring_list_free(PCRE2_UCHAR **); \
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
pcre2_substring_list_get(pcre2_match_data *, PCRE2_UCHAR ***, PCRE2_SIZE **);

Expand Down Expand Up @@ -771,7 +783,7 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
pcre2_jit_free_unused_memory(pcre2_general_context *); \
PCRE2_EXP_DECL pcre2_jit_stack *PCRE2_CALL_CONVENTION \
pcre2_jit_stack_create(PCRE2_SIZE, PCRE2_SIZE, pcre2_general_context *); \
pcre2_jit_stack_create(size_t, size_t, pcre2_general_context *); \
PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
pcre2_jit_stack_assign(pcre2_match_context *, pcre2_jit_callback, void *); \
PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
Expand Down Expand Up @@ -851,6 +863,7 @@ pcre2_compile are called by application code. */
#define pcre2_general_context_free PCRE2_SUFFIX(pcre2_general_context_free_)
#define pcre2_get_error_message PCRE2_SUFFIX(pcre2_get_error_message_)
#define pcre2_get_mark PCRE2_SUFFIX(pcre2_get_mark_)
#define pcre2_get_match_data_heapframes_size PCRE2_SUFFIX(pcre2_get_match_data_heapframes_size_)
#define pcre2_get_match_data_size PCRE2_SUFFIX(pcre2_get_match_data_size_)
#define pcre2_get_ovector_pointer PCRE2_SUFFIX(pcre2_get_ovector_pointer_)
#define pcre2_get_ovector_count PCRE2_SUFFIX(pcre2_get_ovector_count_)
Expand Down Expand Up @@ -886,6 +899,7 @@ pcre2_compile are called by application code. */
#define pcre2_set_glob_separator PCRE2_SUFFIX(pcre2_set_glob_separator_)
#define pcre2_set_heap_limit PCRE2_SUFFIX(pcre2_set_heap_limit_)
#define pcre2_set_match_limit PCRE2_SUFFIX(pcre2_set_match_limit_)
#define pcre2_set_max_varlookbehind PCRE2_SUFFIX(pcre2_set_max_varlookbehind_)
#define pcre2_set_max_pattern_length PCRE2_SUFFIX(pcre2_set_max_pattern_length_)
#define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_)
#define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_)
Expand Down
12 changes: 3 additions & 9 deletions ext/build/pcre2/pcre2_chartables.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/* This file was automatically written by the pcre2_dftables auxiliary
program. It contains character tables that are used when no external
tables are passed to PCRE2 by the application that calls it. The tables
are used only for characters whose code values are less than 256. */
are used only for characters whose code values are less than 256, and
only relevant if not in UCP mode. */

/* This set of tables was written in the C locale. */

Expand All @@ -18,13 +19,6 @@ PCRE2 is configured with --enable-rebuild-chartables. However, you can run
pcre2_dftables manually with the -L option to build tables using the LC_ALL
locale. */

/* The following #include is present because without it gcc 4.x may remove
the array definition from the final binary if PCRE2 is built into a static
library and dead code stripping is activated. This leads to link errors.
Pulling in the header ensures that the array gets flagged as "someone
outside this compilation unit might reference this" and so it will always
be supplied to the linker. */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
Expand Down Expand Up @@ -163,7 +157,7 @@ graph, print, punct, and cntrl. Other classes are built from combinations. */
0x02 letter
0x04 lower case letter
0x08 decimal digit
0x10 alphanumeric or '_'
0x10 word (alphanumeric or '_')
*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */
Expand Down
2 changes: 1 addition & 1 deletion ext/pcre2
Submodule pcre2 updated from 52c088 to 3864ab
1 change: 1 addition & 0 deletions src/Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Released: unreleased
* Add support for GIT_TEMPLATE_DIR environment variable
* Updated libgit to 2.43 based on Git for Windows sources
* Updated libgit2 to 1.7.2
* Updated pcre2 to 10.43
* Update json library to 3.11.3
* Update TortoiseGitPlink to PuTTY Plink 0.80
* Update shipped PuTTY binaries to 0.80
Expand Down

0 comments on commit 34e56cc

Please sign in to comment.