diff --git a/components/dfs/include/dfs_def.h b/components/dfs/include/dfs_def.h index 0f75a5162b3ffc68d96d6b368cdfe42b15e602bf..7e954d749cc3d6eae08ad901a6ba4d1340ce6887 100644 --- a/components/dfs/include/dfs_def.h +++ b/components/dfs/include/dfs_def.h @@ -23,7 +23,7 @@ * 2004-10-14 Beranard Clean up the code. * 2005-01-22 Beranard Clean up the code, port to MinGW */ - + #ifndef __DFS_DEF_H__ #define __DFS_DEF_H__ @@ -70,7 +70,7 @@ #define dfs_log(level, x) #endif -#if defined(RT_USING_NEWLIB) +#if defined(RT_USING_NEWLIB) #include #include /* used for struct stat */ #include /* used for struct statfs */ @@ -108,6 +108,10 @@ #define DFS_O_EXCL O_EXCL #define DFS_O_TRUNC O_TRUNC #define DFS_O_APPEND O_APPEND + +#ifndef O_DIRECTORY +#define O_DIRECTORY 0x0200000 +#endif #define DFS_O_DIRECTORY O_DIRECTORY /* Seek flags */ diff --git a/components/libc/newlib/sys/fcntl.h b/components/libc/newlib/sys/fcntl.h deleted file mode 100644 index 499c67260e09356a5107da2173a02811b31e04bf..0000000000000000000000000000000000000000 --- a/components/libc/newlib/sys/fcntl.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef __RTT_FCNTL_H__ -#define __RTT_FCNTL_H__ - -/* Operation flags */ -#define O_RDONLY 0x0000000 -#define O_WRONLY 0x0000001 -#define O_RDWR 0x0000002 -#define O_ACCMODE 0x0000003 -#define O_CREAT 0x0000100 -#define O_EXCL 0x0000200 -#define O_TRUNC 0x0001000 -#define O_APPEND 0x0002000 -#define O_DIRECTORY 0x0200000 -#define O_BINARY 0x0008000 - -#endif