From bafb9b22715313ef0049630228a744d7f2c9363b Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 1 Jan 2015 15:10:42 +0100 Subject: 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. --- waftools/checks/custom.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'waftools') 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 = { -- cgit v1.2.3