X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fyportenv.h;h=81da08e5c33ba592760cfe5a79b88662ecd06bbe;hp=a797c8ad0a6fc8e75ad57fb0b71bd96b7a672607;hb=5bc32d099123b2e0e5f27f7421caa5413d3211f0;hpb=80f85303d264f804ea288e1995280345804ec01c diff --git a/direct/yportenv.h b/direct/yportenv.h index a797c8a..81da08e 100644 --- a/direct/yportenv.h +++ b/direct/yportenv.h @@ -22,7 +22,9 @@ #ifdef CONFIG_YAFFS_DEFINES_TYPES typedef unsigned char u8; typedef unsigned short u16; -typedef unsigned u32; +typedef unsigned int u32; +typedef unsigned long long u64; +typedef signed int s32; #endif @@ -94,7 +96,7 @@ struct iattr { #ifdef CONFIG_YAFFSFS_PROVIDE_VALUES #ifndef O_RDONLY -#define O_RDONLY 00 +#define O_RDONLY 00 #endif #ifndef O_WRONLY @@ -105,8 +107,8 @@ struct iattr { #define O_RDWR 02 #endif -#ifndef O_CREAT -#define O_CREAT 0100 +#ifndef O_CREAT +#define O_CREAT 0100 #endif #ifndef O_EXCL @@ -157,7 +159,7 @@ struct iattr { #define EACCES 13 #endif -#ifndef EXDEV +#ifndef EXDEV #define EXDEV 18 #endif @@ -214,7 +216,7 @@ struct iattr { #endif -// Mode flags +/* Mode flags */ #ifndef S_IFMT #define S_IFMT 0170000 @@ -248,16 +250,42 @@ struct iattr { #define S_IFREG 0100000 #endif +#ifndef S_ISSOCK #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) +#endif +#ifndef S_ISLNK #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) +#endif +#ifndef S_ISDIR #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif +#ifndef S_ISREG #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif +#ifndef S_ISBLK #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) +#endif +#ifndef S_ISCHR #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) +#endif +#ifndef S_ISFIFO #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) +#endif -#ifndef S_IREAD +#ifndef S_IRUSR +#define S_IRUSR 0000400 +#endif + +#ifndef S_IWUSR +#define S_IWUSR 0000200 +#endif + +#ifndef S_IXUSR +#define S_IXUSR 0000100 +#endif + +#ifndef S_IREAD #define S_IREAD 0000400 #endif @@ -269,6 +297,16 @@ struct iattr { #define S_IEXEC 0000100 #endif + +#else +#include +#include +#include +#endif + +#endif + +/* Create some less common define values if they don't exist */ #ifndef XATTR_CREATE #define XATTR_CREATE 1 #endif @@ -284,12 +322,8 @@ struct iattr { #define F_OK 0 #endif -#else -#include -#include -#include -#endif - +#ifndef S_ISSOCK +#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) #endif #ifndef Y_DUMP_STACK