In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/36a5d907e8a51ac5d2c36bc610c3f0b71ebe199d?hp=4a1f176ee101e438f104b28407c0e664595821e3>
- Log ----------------------------------------------------------------- commit 36a5d907e8a51ac5d2c36bc610c3f0b71ebe199d Author: Karl Williamson <[email protected]> Date: Wed Feb 6 11:54:14 2019 -0700 makedef.pl: Fix to work with -DNO_LOCALE config opt We shouldn't export non-existent variables commit 1c0e67b56793725082a7f82517b70b287254a52c Author: Karl Williamson <[email protected]> Date: Wed Feb 6 11:53:10 2019 -0700 locale.c: Fix compilation error This code would fail to require if Configure had ccflags=-DNO_LOCALE commit 0c0c3518376d64d0be0faeacd283971b391b560a Author: Karl Williamson <[email protected]> Date: Wed Feb 6 11:51:05 2019 -0700 t/loc_tools.pl: C.UTF-8 is a likely locale When looking for locales on a system, try this one which seems to be getting to be available widely. commit ab99d55b39bf5eb4c6782c9a897496188b987e3d Author: Karl Williamson <[email protected]> Date: Wed Feb 6 11:49:25 2019 -0700 ext/POSIX: Fix compilation error This code is not usually compiled, but if tried, it would fail. It needed a cast. ----------------------------------------------------------------------- Summary of changes: ext/POSIX/POSIX.xs | 3 ++- ext/POSIX/lib/POSIX.pm | 2 +- locale.c | 7 +++---- makedef.pl | 3 ++- t/loc_tools.pl | 1 + 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index fb289d2fd6..1ebc358af4 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -3669,7 +3669,8 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) #else /* If can't check directly, at least can see if script is consistent, under UTF-8, which gives us an extra measure of confidence. */ - && isSCRIPT_RUN((const U8 *) buf, buf + len, + && isSCRIPT_RUN((const U8 *) buf, + (const U8 *) buf + len, TRUE) /* Means assume UTF-8 */ #endif )) { diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm index e02c25c3c8..25392be4b1 100644 --- a/ext/POSIX/lib/POSIX.pm +++ b/ext/POSIX/lib/POSIX.pm @@ -4,7 +4,7 @@ use warnings; our ($AUTOLOAD, %SIGRT); -our $VERSION = '1.86'; +our $VERSION = '1.87'; require XSLoader; diff --git a/locale.c b/locale.c index 07e5525c10..e7348e1c78 100644 --- a/locale.c +++ b/locale.c @@ -4334,7 +4334,8 @@ S_print_collxfrm_input_and_return(pTHX_ # endif /* DEBUGGING */ #endif /* USE_LOCALE_COLLATE */ -#ifdef DEBUGGING +#ifdef USE_LOCALE +# ifdef DEBUGGING STATIC void S_print_bytes_for_locale(pTHX_ @@ -4371,9 +4372,7 @@ S_print_bytes_for_locale(pTHX_ } } -#endif /* #ifdef DEBUGGING */ - -#ifdef USE_LOCALE +# endif /* #ifdef DEBUGGING */ STATIC const char * S_switch_category_locale_to_template(pTHX_ const int switch_category, const int template_category, const char * template_locale) diff --git a/makedef.pl b/makedef.pl index b3fc164acc..e5ee6b9085 100644 --- a/makedef.pl +++ b/makedef.pl @@ -427,7 +427,8 @@ unless ($define{'USE_ITHREADS'}) { ); } -unless ($define{USE_ITHREADS} || $define{USE_THREAD_SAFE_LOCALE}) +if ( $define{NO_LOCALE} + || (! $define{USE_ITHREADS} && ! $define{USE_THREAD_SAFE_LOCALE})) { ++$skip{$_} foreach qw( PL_C_locale_obj diff --git a/t/loc_tools.pl b/t/loc_tools.pl index 85fb099173..4b80ed5360 100644 --- a/t/loc_tools.pl +++ b/t/loc_tools.pl @@ -337,6 +337,7 @@ sub find_locales ($;$) { my @Locale; _trylocale("C", $categories, \@Locale, $allow_incompatible); _trylocale("POSIX", $categories, \@Locale, $allow_incompatible); + _trylocale("C.UTF-8", $categories, \@Locale, $allow_incompatible); foreach (1..16) { _trylocale("ISO8859-$_", $categories, \@Locale, $allow_incompatible); _trylocale("iso8859$_", $categories, \@Locale, $allow_incompatible); -- Perl5 Master Repository
