#error "This inttypes.h file should only be compiled with MSVC"
#endif
+#ifdef WTF_COMPILER_MSVC7_OR_LOWER
+// https://bugs.webkit.org/show_bug.cgi?id=76210
+#error "Visual Studio 2005 or newer is required"
+#endif
+
#if _MSC_VER > 1000
#pragma once
#endif
#define PRIdFAST16 "hd"
#define PRIiFAST16 "hi"
-#define PRId32 "I32d"
-#define PRIi32 "I32i"
-#define PRIdLEAST32 "I32d"
-#define PRIiLEAST32 "I32i"
-#define PRIdFAST32 "I32d"
-#define PRIiFAST32 "I32i"
+#define PRId32 "d"
+#define PRIi32 "i"
+#define PRIdLEAST32 "d"
+#define PRIiLEAST32 "i"
+#define PRIdFAST32 "d"
+#define PRIiFAST32 "i"
-#define PRId64 "I64d"
-#define PRIi64 "I64i"
-#define PRIdLEAST64 "I64d"
-#define PRIiLEAST64 "I64i"
-#define PRIdFAST64 "I64d"
-#define PRIiFAST64 "I64i"
+#define PRId64 "lld"
+#define PRIi64 "lli"
+#define PRIdLEAST64 "lld"
+#define PRIiLEAST64 "lli"
+#define PRIdFAST64 "lld"
+#define PRIiFAST64 "lli"
-#define PRIdMAX "I64d"
-#define PRIiMAX "I64i"
+#define PRIdMAX "lld"
+#define PRIiMAX "lli"
#define PRIdPTR "Id"
#define PRIiPTR "Ii"
#define PRIxFAST16 "hx"
#define PRIXFAST16 "hX"
-#define PRIo32 "I32o"
-#define PRIu32 "I32u"
-#define PRIx32 "I32x"
-#define PRIX32 "I32X"
-#define PRIoLEAST32 "I32o"
-#define PRIuLEAST32 "I32u"
-#define PRIxLEAST32 "I32x"
-#define PRIXLEAST32 "I32X"
-#define PRIoFAST32 "I32o"
-#define PRIuFAST32 "I32u"
-#define PRIxFAST32 "I32x"
-#define PRIXFAST32 "I32X"
-
-#define PRIo64 "I64o"
-#define PRIu64 "I64u"
-#define PRIx64 "I64x"
-#define PRIX64 "I64X"
-#define PRIoLEAST64 "I64o"
-#define PRIuLEAST64 "I64u"
-#define PRIxLEAST64 "I64x"
-#define PRIXLEAST64 "I64X"
-#define PRIoFAST64 "I64o"
-#define PRIuFAST64 "I64u"
-#define PRIxFAST64 "I64x"
-#define PRIXFAST64 "I64X"
-
-#define PRIoMAX "I64o"
-#define PRIuMAX "I64u"
-#define PRIxMAX "I64x"
-#define PRIXMAX "I64X"
+#define PRIo32 "o"
+#define PRIu32 "u"
+#define PRIx32 "x"
+#define PRIX32 "X"
+#define PRIoLEAST32 "o"
+#define PRIuLEAST32 "u"
+#define PRIxLEAST32 "x"
+#define PRIXLEAST32 "X"
+#define PRIoFAST32 "o"
+#define PRIuFAST32 "u"
+#define PRIxFAST32 "x"
+#define PRIXFAST32 "X"
+
+#define PRIo64 "llo"
+#define PRIu64 "llu"
+#define PRIx64 "llx"
+#define PRIX64 "llX"
+#define PRIoLEAST64 "llo"
+#define PRIuLEAST64 "llu"
+#define PRIxLEAST64 "llx"
+#define PRIXLEAST64 "llX"
+#define PRIoFAST64 "llo"
+#define PRIuFAST64 "llu"
+#define PRIxFAST64 "llx"
+#define PRIXFAST64 "llX"
+
+#define PRIoMAX "llo"
+#define PRIuMAX "llu"
+#define PRIxMAX "llx"
+#define PRIXMAX "llX"
#define PRIoPTR "Io"
#define PRIuPTR "Iu"
#define SCNdFAST32 "ld"
#define SCNiFAST32 "li"
-#define SCNd64 "I64d"
-#define SCNi64 "I64i"
-#define SCNdLEAST64 "I64d"
-#define SCNiLEAST64 "I64i"
-#define SCNdFAST64 "I64d"
-#define SCNiFAST64 "I64i"
+#define SCNd64 "lld"
+#define SCNi64 "lli"
+#define SCNdLEAST64 "lld"
+#define SCNiLEAST64 "lli"
+#define SCNdFAST64 "lld"
+#define SCNiFAST64 "lli"
-#define SCNdMAX "I64d"
-#define SCNiMAX "I64i"
+#define SCNdMAX "lld"
+#define SCNiMAX "lli"
#ifdef _WIN64
-# define SCNdPTR "I64d"
-# define SCNiPTR "I64i"
+# define SCNdPTR "lld"
+# define SCNiPTR "lli"
#else
# define SCNdPTR "ld"
# define SCNiPTR "li"
#define SCNxFAST32 "lx"
#define SCNXFAST32 "lX"
-#define SCNo64 "I64o"
-#define SCNu64 "I64u"
-#define SCNx64 "I64x"
-#define SCNX64 "I64X"
-#define SCNoLEAST64 "I64o"
-#define SCNuLEAST64 "I64u"
-#define SCNxLEAST64 "I64x"
-#define SCNXLEAST64 "I64X"
-#define SCNoFAST64 "I64o"
-#define SCNuFAST64 "I64u"
-#define SCNxFAST64 "I64x"
-#define SCNXFAST64 "I64X"
-
-#define SCNoMAX "I64o"
-#define SCNuMAX "I64u"
-#define SCNxMAX "I64x"
-#define SCNXMAX "I64X"
+#define SCNo64 "llo"
+#define SCNu64 "llu"
+#define SCNx64 "llx"
+#define SCNX64 "llX"
+#define SCNoLEAST64 "llo"
+#define SCNuLEAST64 "llu"
+#define SCNxLEAST64 "llx"
+#define SCNXLEAST64 "llX"
+#define SCNoFAST64 "llo"
+#define SCNuFAST64 "llu"
+#define SCNxFAST64 "llx"
+#define SCNXFAST64 "llX"
+
+#define SCNoMAX "llo"
+#define SCNuMAX "llu"
+#define SCNxMAX "llx"
+#define SCNXMAX "llX"
#ifdef _WIN64
-# define SCNoPTR "I64o"
-# define SCNuPTR "I64u"
-# define SCNxPTR "I64x"
-# define SCNXPTR "I64X"
+# define SCNoPTR "llo"
+# define SCNuPTR "llu"
+# define SCNxPTR "llx"
+# define SCNXPTR "llX"
#else
# define SCNoPTR "lo"
# define SCNuPTR "lu"