[poppler] glib/poppler-document.cc utils/pdftocairo-win32.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Sep 23 17:33:12 UTC 2018


 glib/poppler-document.cc  |    4 ++++
 utils/pdftocairo-win32.cc |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 8ca7c4f2bbce1e22393cb2e71ae9025b72289121
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Sep 23 19:32:53 2018 +0200

    Fix windows build even more

diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc
index d4900f3b..fc69d8c3 100644
--- a/glib/poppler-document.cc
+++ b/glib/poppler-document.cc
@@ -44,6 +44,10 @@
 #include "poppler-input-stream.h"
 #include "poppler-cached-file-loader.h"
 
+#ifdef G_OS_WIN32
+  #include <stringapiset.h>
+#endif
+
 /**
  * SECTION:poppler-document
  * @short_description: Information about a document
diff --git a/utils/pdftocairo-win32.cc b/utils/pdftocairo-win32.cc
index e4c2556f..21eb737c 100644
--- a/utils/pdftocairo-win32.cc
+++ b/utils/pdftocairo-win32.cc
@@ -372,7 +372,7 @@ void win32SetupPrinter(GooString *printer, GooString *printOpt,
     printerName = (char*)gmalloc(size);
     GetDefaultPrinterA(printerName, &size);
   } else {
-    printerName = gstrndup(printer->getCString(), printer->getLength());
+    printerName = copyString(printer->getCString(), printer->getLength());
   }
 
   //Query the size of the DEVMODE struct


More information about the poppler mailing list