Runtime library msvcrt10.dll like crtdll.dll does not provide support for
64-bit printf/scanf modifiers. So do not define them for msvcrt10.dll too.
---
 mingw-w64-headers/crt/inttypes.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mingw-w64-headers/crt/inttypes.h b/mingw-w64-headers/crt/inttypes.h
index 2fe9b3ca25ef..ec99d6956af9 100644
--- a/mingw-w64-headers/crt/inttypes.h
+++ b/mingw-w64-headers/crt/inttypes.h
@@ -28,7 +28,7 @@ typedef struct {
  * length specifier. It appears to treat "ll" as "l".
  * The non-standard I64 length specifier causes warning in GCC,
  * but understood by MS runtime functions.
- * crtdll.dll runtime does not support any 64-bit modifier.
+ * crtdll.dll and msvcrt10.dll do not support any 64-bit modifier.
  */
 #if defined(_UCRT) || __USE_MINGW_ANSI_STDIO
 #define PRId64 "lld"
@@ -37,7 +37,7 @@ typedef struct {
 #define PRIu64 "llu"
 #define PRIx64 "llx"
 #define PRIX64 "llX"
-#elif !defined(__CRTDLL__)
+#elif !defined(__CRTDLL__) && __MSVCRT_VERSION__ >= 0x200
 #define PRId64 "I64d"
 #define PRIi64 "I64i"
 #define PRIo64 "I64o"
@@ -279,9 +279,9 @@ typedef struct {
 #define SCNuFAST8 "hhu"
 #endif /* __STDC_VERSION__ >= 199901 */
 
-#if defined(__CRTDLL__) && !defined(__USE_MINGW_ANSI_STDIO)
+#if (defined(__CRTDLL__) || __MSVCRT_VERSION__ < 0x200) && 
!defined(__USE_MINGW_ANSI_STDIO)
 /*
- * crtdll.dll runtime does not support any 64-bit modifier.
+ * crtdll.dll and msvcrt10.dll do not support any 64-bit modifier.
  * Undef all previously defined 64-bit modifiers.
  */
 #undef PRIdLEAST64
-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to