From 27a18537fa8db994c408ce849e741748e883688c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 9 Feb 2021 18:18:33 +0100 Subject: [PATCH] Use duplocale() if available --- perl-5.33.4-locale.c-Fix-typo-in-ifdef.patch | 32 ++++++++++++++++++++ perl.spec | 6 ++++ 2 files changed, 38 insertions(+) create mode 100644 perl-5.33.4-locale.c-Fix-typo-in-ifdef.patch diff --git a/perl-5.33.4-locale.c-Fix-typo-in-ifdef.patch b/perl-5.33.4-locale.c-Fix-typo-in-ifdef.patch new file mode 100644 index 0000000..dfad1f2 --- /dev/null +++ b/perl-5.33.4-locale.c-Fix-typo-in-ifdef.patch @@ -0,0 +1,32 @@ +From 9289d4dc7a3d24b20c6e25045e687321ee3e8faf Mon Sep 17 00:00:00 2001 +From: Karl Williamson +Date: Mon, 30 Nov 2020 09:25:52 -0700 +Subject: [PATCH] locale.c: Fix typo in #ifdef +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This misspelling led to the code assuming that the platform didn't have +a feature that, if used, would result in faster execution. + +Signed-off-by: Petr Písař +--- + locale.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/locale.c b/locale.c +index 9500ab7960..5970423404 100644 +--- a/locale.c ++++ b/locale.c +@@ -2621,7 +2621,7 @@ S_my_nl_langinfo(const int item, bool toggle) + #if defined(HAS_NL_LANGINFO) /* nl_langinfo() is available. */ + # if ! defined(HAS_THREAD_SAFE_NL_LANGINFO_L) \ + || ! defined(HAS_POSIX_2008_LOCALE) \ +- || ! defined(DUPLOCALE) ++ || ! defined(HAS_DUPLOCALE) + + /* Here, use plain nl_langinfo(), switching to the underlying LC_NUMERIC + * for those items dependent on it. This must be copied to a buffer before +-- +2.26.2 + diff --git a/perl.spec b/perl.spec index 64f703a..2d91552 100644 --- a/perl.spec +++ b/perl.spec @@ -245,6 +245,9 @@ Patch47: perl-5.33.3-pp_split-add-TonyC-s-stack-not-refcounted-suggestion # in upstream after 5.33.4 Patch48: perl-5.32.1-DynaLoader-use-PerlEnv_getenv.patch +# Use duplocale() if available, in upstream after 5.33.4 +Patch49: perl-5.33.4-locale.c-Fix-typo-in-ifdef.patch + # Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048 Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch @@ -4294,6 +4297,7 @@ you're not running VMS, this module does nothing. %patch46 -p1 %patch47 -p1 %patch48 -p1 +%patch49 -p1 %patch200 -p1 %patch201 -p1 @@ -4341,6 +4345,7 @@ perl -x patchlevel.h \ 'Fedora Patch46: Fix a crash in optimizing split() (GH#18232)' \ 'Fedora Patch47: Fix a crash in optimizing split() (GH#18232)' \ 'Fedora Patch48: Make accessing environment by DynaLoader thread-safe' \ + 'Fedora Patch49: Use duplocale() if available' \ 'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \ 'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \ %{nil} @@ -7070,6 +7075,7 @@ popd %changelog * Tue Feb 09 2021 Petr Pisar - 4:5.32.1-471 - Make accessing environment by DynaLoader thread-safe +- Use duplocale() if available * Tue Jan 26 2021 Fedora Release Engineering - 4:5.32.1-470 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild