aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"