summaryrefslogtreecommitdiff
path: root/ext/POSIX
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-03-07 10:20:53 -0700
committerKarl Williamson <khw@cpan.org>2018-03-12 11:10:02 -0600
commit80306bb6fd3a203fe3583693a061e7cf3bdce42a (patch)
tree3f627252246df4dd3d7566c1173a52f9fd198eb6 /ext/POSIX
parent929a7f8c537d1238e2a62caff6f9c494010473c7 (diff)
downloadperl-80306bb6fd3a203fe3583693a061e7cf3bdce42a.tar.gz
Don't use duplocale() unless is present
Prior to this patch, the code assumed that if you have the other, more significant, POSIX 2008 functions available, that duplocale was present and correctly functioning too. However, we found that there have been bugs in it, so that a hints file or Configure probe might want to exclude just it.
Diffstat (limited to 'ext/POSIX')
-rw-r--r--ext/POSIX/POSIX.xs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index cf744c7ecf..bde6234956 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -2154,7 +2154,8 @@ localeconv()
sv_2mortal((SV*)RETVAL);
# if defined(USE_ITHREADS) \
&& defined(HAS_POSIX_2008_LOCALE) \
- && defined(HAS_LOCALECONV_L)
+ && defined(HAS_LOCALECONV_L) \
+ && defined(HAS_DUPLOCALE)
cur = uselocale((locale_t) 0);
if (cur == LC_GLOBAL_LOCALE) {