/* Definition of types */
+#ifdef CONFIG_YAFFS_DEFINES_TYPES
typedef unsigned char u8;
typedef unsigned short u16;
-typedef unsigned u32;
+typedef unsigned int u32;
+typedef signed int s32;
+#endif
#ifdef CONFIG_YAFFS_PROVIDE_DEFS
#ifdef CONFIG_YAFFSFS_PROVIDE_VALUES
#ifndef O_RDONLY
-#define O_RDONLY 00
+#define O_RDONLY 00
#endif
#ifndef O_WRONLY
#define O_RDWR 02
#endif
-#ifndef O_CREAT
-#define O_CREAT 0100
+#ifndef O_CREAT
+#define O_CREAT 0100
#endif
#ifndef O_EXCL
#define EACCES 13
#endif
-#ifndef EXDEV
+#ifndef EXDEV
#define EXDEV 18
#endif
#endif
-// Mode flags
+/* Mode flags */
#ifndef S_IFMT
#define S_IFMT 0170000
#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_IREAD
#define S_IREAD 0000400
#endif