diff --git a/perl-5.31.7-POSIX.pod-Update-setlocale-docs.patch b/perl-5.31.7-POSIX.pod-Update-setlocale-docs.patch new file mode 100644 index 0000000..903c191 --- /dev/null +++ b/perl-5.31.7-POSIX.pod-Update-setlocale-docs.patch @@ -0,0 +1,60 @@ +From 06283613f8e6e81053444fea0cfc441db9c776a9 Mon Sep 17 00:00:00 2001 +From: Karl Williamson +Date: Fri, 20 Dec 2019 14:40:47 -0700 +Subject: [PATCH] POSIX.pod: Update setlocale() docs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This should have been updated in 5.28, but was overlooked. + +Signed-off-by: Petr Písař +--- + ext/POSIX/lib/POSIX.pod | 24 +++++++++++++++--------- + 1 file changed, 15 insertions(+), 9 deletions(-) + +diff --git a/ext/POSIX/lib/POSIX.pod b/ext/POSIX/lib/POSIX.pod +index cab1501dab..d0b7f5ade2 100644 +--- a/ext/POSIX/lib/POSIX.pod ++++ b/ext/POSIX/lib/POSIX.pod +@@ -1451,14 +1451,18 @@ see L. + + =item C + +-WARNING! Do NOT use this function in a L. The locale +-will change in all other threads at the same time, and should your +-thread get paused by the operating system, and another started, that +-thread will not have the locale it is expecting. On some platforms, +-there can be a race leading to segfaults if two threads call this +-function nearly simultaneously. +- +-Modifies and queries the program's underlying locale. Users of this ++WARNING! Prior to Perl 5.28 or on a system that does not support ++thread-safe locale operations, do NOT use this function in a ++L. The locale will change in all other threads at the ++same time, and should your thread get paused by the operating system, ++and another started, that thread will not have the locale it is ++expecting. On some platforms, there can be a race leading to segfaults ++if two threads call this function nearly simultaneously. On unthreaded ++builds, or on Perl 5.28 and later on thread-safe systems, this warning ++does not apply. ++ ++This function ++modifies and queries the program's underlying locale. Users of this + function should read L, whch provides a comprehensive + discussion of Perl locale handling, knowledge of which is necessary to + properly use this function. It contains +@@ -1466,7 +1470,9 @@ L. + The discussion here is merely a summary reference for C. + Note that Perl itself is almost entirely unaffected by the locale + except within the scope of S>. (Exceptions are listed +-in L.) ++in L, and ++locale-dependent functions within the POSIX module ARE always affected ++by the current locale.) + + The following examples assume + +-- +2.21.1 + diff --git a/perl.spec b/perl.spec index d525e08..7da2701 100644 --- a/perl.spec +++ b/perl.spec @@ -300,6 +300,9 @@ Patch71: perl-5.30.1-handle-s-being-updated-without-len-being-updated.pat # in upstream after 5.31.6 Patch72: perl-5.31.6-PATCH-GH-17081-Workaround-glibc-bug-with-LC_MESSAGES.patch +# Fix POSIX:setlocale() documentation, in upstream after 5.31.7 +Patch73: perl-5.31.7-POSIX.pod-Update-setlocale-docs.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 @@ -4358,6 +4361,7 @@ you're not running VMS, this module does nothing. %patch70 -p1 %patch71 -p1 %patch72 -p1 +%patch73 -p1 %patch200 -p1 %patch201 -p1 @@ -4423,6 +4427,7 @@ perl -x patchlevel.h \ 'Fedora Patch70: Fix a race in File::stat() tests (GH#17234)' \ 'Fedora Patch71: Fix a buffer overread when parsing a number (GH#17279)' \ 'Fedora Patch72: Work around a glibc bug in caching LC_MESSAGES (GH#17081)' \ + 'Fedora Patch73: Fix POSIX:setlocale() documentation' \ '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} @@ -7183,6 +7188,7 @@ popd - Make perl-macros package noarch - Fix a directory ownership in perl-Sys-Hostname - Work around a glibc bug in caching LC_MESSAGES (GH#17081) +- Fix POSIX:setlocale() documentation * Mon Mar 16 2020 Jitka Plesnikova - 4:5.30.2-452 - 5.30.2 bump (see