From 8a9f53f128aaf0e7426db45efb86c935c7f8ddd3 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Thu, 10 Sep 2015 10:15:57 +0200 Subject: [PATCH] [mingw] Please use standard printf/scanf Ohterwise the compiler complains about %lli (and will faile at runtime on XP). See the MinGW FAQ: http://sourceforge.net/p/mingw-w64/wiki2/printf%20and%20scanf%20family/ --- tools/cmake/Flags.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/cmake/Flags.cmake b/tools/cmake/Flags.cmake index 872fe659fe..e0033bcc23 100644 --- a/tools/cmake/Flags.cmake +++ b/tools/cmake/Flags.cmake @@ -149,3 +149,7 @@ if(NOT $ENV{LDFLAGS} STREQUAL "") message(STATUS "Add LDFLAGS: \"$ENV{LDFLAGS}\" to CMAKE_C_LINK_FLAGS") set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} $ENV{LDFLAGS}") endif() + +if(MINGW) + add_definitions(-D__USE_MINGW_ANSI_STDIO=1) +endif() -- 2.20.1