aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-09-14 11:16:25 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-09-14 11:16:25 +0300
commit12e1e0a8d87c007816c46d1b51feff5916613496 (patch)
tree946dae652525db9864e52d6554cba9250c3da402
parentf297400327eb6d2b66087f21f549cade62a990e2 (diff)
Fix clashing C min/max macros with C++ functions on Windows
-rw-r--r--libpkgconf/stdinc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libpkgconf/stdinc.h b/libpkgconf/stdinc.h
index f75db66..82939a5 100644
--- a/libpkgconf/stdinc.h
+++ b/libpkgconf/stdinc.h
@@ -35,6 +35,13 @@
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
+
+/*
+ * Add to avoid clashing min/max macros with C++ min/max functions (issue #137
+ * is reported).
+ */
+# define NOMINMAX // No min and max macros.
+
# include <windows.h>
# include <malloc.h>
# define PATH_DEV_NULL "nul"