diff options
author | wm4 <wm4@nowhere> | 2015-01-01 15:10:42 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-01 15:10:42 +0100 |
commit | bafb9b22715313ef0049630228a744d7f2c9363b (patch) | |
tree | a1bd25023be5840467291dbe9876dd7c30bc2034 /waftools/checks | |
parent | 64b6b2ea458f679ec0370878b1e54b2b1822c4b1 (diff) | |
download | mpv-bafb9b22715313ef0049630228a744d7f2c9363b.tar.bz2 mpv-bafb9b22715313ef0049630228a744d7f2c9363b.tar.xz |
win32: add native wrappers for pthread functions
Off by default, use --enable-win32-internal-pthreads .
This probably still needs a lot more testing. It also won't work on
Windows XP.
Diffstat (limited to 'waftools/checks')
-rw-r--r-- | waftools/checks/custom.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py index 3126868164..365c388800 100644 --- a/waftools/checks/custom.py +++ b/waftools/checks/custom.py @@ -20,6 +20,12 @@ def check_pthread_flag(ctx, dependency_identifier): return False def check_pthreads(ctx, dependency_identifier): + if ctx.dependency_satisfied('win32-internal-pthreads'): + h = ctx.path.find_node('osdep/win32/include').abspath() + # define IN_WINPTHREAD to workaround mingw stupidity (we never want it + # to define features specific to its own pthread stuff) + ctx.env.CFLAGS += ['-isystem', h, '-I', h, '-D_WIN32_WINNT=0x600', '-DIN_WINPTHREAD'] + return True if check_pthread_flag(ctx, dependency_identifier): return True platform_cflags = { |