summaryrefslogtreecommitdiffstats
path: root/waftools
diff options
context:
space:
mode:
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>2014-02-13 19:29:23 -0300
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2014-02-13 19:29:23 -0300
commit99e38aee9aa52c9a06772d2a6bd5e5bdf17ebc79 (patch)
treee90e3b63e7c50b97f5d95d6d381bc8494e5a5abd /waftools
parent590b28c08b0ebfb17bede0fb785866eaa532f05b (diff)
downloadmpv-99e38aee9aa52c9a06772d2a6bd5e5bdf17ebc79.tar.bz2
mpv-99e38aee9aa52c9a06772d2a6bd5e5bdf17ebc79.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.
Diffstat (limited to 'waftools')
-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 f9d711ddb0..fe607faa1c 100644
--- a/waftools/detections/compiler.py
+++ b/waftools/detections/compiler.py
@@ -42,6 +42,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__,