blob: 12c2024adab7fcd1c8d30996bcd5a8134b15bc37 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--- spack-src/tp/Texinfo/Convert/XSParagraph/xspara.c.org 2019-11-18 17:33:07.717005871 +0900
+++ spack-src/tp/Texinfo/Convert/XSParagraph/xspara.c 2019-11-18 17:34:56.318436594 +0900
@@ -248,6 +248,11 @@
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;
@@ -319,6 +324,10 @@
else
{
success: ;
+#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8)
+ /* needed due to thread-safe locale handling in newer perls */
+ sync_locale();
+#endif
free (utf8_locale);
/*
fprintf (stderr, "tried to set LC_CTYPE to UTF-8.\n");
|