From fc53809803cd2bc2434e312b19a18fa36776da12 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 05:50:40 +0200 Subject: Adding upstream version 256. Signed-off-by: Daniel Baumann --- src/shared/pcre2-util.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/shared/pcre2-util.c') diff --git a/src/shared/pcre2-util.c b/src/shared/pcre2-util.c index 578b02d..7deb64f 100644 --- a/src/shared/pcre2-util.c +++ b/src/shared/pcre2-util.c @@ -7,13 +7,13 @@ #if HAVE_PCRE2 static void *pcre2_dl = NULL; -pcre2_match_data* (*sym_pcre2_match_data_create)(uint32_t, pcre2_general_context *); -void (*sym_pcre2_match_data_free)(pcre2_match_data *); -void (*sym_pcre2_code_free)(pcre2_code *); -pcre2_code* (*sym_pcre2_compile)(PCRE2_SPTR, PCRE2_SIZE, uint32_t, int *, PCRE2_SIZE *, pcre2_compile_context *); -int (*sym_pcre2_get_error_message)(int, PCRE2_UCHAR *, PCRE2_SIZE); -int (*sym_pcre2_match)(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, uint32_t, pcre2_match_data *, pcre2_match_context *); -PCRE2_SIZE* (*sym_pcre2_get_ovector_pointer)(pcre2_match_data *); +DLSYM_FUNCTION(pcre2_match_data_create); +DLSYM_FUNCTION(pcre2_match_data_free); +DLSYM_FUNCTION(pcre2_code_free); +DLSYM_FUNCTION(pcre2_compile); +DLSYM_FUNCTION(pcre2_get_error_message); +DLSYM_FUNCTION(pcre2_match); +DLSYM_FUNCTION(pcre2_get_ovector_pointer); DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR( pcre2_code_hash_ops_free, @@ -27,6 +27,11 @@ const struct hash_ops pcre2_code_hash_ops_free = {}; int dlopen_pcre2(void) { #if HAVE_PCRE2 + ELF_NOTE_DLOPEN("pcre2", + "Support for regular expressions", + ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED, + "libpcre2-8.so.0"); + /* So here's something weird: PCRE2 actually renames the symbols exported by the library via C * macros, so that the exported symbols carry a suffix "_8" but when used from C the suffix is * gone. In the argument list below we ignore this mangling. Surprisingly (at least to me), we -- cgit v1.2.3