From c4d905b567fa9f56001696086383d57f40f14fab Mon Sep 17 00:00:00 2001 From: "Diogo Franco (Kovensky)" Date: Thu, 13 Feb 2014 19:29:23 -0300 Subject: build: Add -U__STRICT_ANSI__ to CFLAGS on Cygwin Cygwin's libc (newlib) doesn't obey a lot of unix feature test macros, including _GNU_SOURCE; as a result, a lot of functions and defines get masked out -- important defines such as M_PI and strcasecmp. Work around it by undefining __STRICT_ANSI__ on cygwin systems. This will still cause compilation issues on any non-cygwin system that uses newlib, but hopefully nobody does that, or if they do, they will find this commit message and know to add -U__STRICT_ANSI__ to their CFLAGS. Hopefully. --- waftools/detections/compiler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py index cdab19a013..b079250a9e 100644 --- a/waftools/detections/compiler.py +++ b/waftools/detections/compiler.py @@ -40,6 +40,7 @@ def __add_mingw_flags__(ctx): def __add_cygwin_flags__(ctx): ctx.env.CFLAGS += ['-mwin32'] + ctx.env.CFLAGS += ['-U__STRICT_ANSI__'] __compiler_map__ = { '__GNUC__': __add_gcc_flags__, -- cgit v1.2.3