diff --git a/embed.fnc b/embed.fnc index 363fad81f09d..1195103e376d 100644 --- a/embed.fnc +++ b/embed.fnc @@ -4429,10 +4429,6 @@ S |void |populate_hash_from_C_localeconv \ |const U32 which_mask \ |NN const lconv_offset_t *strings[2] \ |NN const lconv_offset_t *integers[2] -S |const char *|save_to_buffer \ - |NULLOK const char *string \ - |NULLOK char **buf \ - |NULLOK Size_t *buf_size S |void |set_save_buffer_min_size \ |const Size_t min_len \ |NULLOK char **buf \ @@ -4486,6 +4482,10 @@ So |void |restore_toggled_locale_i \ |const locale_category_index cat_index \ |NULLOK const char *original_locale \ |const line_t caller_line +S |const char *|save_to_buffer \ + |NULLOK const char *string \ + |NULLOK char **buf \ + |NULLOK Size_t *buf_size Sr |void |setlocale_failure_panic_via_i \ |const locale_category_index cat_index \ |NULLOK const char *current \ diff --git a/embed.h b/embed.h index a6c7e19f2bfc..c00388ea3691 100644 --- a/embed.h +++ b/embed.h @@ -1317,7 +1317,6 @@ # define is_locale_utf8(a) S_is_locale_utf8(aTHX_ a) # define my_localeconv(a) S_my_localeconv(aTHX_ a) # define populate_hash_from_C_localeconv(a,b,c,d,e) S_populate_hash_from_C_localeconv(aTHX_ a,b,c,d,e) -# define save_to_buffer(a,b,c) S_save_to_buffer(aTHX_ a,b,c) # define set_save_buffer_min_size(a,b,c) S_set_save_buffer_min_size(aTHX_ a,b,c) # define strftime8(a,b,c,d,e) S_strftime8(aTHX_ a,b,c,d,e) # define strftime_tm(a,b) S_strftime_tm(aTHX_ a,b) @@ -1333,6 +1332,7 @@ # define new_LC_ALL(a,b) S_new_LC_ALL(aTHX_ a,b) # define output_check_environment_warning(a,b,c) S_output_check_environment_warning(aTHX_ a,b,c) # define parse_LC_ALL_string(a,b,c,d,e,f) S_parse_LC_ALL_string(aTHX_ a,b,c,d,e,f) +# define save_to_buffer(a,b,c) S_save_to_buffer(aTHX_ a,b,c) # define setlocale_failure_panic_via_i(a,b,c,d,e,f,g) S_setlocale_failure_panic_via_i(aTHX_ a,b,c,d,e,f,g) # if defined(DEBUGGING) # define my_setlocale_debug_string_i(a,b,c,d) S_my_setlocale_debug_string_i(aTHX_ a,b,c,d) diff --git a/locale.c b/locale.c index 588756cda87b..2686b5d28b13 100644 --- a/locale.c +++ b/locale.c @@ -4801,6 +4801,8 @@ S_is_locale_utf8(pTHX_ const char * locale) #endif +#ifdef USE_LOCALE + STATIC void S_set_save_buffer_min_size(pTHX_ Size_t min_len, char **buf, @@ -4888,6 +4890,7 @@ S_save_to_buffer(pTHX_ const char * string, char **buf, Size_t *buf_size) return *buf; } +#endif #ifdef USE_LOCALE # ifdef WIN32 diff --git a/proto.h b/proto.h index 87918bcbc471..7e699e47337a 100644 --- a/proto.h +++ b/proto.h @@ -7027,10 +7027,6 @@ S_populate_hash_from_C_localeconv(pTHX_ HV *hv, const char *locale, const U32 wh # define PERL_ARGS_ASSERT_POPULATE_HASH_FROM_C_LOCALECONV \ assert(hv); assert(locale); assert(strings); assert(integers) -STATIC const char * -S_save_to_buffer(pTHX_ const char *string, char **buf, Size_t *buf_size); -# define PERL_ARGS_ASSERT_SAVE_TO_BUFFER - STATIC void S_set_save_buffer_min_size(pTHX_ const Size_t min_len, char **buf, Size_t *buf_size); # define PERL_ARGS_ASSERT_SET_SAVE_BUFFER_MIN_SIZE @@ -7090,6 +7086,10 @@ STATIC void S_restore_toggled_locale_i(pTHX_ const locale_category_index 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(pTHX_ const char *string, char **buf, Size_t *buf_size); +# define PERL_ARGS_ASSERT_SAVE_TO_BUFFER + PERL_STATIC_NO_RET void S_setlocale_failure_panic_via_i(pTHX_ const locale_category_index cat_index, const char *current, const char *failed, const line_t proxy_caller_line, const line_t immediate_caller_line, const char *higher_caller_file, const line_t higher_caller_line) __attribute__noreturn__;