]> sigrok.org Git - pulseview.git/commitdiff
pv/exprtk.hpp: Fix Windows build issues.
authorUwe Hermann <redacted>
Wed, 16 Sep 2020 18:51:54 +0000 (20:51 +0200)
committerUwe Hermann <redacted>
Wed, 16 Sep 2020 18:51:54 +0000 (20:51 +0200)
Define NOGDI and NORESOURCE in order to avoid unneeded namespace
pollution caused by <windows.h>, which leads to errors such as:

  libsigrokcxx/enums.hpp:374:36: error: expected unqualified-id before numeric constant
    static const QuantityFlag * const RELATIVE;
                                      ^

  libsigrokcxx/enums.hpp:161:32: error: expected unqualified-id before numeric constant
    static const Quantity * const DIFFERENCE;
                                  ^

pv/exprtk.hpp

index ca383758933c0d297717995916b9a85a96bdd14e..d1f6cf1520d02fa4b98aa4bc867ecc44039763ca 100644 (file)
@@ -37114,6 +37114,8 @@ namespace exprtk
 #   ifndef WIN32_LEAN_AND_MEAN
 #      define WIN32_LEAN_AND_MEAN
 #   endif
+#   define NOGDI
+#   define NORESOURCE
 #   include <windows.h>
 #   include <ctime>
 #else