summaryrefslogtreecommitdiff
path: root/pp_sort.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-06-12 13:26:24 -0600
committerKarl Williamson <khw@cpan.org>2014-06-12 13:32:55 -0600
commit130c5df3625bd130cd1e2771308fcd4eb66cebb2 (patch)
treeb392e738e720e177e0baaab4b1b45240bde7fd2b /pp_sort.c
parentea2b4f53c45208ee2de6be74295a6a50e35d4929 (diff)
downloadperl-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 'pp_sort.c')
-rw-r--r--pp_sort.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pp_sort.c b/pp_sort.c
index 391480be7d..86a5e36708 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1727,11 +1727,15 @@ PP(pp_sort)
? ( ( ( priv & OPpSORT_INTEGER) || all_SIVs)
? ( overloading ? S_amagic_i_ncmp : S_sv_i_ncmp)
: ( overloading ? S_amagic_ncmp : S_sv_ncmp ) )
- : ( IN_LC_RUNTIME(LC_COLLATE)
+ : (
+#ifdef USE_LOCALE_COLLATE
+ IN_LC_RUNTIME(LC_COLLATE)
? ( overloading
? (SVCOMPARE_t)S_amagic_cmp_locale
: (SVCOMPARE_t)sv_cmp_locale_static)
- : ( overloading ? (SVCOMPARE_t)S_amagic_cmp : (SVCOMPARE_t)sv_cmp_static)),
+ :
+#endif
+ ( overloading ? (SVCOMPARE_t)S_amagic_cmp : (SVCOMPARE_t)sv_cmp_static)),
sort_flags);
}
if ((priv & OPpSORT_REVERSE) != 0) {