From: Uwe Hermann Date: Sat, 24 Oct 2015 16:54:18 +0000 (+0200) Subject: win32: Re-fix the Windows build (namespace pollution via windows.h). X-Git-Tag: pulseview-0.3.0~61 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=35750e4dc619d538f105ed024f3a72b630108234;p=pulseview.git win32: Re-fix the Windows build (namespace pollution via windows.h). This brings back / extends fixes for bug #517. --- diff --git a/pv/popups/channels.cpp b/pv/popups/channels.cpp index ea5f5fbe..bffd0dfe 100644 --- a/pv/popups/channels.cpp +++ b/pv/popups/channels.cpp @@ -20,6 +20,11 @@ #include +#ifdef _WIN32 +// Windows: Avoid boost/thread namespace pollution (which includes windows.h). +#define NOGDI +#define NORESOURCE +#endif #include #include diff --git a/pv/session.cpp b/pv/session.cpp index 41300968..e6fb52fd 100644 --- a/pv/session.cpp +++ b/pv/session.cpp @@ -18,6 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifdef _WIN32 +// Windows: Avoid boost/thread namespace pollution (which includes windows.h). +#define NOGDI +#define NORESOURCE +#endif #include #include diff --git a/pv/session.hpp b/pv/session.hpp index 0828edbb..2eb4f630 100644 --- a/pv/session.hpp +++ b/pv/session.hpp @@ -31,7 +31,7 @@ #include #ifdef _WIN32 -// Windows: Avoid namespace pollution by thread.hpp (which includes windows.h). +// Windows: Avoid boost/thread namespace pollution (which includes windows.h). #define NOGDI #define NORESOURCE #endif diff --git a/pv/storesession.cpp b/pv/storesession.cpp index da2f963b..c7c2edb0 100644 --- a/pv/storesession.cpp +++ b/pv/storesession.cpp @@ -20,6 +20,11 @@ #include +#ifdef _WIN32 +// Windows: Avoid boost/thread namespace pollution (which includes windows.h). +#define NOGDI +#define NORESOURCE +#endif #include #include