diff options
author | Sam James <sam@gentoo.org> | 2022-12-09 15:00:14 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-12-09 15:04:28 +0000 |
commit | d62e8e07a67cb63325f397de8b175be12c4857a6 (patch) | |
tree | 326729bcbbbeef8271a8a576c43a2fcc3cae6a78 /dev-libs/libpcre2 | |
parent | sci-libs/gdal: Stabilize 3.5.3 x86, #882903 (diff) | |
download | gentoo-d62e8e07a67cb63325f397de8b175be12c4857a6.tar.gz gentoo-d62e8e07a67cb63325f397de8b175be12c4857a6.tar.bz2 gentoo-d62e8e07a67cb63325f397de8b175be12c4857a6.zip |
dev-libs/libpcre2: backport pcreposix header fix
Closes: https://bugs.gentoo.org/884705
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/libpcre2')
-rw-r--r-- | dev-libs/libpcre2/files/libpcre2-10.41-pcre2posix-header.patch | 66 | ||||
-rw-r--r-- | dev-libs/libpcre2/libpcre2-10.41-r1.ebuild (renamed from dev-libs/libpcre2/libpcre2-10.41.ebuild) | 1 |
2 files changed, 67 insertions, 0 deletions
diff --git a/dev-libs/libpcre2/files/libpcre2-10.41-pcre2posix-header.patch b/dev-libs/libpcre2/files/libpcre2-10.41-pcre2posix-header.patch new file mode 100644 index 000000000000..12d8bb609329 --- /dev/null +++ b/dev-libs/libpcre2/files/libpcre2-10.41-pcre2posix-header.patch @@ -0,0 +1,66 @@ +https://github.com/PCRE2Project/pcre2/commit/cd8dc40b901bdedf5bcc0b3acdd9eede16802f39 +https://github.com/PCRE2Project/pcre2/issues/173 +https://bugs.gentoo.org/884705 + +From cd8dc40b901bdedf5bcc0b3acdd9eede16802f39 Mon Sep 17 00:00:00 2001 +From: Philip Hazel <Philip.Hazel@gmail.com> +Date: Fri, 9 Dec 2022 09:40:52 +0000 +Subject: [PATCH] Move default of PCRE2_CALL_CONVENTION from pcre2posix.c to + pcre2posix.h + +--- a/src/pcre2posix.c ++++ b/src/pcre2posix.c +@@ -92,20 +92,6 @@ changed. This #define is a copy of the one in pcre2_internal.h. */ + #include "pcre2.h" + #include "pcre2posix.h" + +-/* When compiling with the MSVC compiler, it is sometimes necessary to include +-a "calling convention" before exported function names. (This is secondhand +-information; I know nothing about MSVC myself). For example, something like +- +- void __cdecl function(....) +- +-might be needed. In order to make this easy, all the exported functions have +-PCRE2_CALL_CONVENTION just before their names. It is rarely needed; if not +-set, we ensure here that it has no effect. */ +- +-#ifndef PCRE2_CALL_CONVENTION +-#define PCRE2_CALL_CONVENTION +-#endif +- + /* Table to translate PCRE2 compile time error codes into POSIX error codes. + Only a few PCRE2 errors with a value greater than 23 turn into special POSIX + codes: most go to REG_BADPAT. The second table lists, in pairs, those that +--- a/src/pcre2posix.h ++++ b/src/pcre2posix.h +@@ -9,7 +9,7 @@ POSIX wrapper interface. + + Written by Philip Hazel + Original API code Copyright (c) 1997-2012 University of Cambridge +- New API code Copyright (c) 2016-2019 University of Cambridge ++ New API code Copyright (c) 2016-2022 University of Cambridge + + ----------------------------------------------------------------------------- + Redistribution and use in source and binary forms, with or without +@@ -116,6 +116,20 @@ typedef struct { + regoff_t rm_eo; + } regmatch_t; + ++/* When compiling with the MSVC compiler, it is sometimes necessary to include ++a "calling convention" before exported function names. (This is secondhand ++information; I know nothing about MSVC myself). For example, something like ++ ++ void __cdecl function(....) ++ ++might be needed. In order to make this easy, all the exported functions have ++PCRE2_CALL_CONVENTION just before their names. It is rarely needed; if not ++set, we ensure here that it has no effect. */ ++ ++#ifndef PCRE2_CALL_CONVENTION ++#define PCRE2_CALL_CONVENTION ++#endif ++ + /* When an application links to a PCRE2 DLL in Windows, the symbols that are + imported have to be identified as such. When building PCRE2, the appropriate + export settings are needed, and are set in pcre2posix.c before including this + diff --git a/dev-libs/libpcre2/libpcre2-10.41.ebuild b/dev-libs/libpcre2/libpcre2-10.41-r1.ebuild index c8948edf597e..e4703e3a15ea 100644 --- a/dev-libs/libpcre2/libpcre2-10.41.ebuild +++ b/dev-libs/libpcre2/libpcre2-10.41-r1.ebuild @@ -45,6 +45,7 @@ MULTILIB_CHOST_TOOLS=( PATCHES=( "${FILESDIR}"/${PN}-10.10-000-Fix-multilib.patch + "${FILESDIR}"/${P}-pcre2posix-header.patch ) src_prepare() { |