summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-11-13 09:15:17 -0700
committerKarl Williamson <khw@cpan.org>2019-11-22 06:49:04 -0700
commitda54665f4383cb0594ea9eaefe560de30ca59947 (patch)
treeb87ee0f3e91d39a7f069d48246746a5dfd4399b9
parent68678ef8cefed0b23914458ad222d00aa288b504 (diff)
downloadperl-da54665f4383cb0594ea9eaefe560de30ca59947.tar.gz
D:P: PATCH: gh #156 sync_locale doesn't work in 5.20 maint
It turns out that there was special code added in the 5.20 maint series that needed to be accounted for.
-rw-r--r--dist/Devel-PPPort/parts/inc/locale9
1 files changed, 7 insertions, 2 deletions
diff --git a/dist/Devel-PPPort/parts/inc/locale b/dist/Devel-PPPort/parts/inc/locale
index f8ad196da2..699adfdc39 100644
--- a/dist/Devel-PPPort/parts/inc/locale
+++ b/dist/Devel-PPPort/parts/inc/locale
@@ -17,10 +17,15 @@ __UNDEFINED__ switch_to_global_locale()
# if { VERSION >= 5.21.3 }
# undef sync_locale
# define sync_locale() (Perl_sync_locale(aTHX), 1)
+# elif defined(sync_locale) /* These should be the 5.20 maints*/
+# undef sync_locale /* Just copy their defn and return 1 */
+# define sync_locale() (new_ctype(setlocale(LC_CTYPE, NULL)), \
+ new_collate(setlocale(LC_COLLATE, NULL)), \
+ set_numeric_local(), \
+ new_numeric(setlocale(LC_NUMERIC, NULL)), \
+ 1)
# elif defined(new_ctype) && defined(LC_CTYPE)
# define sync_locale() (new_ctype(setlocale(LC_CTYPE, NULL)), 1)
-# else
-# undef sync_locale
# endif
# endif
#endif