[poppler] goo/gfile.cc goo/gfile.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jan 6 00:11:19 UTC 2019


 goo/gfile.cc |    4 ++++
 goo/gfile.h  |    4 ++++
 2 files changed, 8 insertions(+)

New commits:
commit aed1af47a2f1adde4e47836798346674f84b873a
Author: Christian Persch <chpe at src.gnome.org>
Date:   Sat Jan 5 23:50:24 2019 +0100

    gfile: Fix the build on WIN32
    
    The openFileDescriptor function is not user in the WIN32 codepaths,
    so just #ifdef it out on WIN32.

diff --git a/goo/gfile.cc b/goo/gfile.cc
index 61704759..e7710b5d 100644
--- a/goo/gfile.cc
+++ b/goo/gfile.cc
@@ -285,6 +285,8 @@ static bool makeFileDescriptorCloexec(int fd) {
 #endif
 }
 
+#ifndef _WIN32
+
 int openFileDescriptor(const char *path, int flags) {
 #ifdef O_CLOEXEC
   return open(path, flags | O_CLOEXEC);
@@ -302,6 +304,8 @@ int openFileDescriptor(const char *path, int flags) {
 #endif
 }
 
+#endif
+
 FILE *openFile(const char *path, const char *mode) {
 #ifdef _WIN32
   OSVERSIONINFO version;
diff --git a/goo/gfile.h b/goo/gfile.h
index 680f70dd..e6ab2d92 100644
--- a/goo/gfile.h
+++ b/goo/gfile.h
@@ -89,8 +89,12 @@ typedef long long Goffset;
 // string, denoting the current directory).  Returns <path>.
 extern GooString *appendToPath(GooString *path, const char *fileName);
 
+#ifndef _WIN32
 // Open a file descriptor
+// Could be implemented on WIN32 too, but the only external caller of
+// this function is not used on WIN32
 extern int openFileDescriptor(const char *path, int flags);
+#endif
 
 // Open a file.  On Windows, this converts the path from UTF-8 to
 // UCS-2 and calls _wfopen (if available).  On other OSes, this simply


More information about the poppler mailing list