From 3751065f9740244c95da963c0dd16a0bcd5b419c Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Tue, 27 Sep 2016 22:44:18 +1000 Subject: win32: build with -DINITGUID We always want to use __declspec(selectany) to declare GUIDs, but manually including in every file that used GUIDs was error-prone. Since all does is define INITGUID and include , we can remove all references to and just compile with -DINITGUID to get the same effect. Also, this partially reverts 622bcb0 by re-adding libuuid.a to the build, since apparently some GUIDs (such as GUID_NULL) are not declared in the source file, even when INITGUID is set. --- waftools/detections/compiler.py | 2 +- waftools/fragments/wasapi.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'waftools') diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py index 900128ce4c..5bbba87fd7 100644 --- a/waftools/detections/compiler.py +++ b/waftools/detections/compiler.py @@ -52,7 +52,7 @@ def __add_clang_flags__(ctx): def __add_mswin_flags__(ctx): ctx.env.CFLAGS += ['-D_WIN32_WINNT=0x0601', '-DUNICODE', '-DCOBJMACROS', - '-U__STRICT_ANSI__'] + '-DINITGUID', '-U__STRICT_ANSI__'] ctx.env.LAST_LINKFLAGS += ['-Wl,--major-os-version=6,--minor-os-version=0', '-Wl,--major-subsystem-version=6,--minor-subsystem-version=0'] diff --git a/waftools/fragments/wasapi.c b/waftools/fragments/wasapi.c index 5528ce171b..fbd2bb6e1b 100644 --- a/waftools/fragments/wasapi.c +++ b/waftools/fragments/wasapi.c @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3