Remove S_IFMT from the public FLTK API
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11609 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
b9564c64cc
commit
53d7191928
@ -66,7 +66,6 @@ struct stat { /* the FLTK source code uses part of the stat() API */
|
||||
unsigned st_mode;
|
||||
unsigned st_size;
|
||||
};
|
||||
#define S_IFMT 0170000 /* type of file */
|
||||
#define S_IFDIR 0040000 /* directory */
|
||||
#define S_IFREG 0100000 /* regular */
|
||||
|
||||
|
@ -1333,7 +1333,7 @@ Fl_File_Chooser::update_preview()
|
||||
} else {
|
||||
struct stat s;
|
||||
if (fl_stat(filename, &s)==0) {
|
||||
if ((s.st_mode&S_IFMT)!=S_IFREG) {
|
||||
if ((s.st_mode & S_IFREG) == 0) {
|
||||
// this is no regular file, probably some kind of device
|
||||
newlabel = "@-3refresh"; // a cross
|
||||
set = 1;
|
||||
|
@ -65,7 +65,7 @@ int Fl_System_Driver::filename_isdir(const char* n) {
|
||||
fn[length] = '\0';
|
||||
n = fn;
|
||||
}
|
||||
return !stat(n, &s) && (s.st_mode & S_IFMT) == S_IFDIR;
|
||||
return !stat(n, &s) && (s.st_mode & S_IFDIR);
|
||||
}
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user