diff options
author | Karl Williamson <khw@cpan.org> | 2014-06-12 13:26:24 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-06-12 13:32:55 -0600 |
commit | 130c5df3625bd130cd1e2771308fcd4eb66cebb2 (patch) | |
tree | b392e738e720e177e0baaab4b1b45240bde7fd2b /ext | |
parent | ea2b4f53c45208ee2de6be74295a6a50e35d4929 (diff) | |
download | perl-130c5df3625bd130cd1e2771308fcd4eb66cebb2.tar.gz |
Allow to compile if don't have LC_CTYPE etc defined
Commit d6ded95025185cb1ec8ca3ba5879cab881d8b180 introduced
the ability to specify individual category parameters to 'use locale'.
However in doing so, it causes Perl to not be able to compile on
platforms that don't have some or all of those categories defined, such
as Android. This commit uses #ifdefs to remedy that.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/POSIX/POSIX.xs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 8f2ff10dd2..974a975f4a 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1754,8 +1754,10 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) if (SvUTF8(fmt) || (! is_ascii_string((U8*) buf, len) && is_utf8_string((U8*) buf, len) - && _is_cur_LC_category_utf8(LC_TIME))) - { +#ifdef USE_LOCALE_TiME + && _is_cur_LC_category_utf8(LC_TIME) +#endif + )) { SvUTF8_on(sv); } } |