[poppler] 2 commits - goo/gfile.cc poppler/Annot.cc poppler/XRef.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Jun 5 16:06:54 PDT 2013


 goo/gfile.cc     |    7 ++++++-
 poppler/Annot.cc |    7 +++++++
 poppler/XRef.cc  |    4 ++++
 3 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 7847769a24bd3ccf863f653bc2215e84157ccfb6
Author: Peter Breitenlohner <peb at mppmu.mpg.de>
Date:   Tue Jun 4 15:31:06 2013 +0200

    Use fseeko64/ftello64 for MinGW32

diff --git a/goo/gfile.cc b/goo/gfile.cc
index 9d0699a..c590a19 100644
--- a/goo/gfile.cc
+++ b/goo/gfile.cc
@@ -23,6 +23,7 @@
 // Copyright (C) 2009 Kovid Goyal <kovid at kovidgoyal.net>
 // Copyright (C) 2013 Adam Reichold <adamreichold at myopera.com>
 // Copyright (C) 2013 Adrian Johnson <ajohnson at redneon.com>
+// Copyright (C) 2013 Peter Breitenlohner <peb at mppmu.mpg.de>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -555,6 +556,8 @@ int Gfseek(FILE *f, Goffset offset, int whence) {
   return fseeko(f, offset, whence);
 #elif HAVE_FSEEK64
   return fseek64(f, offset, whence);
+#elif defined(__MINGW32__)
+  return fseeko64(f, offset, whence);
 #elif _WIN32
   return _fseeki64(f, offset, whence);
 #else
@@ -567,6 +570,8 @@ Goffset Gftell(FILE *f) {
   return ftello(f);
 #elif HAVE_FSEEK64
   return ftell64(f);
+#elif defined(__MINGW32__)
+  return ftello64(f);
 #elif _WIN32
   return _ftelli64(f);
 #else
@@ -577,7 +582,7 @@ Goffset Gftell(FILE *f) {
 Goffset GoffsetMax() {
 #if HAVE_FSEEKO
   return (std::numeric_limits<off_t>::max)();
-#elif HAVE_FSEEK64
+#elif HAVE_FSEEK64 || defined(__MINGW32__)
   return (std::numeric_limits<off64_t>::max)();
 #elif _WIN32
   return (std::numeric_limits<__int64>::max)();
commit 0c3548087b379dd6ffa2291d03f0ea1c7e6a69d1
Author: Peter Breitenlohner <peb at mppmu.mpg.de>
Date:   Tue Jun 4 15:31:05 2013 +0200

    Allow to build without multithreading

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 2713fde..791a645 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -27,6 +27,7 @@
 // Copyright (C) 2012 Fabio D'Urso <fabiodurso at hotmail.it>
 // Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2012 Tobias Koenig <tokoe at kdab.com>
+// Copyright (C) 2013 Peter Breitenlohner <peb at mppmu.mpg.de>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -1543,13 +1544,19 @@ void Annot::incRefCnt() {
 }
 
 void Annot::decRefCnt() {
+#if MULTITHREADED
   gLockMutex(&mutex);
+#endif
   if (--refCnt == 0) {
+#if MULTITHREADED
     gUnlockMutex(&mutex);
+#endif
     delete this;
     return;
   }
+#if MULTITHREADED
   gUnlockMutex(&mutex);
+#endif
 }
 
 Annot::~Annot() {
diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index 85f8a6f..5495b62 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -1252,11 +1252,15 @@ Object *XRef::fetch(int num, int gen, Object *obj, int recursion) {
 }
 
 void XRef::lock() {
+#if MULTITHREADED
   gLockMutex(&mutex);
+#endif
 }
 
 void XRef::unlock() {
+#if MULTITHREADED
   gUnlockMutex(&mutex);
+#endif
 }
 
 Object *XRef::getDocInfo(Object *obj) {


More information about the poppler mailing list