[poppler] glib/poppler-document.cc poppler/PSOutputDev.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 19 08:47:28 UTC 2021


 glib/poppler-document.cc |    4 ++--
 poppler/PSOutputDev.cc   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 97fe0bc48a72265b689560bbd4a5d3c2e8b120a6
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Nov 19 09:42:27 2021 +0100

    Fix compile on MSVC #2

diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc
index fd95a468..7ca4ba6b 100644
--- a/glib/poppler-document.cc
+++ b/glib/poppler-document.cc
@@ -459,9 +459,9 @@ PopplerDocument *poppler_document_new_from_fd(int fd, const char *password, GErr
         return nullptr;
     }
 
-    if (fd == STDIN_FILENO || !S_ISREG(statbuf.st_mode)) {
+    if (fd == fileno(stdin) || !S_ISREG(statbuf.st_mode)) {
         FILE *file;
-        if (fd == STDIN_FILENO) {
+        if (fd == fileno(stdin)) {
             file = stdin;
         } else {
             file = fdopen(fd, "rb");
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 4e66186c..972945f1 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -1171,7 +1171,7 @@ PSOutputDev::PSOutputDev(int fdA, PDFDoc *docA, char *psTitleA, const std::vecto
     psTitle = nullptr;
 
     // open file or pipe
-    if (fdA == STDOUT_FILENO) {
+    if (fdA == fileno(stdout)) {
         fileTypeA = psStdout;
         f = stdout;
     } else {


More information about the poppler mailing list