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
This commit is contained in:
Rui Abreu Ferreira 2014-07-03 14:32:09 +01:00 committed by Justin M. Keyes
parent 6cf2925f63
commit fc7055f6e9

View File

@ -112,6 +112,10 @@ endif()
add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter
-Wstrict-prototypes -std=gnu99) -Wstrict-prototypes -std=gnu99)
if (MINGW)
# Use POSIX compatible stdio in Mingw
add_definitions(-D__USE_MINGW_ANSI_STDIO)
endif()
option( option(
TRAVIS_CI_BUILD "Travis CI build. Extra compilation flags will be set." OFF) TRAVIS_CI_BUILD "Travis CI build. Extra compilation flags will be set." OFF)