diff options
-rw-r--r-- | goo/gfile.cc | 4 | ||||
-rw-r--r-- | goo/gfile.h | 4 |
2 files changed, 8 insertions, 0 deletions
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 |