|NULLOK const char **buf \
|NULLOK Size_t *buf_size
ST |unsigned int|get_category_index|const int category|NULLOK const char * locale
-ST |bool |is_codeset_name_UTF8|NN const char * name
S |utf8ness_t|get_locale_string_utf8ness_i \
|NULLOK const char * locale \
|const unsigned cat_index \
|NULLOK const char * string \
|const locale_utf8ness_t known_utf8
S |void |new_collate |NN const char* newcoll
+# ifdef USE_LOCALE_CTYPE
S |void |new_ctype |NN const char* newctype
+ST |bool |is_codeset_name_UTF8|NN const char * name
+# endif
# ifdef USE_LOCALE_NUMERIC
S |void |new_numeric |NN const char* newnum
# endif
# if defined(USE_LOCALE)
#define get_category_index S_get_category_index
#define get_locale_string_utf8ness_i(a,b,c,d) S_get_locale_string_utf8ness_i(aTHX_ a,b,c,d)
-#define is_codeset_name_UTF8 S_is_codeset_name_UTF8
#define is_locale_utf8(a) S_is_locale_utf8(aTHX_ a)
#define mortalized_pv_copy(a) S_mortalized_pv_copy(aTHX_ a)
#define new_LC_ALL(a) S_new_LC_ALL(aTHX_ a)
#define new_collate(a) S_new_collate(aTHX_ a)
-#define new_ctype(a) S_new_ctype(aTHX_ a)
#define save_to_buffer S_save_to_buffer
#define setlocale_failure_panic_i(a,b,c,d,e) S_setlocale_failure_panic_i(aTHX_ a,b,c,d,e)
#define stdize_locale(a,b,c,d,e) S_stdize_locale(aTHX_ a,b,c,d,e)
+# if defined(USE_LOCALE_CTYPE)
+#define is_codeset_name_UTF8 S_is_codeset_name_UTF8
+#define new_ctype(a) S_new_ctype(aTHX_ a)
+# endif
# if defined(USE_LOCALE_NUMERIC)
#define new_numeric(a) S_new_numeric(aTHX_ a)
# endif
}
-/*
- * Set up for a new ctype locale.
- */
+# ifdef USE_LOCALE_CTYPE
+
STATIC void
S_new_ctype(pTHX_ const char *newctype)
{
-# ifndef USE_LOCALE_CTYPE
-
- PERL_UNUSED_ARG(newctype);
- PERL_UNUSED_CONTEXT;
-
-# else
-
/* Called after each libc setlocale() call affecting LC_CTYPE, to tell
* core Perl this and that 'newctype' is the name of the new locale.
*
}
}
}
+}
# endif /* USE_LOCALE_CTYPE */
-}
-
void
Perl__warn_problematic_locale()
{
STRLEN xAlloc; /* xalloc is a reserved word in VC */
STRLEN length_in_chars;
bool first_time = TRUE; /* Cleared after first loop iteration */
- const char * orig_CTYPE_locale = NULL;
+
+# ifdef USE_LOCALE_CTYPE
+ const char * orig_CTYPE_locale = NULL;
+# endif
# if defined(USE_POSIX_2008_LOCALE) && defined HAS_STRXFRM_L
locale_t constructed_locale = (locale_t) 0;
}
+#ifdef USE_LOCALE_CTYPE
+
STATIC bool
S_is_codeset_name_UTF8(const char * name)
{
&& (len == 4 || name[3] == '-'));
}
+#endif
+
STATIC bool
S_is_locale_utf8(pTHX_ const char * locale)
{
#define PERL_ARGS_ASSERT_GET_CATEGORY_INDEX
STATIC utf8ness_t S_get_locale_string_utf8ness_i(pTHX_ const char * locale, const unsigned cat_index, const char * string, const locale_utf8ness_t known_utf8);
#define PERL_ARGS_ASSERT_GET_LOCALE_STRING_UTF8NESS_I
-STATIC bool S_is_codeset_name_UTF8(const char * name);
-#define PERL_ARGS_ASSERT_IS_CODESET_NAME_UTF8 \
- assert(name)
STATIC bool S_is_locale_utf8(pTHX_ const char * locale);
#define PERL_ARGS_ASSERT_IS_LOCALE_UTF8 \
assert(locale)
STATIC void S_new_collate(pTHX_ const char* newcoll);
#define PERL_ARGS_ASSERT_NEW_COLLATE \
assert(newcoll)
-STATIC void S_new_ctype(pTHX_ const char* newctype);
-#define PERL_ARGS_ASSERT_NEW_CTYPE \
- assert(newctype)
STATIC void S_restore_toggled_locale_i(pTHX_ const unsigned cat_index, const char * original_locale, const line_t caller_line);
#define PERL_ARGS_ASSERT_RESTORE_TOGGLED_LOCALE_I
STATIC const char * S_save_to_buffer(const char * string, const char **buf, Size_t *buf_size);
STATIC const char * S_toggle_locale_i(pTHX_ const unsigned switch_cat_index, const char * new_locale, const line_t caller_line);
#define PERL_ARGS_ASSERT_TOGGLE_LOCALE_I \
assert(new_locale)
+# if defined(USE_LOCALE_CTYPE)
+STATIC bool S_is_codeset_name_UTF8(const char * name);
+#define PERL_ARGS_ASSERT_IS_CODESET_NAME_UTF8 \
+ assert(name)
+STATIC void S_new_ctype(pTHX_ const char* newctype);
+#define PERL_ARGS_ASSERT_NEW_CTYPE \
+ assert(newctype)
+# endif
# if defined(USE_LOCALE_NUMERIC)
STATIC void S_new_numeric(pTHX_ const char* newnum);
#define PERL_ARGS_ASSERT_NEW_NUMERIC \