From 8928f4e4b7070d28b885c4af0c6c3a588771d057 Mon Sep 17 00:00:00 2001 From: prife Date: Tue, 26 Feb 2013 16:36:33 +0800 Subject: [PATCH] mingw support for simulator: dfs/dfs_win32 --- bsp/simulator/applications/dfs_win32.c | 16 ++++++++++++++++ bsp/simulator/rtconfig.h | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/bsp/simulator/applications/dfs_win32.c b/bsp/simulator/applications/dfs_win32.c index 121ed39b8..acc8a3cb0 100644 --- a/bsp/simulator/applications/dfs_win32.c +++ b/bsp/simulator/applications/dfs_win32.c @@ -27,6 +27,22 @@ #include #include +#if defined(__MINGW32__) && defined(_NO_OLDNAMES) +#define O_RDONLY _O_RDONLY +#define O_WRONLY _O_WRONLY +#define O_RDWR _O_RDWR +#define O_ACCMODE _O_ACCMODE +#define O_APPEND _O_APPEND +#define O_CREAT _O_CREAT +#define O_TRUNC _O_TRUNC +#define O_EXCL _O_EXCL +#define O_TEXT _O_TEXT +#define O_BINARY _O_BINARY +#define O_TEMPORARY _O_TEMPORARY +#define O_NOINHERIT _O_NOINHERIT +#define O_SEQUENTIAL _O_SEQUENTIAL +#define O_RANDOM _O_RANDOM +#endif /* * RT-Thread DFS Interface for win-directory as an disk device */ diff --git a/bsp/simulator/rtconfig.h b/bsp/simulator/rtconfig.h index 81e8c0d9d..79c90eb1e 100755 --- a/bsp/simulator/rtconfig.h +++ b/bsp/simulator/rtconfig.h @@ -143,7 +143,7 @@ /* DFS: windows share directory mounted to rt-thread/dfs */ /* only used in bsp/simulator */ #ifdef _WIN32 -//#define RT_USING_DFS_WINSHAREDIR +#define RT_USING_DFS_WINSHAREDIR #endif /* the max number of mounted file system */