-# if defined(OPENSSL_SYS_UEFI)
-# define PRIu64 "Lu"
-# endif
-# ifndef PRIu64
-# ifdef SIXTY_FOUR_BIT_LONG
-# define PRIu64 "lu"
-# else
-# define PRIu64 "llu"
-# endif
-# endif
-
-/* Format specifier for printing size_t */
-# if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+# if defined(_WIN64)
+# define OSSLzu "I64u" /* One would expect _WIN{64|32} cases after
+ * __STDC_VERSION__, but there are corner
+ * cases of MinGW compilers that link with
+ * non-compliant MSVCRT.DLL... */
+# elif defined(_WIN32)
+# define OSSLzu "u"
+# elif defined(__VMS)
+# define OSSLzu "u" /* VMS suffers from similar problem as MinGW,
+ * i.e. C RTL falling behind compiler. Recall
+ * that sizeof(size_t)==4 even in LP64 case. */
+# elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L