summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>2014-02-13 19:29:23 -0300
committerwm4 <wm4@nowhere>2014-03-11 00:08:53 +0100
commitc4d905b567fa9f56001696086383d57f40f14fab (patch)
tree1101650094fb38095ca6270092155ca8698bbd7c
parente4c69376fc13c21a8ecb09a45d01045f88f40b58 (diff)
downloadmpv-c4d905b567fa9f56001696086383d57f40f14fab.tar.bz2
mpv-c4d905b567fa9f56001696086383d57f40f14fab.tar.xz
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.
-rw-r--r--waftools/detections/compiler.py1
1 files changed, 1 insertions, 0 deletions
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__,