From da54665f4383cb0594ea9eaefe560de30ca59947 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 13 Nov 2019 09:15:17 -0700 Subject: 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. --- dist/Devel-PPPort/parts/inc/locale | 9 +++++++-- 1 file 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 -- cgit v1.2.1