diff options
| author | Manolo Gouy <Manolo> | 2016-04-06 15:49:52 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-04-06 15:49:52 +0000 |
| commit | ae0d15f1a3f133a2b2aa403c115b72819f1ac5ae (patch) | |
| tree | 2e03716f4b145b75fea11fef0d0bba388c6c8712 /FL | |
| parent | d905769e6912039a318cdccfe7cd6dc510d254d6 (diff) | |
Begin to rewrite files using #include <sys/stat.h> under the driver model.
struct stat is considered a platform-specific type.
The Unix, Mac OS, and WIN32 platforms define it with #include <sys/stat.h>
Other platforms may do that their own way.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11542 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_System_Driver.H | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/FL/Fl_System_Driver.H b/FL/Fl_System_Driver.H index a46820100..3c85d413d 100644 --- a/FL/Fl_System_Driver.H +++ b/FL/Fl_System_Driver.H @@ -34,6 +34,7 @@ typedef struct CGContext* Fl_Offscreen; typedef struct CGImage* Fl_Bitmask; typedef struct flCocoaRegion* Fl_Region; typedef int FL_SOCKET; +#include <sys/stat.h> #elif defined(WIN32) typedef struct HBITMAP__ *HBITMAP; @@ -45,6 +46,7 @@ typedef unsigned __int64 FL_SOCKET; # else typedef int FL_SOCKET; # endif +#include <sys/stat.h> #elif defined(FL_PORTING) # pragma message "FL_PORTING: define OS-dependent types" @@ -52,12 +54,25 @@ typedef void* Fl_Offscreen; typedef void* Fl_Bitmask; typedef void *Fl_Region; typedef int FL_SOCKET; +# pragma message "FL_PORTING: define struct stat and implement stat() for the platform" +struct stat { // the FLTK source code uses part of the stat() API + unsigned st_mode; + off_t st_size; +}; +#define S_IFMT 0170000 /* type of file */ +#define S_IFIFO 0010000 /* named pipe (fifo) */ +#define S_IFCHR 0020000 /* character special */ +#define S_IFDIR 0040000 /* directory */ +#define S_IFBLK 0060000 /* block special */ +#define S_IFREG 0100000 /* regular */ +#define S_IFLNK 0120000 /* symbolic link */ #else typedef unsigned long Fl_Offscreen; typedef unsigned long Fl_Bitmask; typedef struct _XRegion *Fl_Region; typedef int FL_SOCKET; +#include <sys/stat.h> #endif // __APPLE__ |
