poppler/GlobalParamsWin.cc |    2 ++
 poppler/TextOutputDev.cc   |   11 +++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit a7dcb2b4ffee57b7f78529cbaeaab647ab93de86
Author: Pino Toscano <[email protected]>
Date:   Thu Apr 22 13:31:41 2010 +0200

    Windows: include config.h in GlobalParamsWin.cc only if not included already
    
    GlobalParamsWin.cc is not compiled standalone but only #include'd by 
GlobalParams.cc (on Windows only), so config.h has already included already
    as safety check, check for PACKAGE_NAME (#define'd in config.h) before 
#include'ing it again

diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
index 2333ddb..f989fb8 100644
--- a/poppler/GlobalParamsWin.cc
+++ b/poppler/GlobalParamsWin.cc
@@ -8,7 +8,9 @@ scan the whole fonts directory, parse TTF files and build font
 description for all fonts available in Windows. That's how MuPDF works.
 */
 
+#ifndef PACKAGE_NAME
 #include <config.h>
+#endif
 
 #ifdef USE_GCC_PRAGMAS
 #pragma implementation
commit fba076e17af24a9c9883504282316bba119a908c
Author: Pino Toscano <[email protected]>
Date:   Thu Apr 22 13:24:04 2010 +0200

    avoid accidental max() macro replacement with some compilers (eg MSVC)
    
    defining an empty macro and using it between "max" and "(", such compilers 
won't try to replace their macro max(a, b) there; in any case, empty spaces are 
just fine

diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index afca5f2..20593b5 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -63,6 +63,9 @@
 #include "ICSupport.h"
 #endif
 
+// ugly way to workaround compilers which #define min()/max()
+#define POPPLER_AVOID_MACRO_SUBSTITUTION
+
 //------------------------------------------------------------------------
 // parameters
 //------------------------------------------------------------------------
@@ -3036,10 +3039,10 @@ void TextPage::coalesce(GBool physLayout, GBool doHTML) 
{
     blk1->EyMin = blk1->yMin;
     blk1->EyMax = blk1->yMax;
 
-    bxMin0 = std::numeric_limits<double>::max();
-    byMin0 = std::numeric_limits<double>::max();
-    bxMin1 = std::numeric_limits<double>::max();
-    byMin1 = std::numeric_limits<double>::max();
+    bxMin0 = std::numeric_limits<double>::max POPPLER_AVOID_MACRO_SUBSTITUTION 
();
+    byMin0 = std::numeric_limits<double>::max POPPLER_AVOID_MACRO_SUBSTITUTION 
();
+    bxMin1 = std::numeric_limits<double>::max POPPLER_AVOID_MACRO_SUBSTITUTION 
();
+    byMin1 = std::numeric_limits<double>::max POPPLER_AVOID_MACRO_SUBSTITUTION 
();
 
     fblk2 = NULL;
     fblk3 = NULL;
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to