diff options
| author | Manolo Gouy <Manolo> | 2016-04-11 13:50:41 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-04-11 13:50:41 +0000 |
| commit | 1411c119058743cd1b5ae68f8d076f11b9f85c10 (patch) | |
| tree | bd7e9fd944fb13ecd7e792f8b479b6428c40a265 /src/drivers/WinAPI | |
| parent | 5b44fe3bff5a86b888a39b27ceaa8636559e21a9 (diff) | |
Improve use of struct stat for WIN32 platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11582 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/WinAPI')
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
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) |
