Use duplocale() if available

This commit is contained in:
Petr Písař 2021-02-09 18:18:33 +01:00
parent c38e1c6cd8
commit 27a18537fa
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,32 @@
From 9289d4dc7a3d24b20c6e25045e687321ee3e8faf Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@cpan.org>
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ř <ppisar@redhat.com>
---
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

View File

@ -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 <ppisar@redhat.com> - 4:5.32.1-471
- Make accessing environment by DynaLoader thread-safe
- Use duplocale() if available
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4:5.32.1-470
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild