From 7c0bcfb61d570d6187d5aa2cfdbf879c2cfae2f8 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 14 May 2015 20:55:49 -0700 Subject: [PATCH] Explain __USE_MINGW_ANSI_STDIO. Change-Id: I6900a7cddfb5aa4365c3e0f6f6f0fa9203c0fe43 --- core/combo/HOST_windows-x86.mk | 4 +++- core/combo/HOST_windows-x86_64.mk | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/combo/HOST_windows-x86.mk b/core/combo/HOST_windows-x86.mk index b71ac1655..5839e734b 100644 --- a/core/combo/HOST_windows-x86.mk +++ b/core/combo/HOST_windows-x86.mk @@ -41,7 +41,9 @@ endif # Linux # Workaround differences in inttypes.h between host and target. # See bug 12708004. -$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D__USE_MINGW_ANSI_STDIO +$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS +# Use C99-compliant printf functions (%zd). +$(combo_2nd_arch_prefix)HOST_GLOBAL_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1 $(combo_2nd_arch_prefix)HOST_CC := $(TOOLS_PREFIX)gcc$(TOOLS_EXE_SUFFIX) $(combo_2nd_arch_prefix)HOST_CXX := $(TOOLS_PREFIX)g++$(TOOLS_EXE_SUFFIX) diff --git a/core/combo/HOST_windows-x86_64.mk b/core/combo/HOST_windows-x86_64.mk index bd392ea1a..c526f205f 100644 --- a/core/combo/HOST_windows-x86_64.mk +++ b/core/combo/HOST_windows-x86_64.mk @@ -36,7 +36,9 @@ endif # Linux # Workaround differences in inttypes.h between host and target. # See bug 12708004. -HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D__USE_MINGW_ANSI_STDIO +HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS +# Use C99-compliant printf functions (%zd). +HOST_GLOBAL_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1 HOST_CC := $(TOOLS_PREFIX)gcc$(TOOLS_EXE_SUFFIX) HOST_CXX := $(TOOLS_PREFIX)g++$(TOOLS_EXE_SUFFIX)