From 0a0aa7db7c26b5c25d26fe5ea3411035eb2bc881 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 3 Mar 2023 10:33:22 -0700 Subject: [PATCH] locale.c: Use proper macro querylocale_c() likely will expand to the correct thing, but it isn't defined until higher in the stack of locale handling layers. Instead use the construct that is lower in the stack. --- locale.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/locale.c b/locale.c index d08c0ac0bc71..62547ae3d93e 100644 --- a/locale.c +++ b/locale.c @@ -1483,7 +1483,8 @@ S_stdize_locale(pTHX_ const int category, retval = input_locale; /* The input can be returned unchanged */ } else { - retval = save_to_buffer(querylocale_c(LC_ALL), buf, buf_size); + retval = save_to_buffer(posix_setlocale(LC_ALL, NULL), + buf, buf_size); } for (i = 0; i < LC_ALL_INDEX_; i++) {