[poppler] Branch 'poppler-0.20' - poppler/poppler-config.h.cmake poppler/poppler-config.h.in poppler/strtok_r.cpp
Albert Astals Cid
aacid at kemper.freedesktop.org
Sat Sep 15 11:40:34 PDT 2012
poppler/poppler-config.h.cmake | 2 +-
poppler/poppler-config.h.in | 2 +-
poppler/strtok_r.cpp | 16 +++++++++++++++-
3 files changed, 17 insertions(+), 3 deletions(-)
New commits:
commit 365808837080574080b4f8da079124c172fb2123
Author: Alexey Pavlov <alexpux at gmail.com>
Date: Sat Sep 15 20:38:10 2012 +0200
Fix build using mingw64 with winpthread
strtok_r in winpthread is declared as a macro, that is why
the error happens. Therefore, it is necessary to check whether the macro
__WINPTHREADS_VERSION is declared.
Bug #54851
diff --git a/poppler/poppler-config.h.cmake b/poppler/poppler-config.h.cmake
index 94a12aa..382ca45 100644
--- a/poppler/poppler-config.h.cmake
+++ b/poppler/poppler-config.h.cmake
@@ -158,7 +158,7 @@
#if defined(_WIN32)
#ifdef _MSC_VER
#define strtok_r strtok_s
-#elif __MINGW32__
+#elif __MINGW32__ && !defined(__WINPTHREADS_VERSION)
char * strtok_r (char *s, const char *delim, char **save_ptr);
#endif
#endif
diff --git a/poppler/poppler-config.h.in b/poppler/poppler-config.h.in
index 302d12e..0d8b379 100644
--- a/poppler/poppler-config.h.in
+++ b/poppler/poppler-config.h.in
@@ -158,7 +158,7 @@
#if defined(_WIN32)
#ifdef _MSC_VER
#define strtok_r strtok_s
-#elif __MINGW32__
+#elif __MINGW32__ && !defined(__WINPTHREADS_VERSION)
char * strtok_r (char *s, const char *delim, char **save_ptr);
#endif
#endif
diff --git a/poppler/strtok_r.cpp b/poppler/strtok_r.cpp
index 30e2196..dc35e00 100644
--- a/poppler/strtok_r.cpp
+++ b/poppler/strtok_r.cpp
@@ -40,7 +40,21 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifdef __MINGW32__
+//========================================================================
+//
+// Modified under the Poppler project - http://poppler.freedesktop.org
+//
+// All changes made under the Poppler project to this file are licensed
+// under GPL version 2 or later
+//
+// Copyright (C) 2012 Alexey Pavlov <alexpux at gmail.com>
+//
+// 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
+//
+//========================================================================
+
+#ifdef __MINGW32__ && !defined(__WINPTHREADS_VERSION)
#include <string.h>
#define __rawmemchr strchr
More information about the poppler
mailing list