Source: gnome-commander
Version: 1.2.8.15-4
Severity: normal
Tags: patch
Control: forwarded -1 https://bugzilla.gnome.org/show_bug.cgi?id=705724
Hi,
while gnome-commander (as currently patched in Debian) would compile
with Poppler 0.24.x, there is a mismatch between the provided error
reporting function and the signature Poppler expects: this is due to
the introduction of the Goffset type (introduced for file offsets).
I reported the problem upstream [1] (which seems dead anyway); attached
there is a copy of the patch, which fixes compatibility with
Poppler 0.24 in a backward-compatible way (so can be applied anytime).
[1] https://bugzilla.gnome.org/show_bug.cgi?id=705724
Thanks,
--
Pino
--- a/config.h.in
+++ b/config.h.in
@@ -112,6 +112,9 @@
/* Define to 1 if poppler has support for PDFDoc::getPDFVersion() */
#undef POPPLER_HAS_GET_PDF_VERSION
+/* Define to 1 if poppler has Goffset */
+#undef POPPLER_HAS_GOFFSET
+
/* Define to 1 if poppler has support for setErrorCallback() */
#undef POPPLER_HAS_SET_ERROR_CALLBACK
--- a/configure.in
+++ b/configure.in
@@ -242,6 +242,9 @@
if pkg-config --atleast-version=0.19.0 poppler; then
AC_DEFINE(POPPLER_HAS_SET_ERROR_CALLBACK, 1, [Define to 1 if poppler has support for setErrorCallback()])
fi
+ if pkg-config --atleast-version=0.23.0 poppler; then
+ AC_DEFINE(POPPLER_HAS_GOFFSET, 1, [Define to 1 if poppler has Goffset])
+ fi
fi
if test "x$have_pdf" = "xyes"; then
AC_DEFINE(HAVE_PDF, 1, [Define to 1 if you have PDF support])
--- a/src/tags/gnome-cmd-tags-poppler.cc
+++ b/src/tags/gnome-cmd-tags-poppler.cc
@@ -41,7 +41,12 @@
static regex_t rxDate;
static gboolean rxDate_OK;
#ifdef POPPLER_HAS_SET_ERROR_CALLBACK
-static void noErrorReporting(void *, ErrorCategory, int pos, char *msg)
+#ifdef POPPLER_HAS_GOFFSET
+typedef Goffset gcmd_poppler_offset_t;
+#else
+typedef int gcmd_poppler_offset_t;
+#endif
+static void noErrorReporting(void *, ErrorCategory, gcmd_poppler_offset_t pos, char *msg)
#else
static void noErrorReporting(int pos, char *msg, va_list args)
#endif