summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-08-23 13:38:03 -0600
committerKarl Williamson <public@khwilliamson.com>2013-08-23 15:50:49 -0600
commit8ef6e574dc20ae6630168de22486c9083ad307af (patch)
tree0c6b5f107e516ed0bb08964d7b0bbc26b6b8e728 /locale.c
parent4f219c4e77d1ed928277cc810b79d80d32968e48 (diff)
downloadperl-8ef6e574dc20ae6630168de22486c9083ad307af.tar.gz
PATCH: [perl #119443] Blead won't compile on wince
This commit adds #if's to cause locale handling code to compile on platforms that don't have full-featured locale handling. The commits mentioned in the ticket did not adequately cover these situations.
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/locale.c b/locale.c
index c16b36317b..7ec3463e84 100644
--- a/locale.c
+++ b/locale.c
@@ -34,6 +34,8 @@
#include "reentr.h"
+#ifdef USE_LOCALE
+
/*
* Standardize the locale name from a string returned by 'setlocale'.
*
@@ -76,6 +78,8 @@ S_stdize_locale(pTHX_ char *locs)
return locs;
}
+#endif
+
void
Perl_set_numeric_radix(pTHX)
{
@@ -507,9 +511,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
}
-#endif /* USE_LOCALE */
-
-#ifdef USE_PERLIO
+#if defined(USE_PERLIO) && defined(USE_LOCALE_CTYPE)
{
/* Set PL_utf8locale to TRUE if using PerlIO _and_
the current LC_CTYPE locale is UTF-8.
@@ -539,6 +541,9 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
#ifdef USE_LOCALE_NUMERIC
Safefree(curnum);
#endif /* USE_LOCALE_NUMERIC */
+
+#endif /* USE_LOCALE */
+
return ok;
}
@@ -605,6 +610,8 @@ Perl_mem_collxfrm(pTHX_ const char *s, STRLEN len, STRLEN *xlen)
#endif /* USE_LOCALE_COLLATE */
+#ifdef USE_LOCALE
+
STATIC bool
S_is_cur_LC_category_utf8(pTHX_ int category)
{
@@ -616,7 +623,9 @@ S_is_cur_LC_category_utf8(pTHX_ int category)
char *save_input_locale = NULL;
STRLEN final_pos;
+#ifdef LC_ALL
assert(category != LC_ALL);
+#endif
/* First dispose of the trivial cases */
save_input_locale = stdize_locale(setlocale(category, NULL));
@@ -887,7 +896,7 @@ S_is_cur_LC_category_utf8(pTHX_ int category)
return FALSE;
}
-
+#endif
/*
* Local variables: