Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 562376 Details for
Bug 662368
<sys-apps/texinfo-6.5-r1 makeinfo runs indefinitely when LC_CTYPE=C with dev-lang/perl-5.28.* for app-emulation/qemu media-sound/lilypond sys-libs/glibc
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Update locale handling for Perl 5.28
0001-Update-locale-handling-for-Perl-5.28.patch (text/plain), 1.57 KB, created by
Brad Laue
on 2019-01-21 15:13:17 UTC
(
hide
)
Description:
[PATCH] Update locale handling for Perl 5.28
Filename:
MIME Type:
Creator:
Brad Laue
Created:
2019-01-21 15:13:17 UTC
Size:
1.57 KB
patch
obsolete
>>From 9031aefb7f180f718db83aec5e2782079455a32f Mon Sep 17 00:00:00 2001 >From: Niko Tyni <address@hidden> >Date: Sat, 30 Jun 2018 16:51:13 +0100 >Subject: [PATCH] Update locale handling for Perl 5.28 > >Perl 5.28 introduced thread-safe locales, where setlocale() >only affects the locale of the current thread. External code >like mbrtowc(3) isn't aware of this thread specific locale, >so we need to explicitly modify the global one instead. > >Without this we could enter a busy loop in xspara__add_next() >(Texinfo::Convert::XSParagraph) for UTF-8 documents when mbrtowc(3) >returned -1. >--- > tp/Texinfo/Convert/XSParagraph/xspara.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/tp/Texinfo/Convert/XSParagraph/xspara.c b/tp/Texinfo/Convert/XSParagraph/xspara.c >index 51eea4a..f2d6d1c 100644 >--- a/tp/Texinfo/Convert/XSParagraph/xspara.c >+++ b/tp/Texinfo/Convert/XSParagraph/xspara.c >@@ -248,6 +248,11 @@ xspara_init (void) > > dTHX; > >+#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8) >+ /* needed due to thread-safe locale handling in newer perls */ >+ switch_to_global_locale(); >+#endif >+ > if (setlocale (LC_CTYPE, "en_US.UTF-8") > || setlocale (LC_CTYPE, "en_US.utf8")) > goto success; >@@ -320,6 +325,10 @@ failure: > { > success: ; > free (utf8_locale); >+#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8) >+ /* needed due to thread-safe locale handling in newer perls */ >+ sync_locale(); >+#endif > /* > fprintf (stderr, "tried to set LC_CTYPE to UTF-8.\n"); > fprintf (stderr, "character encoding is: %s\n", >-- >2.17.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 662368
:
541564
| 562376 |
562378