Since the initial commit of mingw-w64, there's a call (in a constructor in crt/charmax.c, pulled in via the mingw_initcharmax variable) to __lconv_init(), which reconfigures the CRT's lconv info to unsigned char mode - but there's no explanation for why this is the case.
The fact that mingw-w64 initializes lconv info this way breaks a test in llvm's libc++ (where it expects lconv's frac_digits to be intialized to CHAR_MAX, not UCHAR_MAX). This also differs to how MSVC environments behave, where they are initialized to CHAR_MAX. So unless there's a clear known reason why we'd initialize it to unsigned char mode, revert to the same behaviour as MSVC has. Signed-off-by: Martin Storsjö <[email protected]> --- mingw-w64-crt/crt/crtexe.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c index 646054320..4c7830f01 100644 --- a/mingw-w64-crt/crt/crtexe.c +++ b/mingw-w64-crt/crt/crtexe.c @@ -332,7 +332,6 @@ __tmainCRTStartup (void) extern int mingw_initltsdrot_force; extern int mingw_initltsdyn_force; extern int mingw_initltssuo_force; -extern int mingw_initcharmax; static int __cdecl check_managed_app (void) @@ -346,7 +345,6 @@ check_managed_app (void) mingw_initltsdrot_force=1; mingw_initltsdyn_force=1; mingw_initltssuo_force=1; - mingw_initcharmax=1; pDOSHeader = (PIMAGE_DOS_HEADER) &__ImageBase; if (pDOSHeader->e_magic != IMAGE_DOS_SIGNATURE) -- 2.25.1 _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
