From 446688c6caae4f8772355acd32fb4bff4354d572 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sat, 20 Aug 2022 17:54:48 +0200 Subject: lib: Fix compilation for -D__USE_MINGW_ANSI_STDIO=0 --- expat/Changes | 3 +++ expat/lib/internal.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/expat/Changes b/expat/Changes index 14bb58b3..02841843 100644 --- a/expat/Changes +++ b/expat/Changes @@ -3,6 +3,9 @@ NOTE: We are looking for help with a few things: If you can help, please get in touch. Thanks! Release x.x.x xxx xxxxx xx xxxx + Bug fixes: + #634 MinGW: Fix mis-compilation for -D__USE_MINGW_ANSI_STDIO=0 + Other changes: #596 #625 Autotools: Sync CMake templates with CMake 3.22 #608 CMake: Migrate from use of CMAKE_*_POSTFIX to diff --git a/expat/lib/internal.h b/expat/lib/internal.h index 444eba0f..08d030f9 100644 --- a/expat/lib/internal.h +++ b/expat/lib/internal.h @@ -107,7 +107,9 @@ #include // ULONG_MAX -#if defined(_WIN32) && ! defined(__USE_MINGW_ANSI_STDIO) +#if defined(_WIN32) \ + && (! defined(__USE_MINGW_ANSI_STDIO) \ + || (1 - __USE_MINGW_ANSI_STDIO - 1 == 0)) # define EXPAT_FMT_ULL(midpart) "%" midpart "I64u" # if defined(_WIN64) // Note: modifiers "td" and "zu" do not work for MinGW # define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "I64d" -- cgit v1.2.1