local.h (950B)
1 /* $Id$ */ 2 /* 3 * w3m local.h 4 */ 5 6 #ifndef LOCAL_H 7 #define LOCAL_H 8 9 #include <sys/types.h> 10 #ifdef HAVE_DIRENT_H 11 #include <dirent.h> 12 typedef struct dirent Directory; 13 #else /* not HAVE_DIRENT_H */ 14 #include <sys/dir.h> 15 typedef struct direct Directory; 16 #endif /* not HAVE_DIRENT_H */ 17 #include <sys/stat.h> 18 19 #ifndef S_IFMT 20 #define S_IFMT 0170000 21 #endif /* not S_IFMT */ 22 #ifndef S_IFREG 23 #define S_IFREG 0100000 24 #endif /* not S_IFREG */ 25 26 #define NOT_REGULAR(m) (((m) & S_IFMT) != S_IFREG) 27 #define IS_DIRECTORY(m) (((m) & S_IFMT) == S_IFDIR) 28 29 #ifndef S_ISDIR 30 #ifndef S_IFDIR 31 #define S_IFDIR 0040000 32 #endif /* not S_IFDIR */ 33 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) 34 #endif /* not S_ISDIR */ 35 36 #ifdef HAVE_READLINK 37 #ifndef S_IFLNK 38 #define S_IFLNK 0120000 39 #endif /* not S_IFLNK */ 40 #ifndef S_ISLNK 41 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) 42 #endif /* not S_ISLNK */ 43 #endif /* not HAVE_READLINK */ 44 45 #endif /* not LOCAL_H */