diff options
author | John Olender <john.olender@gmail.com> | 2014-06-08 03:43:50 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-06-08 17:11:50 -0400 |
commit | 87d8b17cc478658f2d14f8c55d65b9fb7c0ea167 (patch) | |
tree | 1b1cf74f9c7c2c91033fe5c6afcb0002ac3f44ce /crawl-ref/source/Makefile | |
parent | 93c65a706663ace1d21d71fa2d87abffd7122dac (diff) | |
download | crawl-ref-87d8b17cc478658f2d14f8c55d65b9fb7c0ea167.tar.gz crawl-ref-87d8b17cc478658f2d14f8c55d65b9fb7c0ea167.zip |
AppHdr.h: Adjust PRINTF macro for use with mingw-w64
When __attribute__((format(printf...)) is used, as is the case with
AppHdr.h's PRINTF macro, mingw-w64 uses the standard windows printf
implementation by default. The stdio library provided by windows is
typically *not* C99-compliant. Since crawl uses C99-style PRINTF
calls, many warnings are printed during compilation.
This patch guarantees that, if available, a C99-style printf will
be used for both format checking and actual compiled calls under
mingw-w64. If the C99-specific printf macro is not set by
including stdio.h (e.g., mingw32 is being used), the standard printf
call for format is used.
[Committer's note: also included the fix-up patch "Makefile: Pass the
correct mingw C99 stdio define."]
Diffstat (limited to 'crawl-ref/source/Makefile')
-rw-r--r-- | crawl-ref/source/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile index 286110a5b4..e92d1b9b81 100644 --- a/crawl-ref/source/Makefile +++ b/crawl-ref/source/Makefile @@ -192,7 +192,7 @@ ifneq (,$(findstring MINGW,$(uname_S))) NEED_LIBW32C = YesPlease BUILD_PCRE = YesPlease BUILD_ZLIB = YesPlease - DEFINES_L += -DWINMM_PLAY_SOUNDS + DEFINES_L += -DWINMM_PLAY_SOUNDS -D__USE_MINGW_ANSI_STDIO EXTRA_LIBS += -lwinmm ifdef TILES EXTRA_LIBS += -lmingw32 -lgdi32 -lwinmm contrib/install/$(ARCH)/lib/libSDLmain.a -mwindows |