[poppler] [PATCH] Avoid MinGW/Cygwin warnings due to redefinition of NOMINMAX.
Peter Breitenlohner
peb at mppmu.mpg.de
Thu Mar 27 01:58:37 PDT 2014
Signed-off-by: Peter Breitenlohner <peb at mppmu.mpg.de>
---
goo/GooMutex.h | 2 ++
goo/GooTimer.h | 2 ++
goo/gfile.h | 4 +++-
poppler/XpdfPluginAPI.h | 2 ++
4 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/goo/GooMutex.h b/goo/GooMutex.h
index 4a7ed5f..5fef47e 100644
--- a/goo/GooMutex.h
+++ b/goo/GooMutex.h
@@ -41,7 +41,9 @@
// gDestroyMutex(&m);
#ifdef _WIN32
+#ifndef NOMINMAX
#define NOMINMAX
+#endif
#include <windows.h>
typedef CRITICAL_SECTION GooMutex;
diff --git a/goo/GooTimer.h b/goo/GooTimer.h
index 7bbe9f0..d5957b0 100644
--- a/goo/GooTimer.h
+++ b/goo/GooTimer.h
@@ -27,7 +27,9 @@
#endif
#ifdef _WIN32
+#ifndef NOMINMAX
#define NOMINMAX
+#endif
#include <windows.h>
#endif
diff --git a/goo/gfile.h b/goo/gfile.h
index 264d7d9..d4c8d92 100644
--- a/goo/gfile.h
+++ b/goo/gfile.h
@@ -40,7 +40,9 @@ extern "C" {
# ifdef FPTEX
# include <win32lib.h>
# else
- #define NOMINMAX
+# ifndef NOMINMAX
+# define NOMINMAX
+# endif
# include <windows.h>
# endif
#elif defined(ACORN)
diff --git a/poppler/XpdfPluginAPI.h b/poppler/XpdfPluginAPI.h
index db90dba..da69ee3 100644
--- a/poppler/XpdfPluginAPI.h
+++ b/poppler/XpdfPluginAPI.h
@@ -23,7 +23,9 @@
#define XPDFPLUGINAPI_H
#ifdef _WIN32
+#ifndef NOMINMAX
#define NOMINMAX
+#endif
#include <windows.h>
#else
#define Object XtObject
--
1.9.0
More information about the poppler
mailing list