summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorstijn <stinos@zoho.com>2014-05-20 12:14:28 +0200
committerstijn <stinos@zoho.com>2014-05-20 12:14:28 +0200
commit32acd4b9f1c4c9e63ec1c3884171a5c6c0b9f4c6 (patch)
tree641b35d273bb0730437a3d9df2547b2087b795dd
parent44a949d58c883174206fc958c1fa4860e3985bd8 (diff)
downloadmicropython-32acd4b9f1c4c9e63ec1c3884171a5c6c0b9f4c6.tar.gz
micropython-32acd4b9f1c4c9e63ec1c3884171a5c6c0b9f4c6.zip
windows: Fix compilation with mingw-w64 so it uses correct printf implementations
Without this flag, mingw-w64 uses the MS implementations of snpintf and the likes. This is not really a problem since they work with the the fixes provided for msvc, but due to the way mingw-w64's stdio.h is structured we cannot get it to use the fixes.
-rw-r--r--windows/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/windows/Makefile b/windows/Makefile
index 8fcc0b5815..a188979bd5 100644
--- a/windows/Makefile
+++ b/windows/Makefile
@@ -17,6 +17,9 @@ INC += -I$(BUILD)
# compiler settings
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT)
LDFLAGS = $(LDFLAGS_MOD) -lm
+ifeq ($(CROSS_COMPILE),i686-w64-mingw32-)
+CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
+endif
# Debugging/Optimization
ifdef DEBUG