From b74761c2fe97fbd26f9867d8681c43802e3b288e Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 20 Dec 2022 13:53:16 -0700 Subject: [PATCH] XXX: UCRT mingw is not likely locale-thread safe In order for mingw to be locale-thread safe, it needs UCRT which current packages don't tend to have. But this commit adds a XXX -DUCRT --- makedef.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/makedef.pl b/makedef.pl index cf4a57a96431..cff4b81ee880 100644 --- a/makedef.pl +++ b/makedef.pl @@ -170,8 +170,8 @@ BEGIN if ($define{USE_LOCALE_THREADS} && ! $define{NO_THREAD_SAFE_LOCALE}) { if ( $define{USE_POSIX_2008_LOCALE} - || ($define{WIN32} && ( $cctype !~ /\D/ - && $cctype >= 80))) + || ($define{WIN32} && ( ($cctype !~ /\D/ && $cctype >= 80)) + || $define{UCRT_USED})) { $define{USE_THREAD_SAFE_LOCALE} = 1; } @@ -194,7 +194,9 @@ BEGIN { $define{USE_PL_CUR_LC_ALL} = 1; - if ($cctype < 140) { + if ( ($cctype =~ /\D/ && ! $define{UCRT_USED}) + || $cctype < 140) + { $define{TS_W32_BROKEN_LOCALECONV} = 1; } }