crt: Don't initialize lconv to unsigned char mode 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ö <martin@martin.st>
diff --git a/mingw-w64-crt/crt/crtexe.c b/mingw-w64-crt/crt/crtexe.c index 6460543..4c7830f 100644 --- a/mingw-w64-crt/crt/crtexe.c +++ b/mingw-w64-crt/crt/crtexe.c
@@ -332,7 +332,6 @@ 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 @@ 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)