diff options
| -rw-r--r-- | FL/fl_utf8.h | 3 | ||||
| -rw-r--r-- | FL/platform_types.h | 4 | ||||
| -rw-r--r-- | src/Fl_System_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_System_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx | 2 | ||||
| -rw-r--r-- | src/fl_utf8.cxx | 4 |
6 files changed, 7 insertions, 10 deletions
diff --git a/FL/fl_utf8.h b/FL/fl_utf8.h index 809da71b7..76c661c73 100644 --- a/FL/fl_utf8.h +++ b/FL/fl_utf8.h @@ -29,7 +29,8 @@ #include "Fl_Export.H" #include "fl_types.h" -#include <stdio.h> // FILE *fl_fopen() +#include <stdio.h> // FILE *fl_fopen() +#include <sys/stat.h> // struct stat #ifdef __cplusplus extern "C" { diff --git a/FL/platform_types.h b/FL/platform_types.h index 8b0527183..f831b8b22 100644 --- a/FL/platform_types.h +++ b/FL/platform_types.h @@ -90,7 +90,6 @@ typedef int FL_SOCKET; typedef class NSOpenGLContext* GLContext; #endif /* __OBJC__ */ -#include <sys/stat.h> #include <sys/types.h> #include <dirent.h> # define FL_COMMAND FL_META @@ -106,7 +105,6 @@ typedef unsigned __int64 FL_SOCKET; /* *FIXME* - FL_SOCKET (see above) */ typedef int FL_SOCKET; # endif typedef struct HGLRC__ *GLContext; -#include <sys/stat.h> #ifdef __MINGW32__ # include <dirent.h> #else @@ -119,7 +117,6 @@ typedef struct flCairoRegion* Fl_Region; typedef int FL_SOCKET; /**< socket or file descriptor */ typedef void *EGLContext; typedef EGLContext GLContext; -#include <sys/stat.h> #include <sys/types.h> #include <dirent.h> @@ -129,7 +126,6 @@ typedef unsigned long Fl_Offscreen; typedef struct _XRegion *Fl_Region; typedef int FL_SOCKET; typedef struct __GLXcontextRec *GLContext; -#include <sys/stat.h> #include <sys/types.h> #include <dirent.h> diff --git a/src/Fl_System_Driver.H b/src/Fl_System_Driver.H index d008f6a26..b342fcb29 100644 --- a/src/Fl_System_Driver.H +++ b/src/Fl_System_Driver.H @@ -112,7 +112,7 @@ public: virtual int execvp(const char * /*file*/, char *const * /*argv*/) {return -1;} virtual int chmod(const char* /*f*/, int /*mode*/) {return -1;} virtual int access(const char* /*f*/, int /*mode*/) { return -1;} - virtual int stat(const char* /*f*/, struct stat *) { return -1;} + virtual int flstat(const char* /*f*/, struct stat *) { return -1;} virtual char *getcwd(char* /*b*/, int /*l*/) {return NULL;} virtual int chdir(const char*) {return -1;} virtual int unlink(const char*) {return -1;} diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H index 27e2e5739..9855ba509 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H @@ -54,7 +54,7 @@ public: virtual int execvp(const char *file, char *const *argv); virtual int chmod(const char *fnam, int mode); virtual int access(const char *fnam, int mode); - virtual int stat(const char *fnam, struct stat *b); + virtual int flstat(const char *fnam, struct stat *b); virtual char *getcwd(char *b, int l); virtual int chdir(const char *path); virtual int unlink(const char *fnam); diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx index b6a435d02..cc6aede08 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx @@ -243,7 +243,7 @@ int Fl_WinAPI_System_Driver::access(const char *fnam, int mode) { return _waccess(utf8_to_wchar(fnam, wbuf), mode); } -int Fl_WinAPI_System_Driver::stat(const char *fnam, struct stat *b) { +int Fl_WinAPI_System_Driver::flstat(const char *fnam, struct stat *b) { // remove trailing '/' or '\' unsigned len = (unsigned)strlen(fnam); diff --git a/src/fl_utf8.cxx b/src/fl_utf8.cxx index b7d273466..efb7fa5d5 100644 --- a/src/fl_utf8.cxx +++ b/src/fl_utf8.cxx @@ -3,7 +3,7 @@ // // Author: Jean-Marc Lienher ( http://oksid.ch ) // Copyright 2000-2010 by O'ksi'D. -// Copyright 2016-2020 by Bill Spitzak and others. +// Copyright 2016-2022 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -462,7 +462,7 @@ int fl_access(const char* f, int mode) { \return the return value of _wstat() on Windows or stat() on other platforms. */ int fl_stat(const char* f, struct stat *b) { - return Fl::system_driver()->stat(f, b); + return Fl::system_driver()->flstat(f, b); } /** Cross-platform function to change the current working directory, |
