summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Darwin/Fl_Darwin_System_Driver.cxx2
-rw-r--r--src/drivers/Posix/Fl_Posix_System_Driver.cxx2
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx6
3 files changed, 6 insertions, 4 deletions
diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
index 3929c63c6..e8082fbc6 100644
--- a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
+++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
@@ -234,7 +234,7 @@ int Fl_Darwin_System_Driver::file_type(const char *filename)
{
int filetype;
struct stat fileinfo; // Information on file
- if (!stat(filename, &fileinfo))
+ if (!::stat(filename, &fileinfo))
{
if (S_ISDIR(fileinfo.st_mode))
filetype = Fl_File_Icon::DIRECTORY;
diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.cxx b/src/drivers/Posix/Fl_Posix_System_Driver.cxx
index 0e5526c52..b9c171bc9 100644
--- a/src/drivers/Posix/Fl_Posix_System_Driver.cxx
+++ b/src/drivers/Posix/Fl_Posix_System_Driver.cxx
@@ -537,7 +537,7 @@ int Fl_Posix_System_Driver::file_type(const char *filename)
{
int filetype;
struct stat fileinfo; // Information on file
- if (!stat(filename, &fileinfo))
+ if (!::stat(filename, &fileinfo))
{
if (S_ISDIR(fileinfo.st_mode))
filetype = Fl_File_Icon::DIRECTORY;
diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
index df5ef9f89..a1c1bb74e 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
@@ -29,6 +29,8 @@
#include <stdarg.h>
#include <windows.h>
#include <rpc.h>
+#include <sys/types.h>
+#include <sys/stat.h>
// function pointer for the UuidCreate Function
// RPC_STATUS RPC_ENTRY UuidCreate(UUID __RPC_FAR *Uuid);
typedef RPC_STATUS (WINAPI* uuid_func)(UUID __RPC_FAR *Uuid);
@@ -635,7 +637,7 @@ int Fl_WinAPI_System_Driver::filename_absolute(char *to, int tolen, const char *
int Fl_WinAPI_System_Driver::filename_isdir(const char* n)
{
- struct stat s;
+ struct _stat s;
char fn[FL_PATH_MAX];
int length;
length = (int) strlen(n);
@@ -656,7 +658,7 @@ int Fl_WinAPI_System_Driver::filename_isdir(const char* n)
n = fn;
}
}
- return !stat(n, &s) && (s.st_mode & S_IFMT) == S_IFDIR;
+ return !_stat(n, &s) && (s.st_mode & _S_IFDIR);
}
int Fl_WinAPI_System_Driver::filename_isdir_quick(const char* n)