X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=direct%2Fyportenv.h;h=5a79f93583b963d715b0dee9a0b533363c1511e1;hb=ebc54da9e29be1de79d77c72c0d8eb91833c641b;hp=526b38df41b2c1dde3629b4b09eb9f6ff2a26f8d;hpb=319d4f76f0e10d1d6427120221237950e373d74b;p=yaffs2.git diff --git a/direct/yportenv.h b/direct/yportenv.h index 526b38d..5a79f93 100644 --- a/direct/yportenv.h +++ b/direct/yportenv.h @@ -1,8 +1,7 @@ /* * YAFFS: Yet another Flash File System . A NAND-flash specific file system. * - * Copyright (C) 2002-2011 Aleph One Ltd. - * for Toby Churchill Ltd and Brightstar Engineering + * Copyright (C) 2002-2018 Aleph One Ltd. * * Created by Charles Manning * @@ -18,15 +17,34 @@ #define __YPORTENV_H__ +#ifdef __rtems__ + +#include +#include +#include +#include + +#define CONFIG_YAFFS_DIRECT 1 +#define CONFIG_YAFFS_SHORT_NAMES_IN_RAM 1 +#define CONFIG_YAFFS_YAFFS2 1 +#define CONFIG_YAFFS_PROVIDE_DEFS 1 +#define CONFIG_YAFFSFS_PROVIDE_VALUES 1 +#define CONFIG_YAFFS_DEFINES_TYPES 1 +#define CONFIG_YAFFS_USE_32_BIT_TIME_T 1 +#define NO_Y_INLINE 1 +#define loff_t off_t + +#endif /* __rtems__ */ + /* Definition of types */ #ifdef CONFIG_YAFFS_DEFINES_TYPES typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; +typedef unsigned long long u64; typedef signed int s32; #endif - #ifdef CONFIG_YAFFS_PROVIDE_DEFS /* File types */ @@ -272,6 +290,17 @@ struct iattr { #endif +#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 @@ -285,6 +314,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 @@ -300,12 +339,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