diff options
author | Charles Manning <cdhmanning@gmail.com> | 2011-09-21 17:00:00 +1200 |
---|---|---|
committer | Charles Manning <cdhmanning@gmail.com> | 2011-09-21 17:03:42 +1200 |
commit | d43e901b5bf74d8d40dda18f0d5da15c76245510 (patch) | |
tree | 855a386eea3e29108addc4e26b3b447c51aa623b /direct | |
parent | e68d2bde85a54e27f0463662619411c5fe20cc4b (diff) |
Remove dependencies on sys/stat.h when yaffs provides values.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
Diffstat (limited to 'direct')
-rw-r--r-- | direct/yportenv.h | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/direct/yportenv.h b/direct/yportenv.h index 939cd3a..0d0d0fa 100644 --- a/direct/yportenv.h +++ b/direct/yportenv.h @@ -24,11 +24,6 @@ typedef unsigned short u16; typedef unsigned u32; -#ifndef WIN32 -#include <sys/stat.h> -#endif - - #ifdef CONFIG_YAFFS_PROVIDE_DEFS /* File types */ @@ -44,10 +39,6 @@ typedef unsigned u32; #define DT_WHT 14 -#ifndef WIN32 -#include <sys/stat.h> -#endif - /* * Attribute flags. * These are or-ed together to select what has been changed. @@ -227,6 +218,22 @@ struct iattr { #define S_IFMT 0170000 #endif +#ifndef S_IFSOCK +#define S_IFSOCK 0140000 +#endif + +#ifndef S_IFIFO +#define S_IFIFO 0010000 +#endif + +#ifndef S_IFCHR +#define S_IFCHR 0020000 +#endif + +#ifndef S_IFBLK +#define S_IFBLK 0060000 +#endif + #ifndef S_IFLNK #define S_IFLNK 0120000 #endif @@ -239,6 +246,15 @@ struct iattr { #define S_IFREG 0100000 #endif +#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) +#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) +#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) +#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) + + #ifndef S_IREAD #define S_IREAD 0000400 #endif |