I opened this topic on the mingw-w64 list: https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/thread/20260407184647.weakbrqa4sa2bbut%40pali/#msg59318951 I understand that for individuals it is hard to report such Windows issue to Microsoft as mostly only corporate customers have an option to fill an incident/issue report. What I know is that individual developers can report msvc compiler and C runtime issues to the Visual Studio issue tracker. It is not Windows issue tracker but maybe it...
msvcrt40.dll and crtdll.dll are completely different libraries with different symbols and even few symbols which are present in both libraries have different ABI. So replacing crtdll.dll by msvcrt40.dll would not work. mingw-w64 header files uses macros which expands to UCRT ABI functions during compilation and then mingw-w64 crt contains implementation of those UCRT functions via chosen msvcr*/crtdll library and its exported symbols which are used during final linking. You can compare mingw-w64...
This is not related to mingw-w64 runtime, but rather to the gcc compiler. Same happen when compiled by gcc on Linux targeting glibc. If you think that this is really a bug then it should be reported to gcc project.
I implement the fix as described above and sent it to the list: https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/thread/20260224201812.4f7jrjgbbx5ovjwm%40pali/ With the change, the mingw-w64 stat() function for NUL path when build against msvcrt.dll will properly return character? = 1 via S_ISCHR().
No, there is no way. Mingw-w64 does not provide ucrt libraries, they are provided by microsoft. DLL version which microsoft provides for Windows 7 does not support UTF-8. Static libraries provided by microsoft works only with msvc compiler. microsoft does not provide static libraries for mingw-w64. If you want unicode on older windows versions then you need to stick with UTF-16.
I sent this change to list: https://sourceforge.net/p/mingw-w64/mailman/message/59271864/
Could you try following change? diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h index f1d9440fa1df..ba964a876e25 100644 --- a/mingw-w64-headers/crt/stdio.h +++ b/mingw-w64-headers/crt/stdio.h @@ -585,17 +585,17 @@ int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_li _CRTIMP int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin); _CRTIMP __int64 __cdecl _ftelli64(FILE *_File); - int __cdecl fseeko(FILE *_File, off_t _Offset, int _Origin)...
Could you try following change? diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h index f1d9440fa1df..ba964a876e25 100644 --- a/mingw-w64-headers/crt/stdio.h +++ b/mingw-w64-headers/crt/stdio.h @@ -585,17 +585,17 @@ int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_li _CRTIMP int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin); _CRTIMP __int64 __cdecl _ftelli64(FILE *_File); - int __cdecl fseeko(FILE *_File, off_t _Offset, int _Origin)...