projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some changes to get VxWorks wrapper working
[yaffs2.git]
/
direct
/
yportenv.h
diff --git
a/direct/yportenv.h
b/direct/yportenv.h
index 0d0d0faa2cf6ca04f4b5340830deaa74e2df3b35..8a5cb4e8edefad764e9705fc145fef610e745ebc 100644
(file)
--- a/
direct/yportenv.h
+++ b/
direct/yportenv.h
@@
-19,9
+19,12
@@
/* Definition of types */
/* Definition of types */
+#ifdef CONFIG_YAFFS_DEFINES_TYPES
typedef unsigned char u8;
typedef unsigned short u16;
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_YAFFS_PROVIDE_DEFS
@@
-92,7
+95,7
@@
struct iattr {
#ifdef CONFIG_YAFFSFS_PROVIDE_VALUES
#ifndef O_RDONLY
#ifdef CONFIG_YAFFSFS_PROVIDE_VALUES
#ifndef O_RDONLY
-#define O_RDONLY
00
+#define O_RDONLY 00
#endif
#ifndef O_WRONLY
#endif
#ifndef O_WRONLY
@@
-103,8
+106,8
@@
struct iattr {
#define O_RDWR 02
#endif
#define O_RDWR 02
#endif
-#ifndef O_CREAT
-#define O_CREAT 0100
+#ifndef O_CREAT
+#define O_CREAT
0100
#endif
#ifndef O_EXCL
#endif
#ifndef O_EXCL
@@
-155,7
+158,7
@@
struct iattr {
#define EACCES 13
#endif
#define EACCES 13
#endif
-#ifndef EXDEV
+#ifndef EXDEV
#define EXDEV 18
#endif
#define EXDEV 18
#endif
@@
-212,7
+215,7
@@
struct iattr {
#endif
#endif
-/
/ Mode flags
+/
* Mode flags */
#ifndef S_IFMT
#define S_IFMT 0170000
#ifndef S_IFMT
#define S_IFMT 0170000
@@
-246,27
+249,51
@@
struct iattr {
#define S_IFREG 0100000
#endif
#define S_IFREG 0100000
#endif
+#ifndef S_ISSOCK
#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+#endif
+#ifndef S_ISLNK
#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#endif
+#ifndef S_ISDIR
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#endif
+#ifndef S_ISREG
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+#ifndef S_ISBLK
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#endif
+#ifndef S_ISCHR
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#endif
+#ifndef S_ISFIFO
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#endif
+
-#ifndef S_IR
EAD
-#define S_IR
EAD
0000400
+#ifndef S_IR
USR
+#define S_IR
USR
0000400
#endif
#endif
-#ifndef S_IW
RITE
-#define S_IW
RITE
0000200
+#ifndef S_IW
USR
+#define S_IW
USR
0000200
#endif
#ifndef S_IEXEC
#define S_IEXEC 0000100
#endif
#endif
#ifndef S_IEXEC
#define S_IEXEC 0000100
#endif
+#else
+#include <errno.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#endif
+
+#endif
+
+/* Create some less common define values if they don't exist */
#ifndef XATTR_CREATE
#define XATTR_CREATE 1
#endif
#ifndef XATTR_CREATE
#define XATTR_CREATE 1
#endif
@@
-282,12
+309,8
@@
struct iattr {
#define F_OK 0
#endif
#define F_OK 0
#endif
-#else
-#include <errno.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#endif
-
+#ifndef S_ISSOCK
+#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
#endif
#ifndef Y_DUMP_STACK
#endif
#ifndef Y_DUMP_STACK