From fc7055f6e951ab0973f121a13a87c4438a799c5c Mon Sep 17 00:00:00 2001 From: Rui Abreu Ferreira Date: Thu, 3 Jul 2014 14:32:09 +0100 Subject: [PATCH] Mingw: Use POSIX compatible stdio #3232 - There are some differences between stdio (*printf) functions in POSIX and the MS runtime, this commit enables Mingw compatibility for these functions --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 700bfdf7cf..b2e19c6d6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,6 +112,10 @@ endif() add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99) +if (MINGW) + # Use POSIX compatible stdio in Mingw + add_definitions(-D__USE_MINGW_ANSI_STDIO) +endif() option( TRAVIS_CI_BUILD "Travis CI build. Extra compilation flags will be set." OFF)