Browse Source

dfs_elm.c: fix the head file conflicts caused by time.h

prife 12 years ago
parent
commit
157e326487
2 changed files with 4 additions and 3 deletions
  1. 2 0
      bsp/simulator/rtconfig.h
  2. 2 3
      components/dfs/filesystems/elmfat/dfs_elm.c

+ 2 - 0
bsp/simulator/rtconfig.h

@@ -10,6 +10,8 @@
 #undef RT_USING_MINILIBC
 #define NORESOURCE  //RT_VESRION in winuser.h
 #define _CRT_ERRNO_DEFINED  //errno macro redefinition
+#define _INC_WTIME_INL//dfs_elm.c time.h conflicts with wtime.inl
+#define _INC_TIME_INL //dfs_elm.c time.h conflicts with wtime.inl
 
 /* disable some warning in MSC */
 #pragma warning(disable:4273)	/* to ignore: warning C4273: inconsistent dll linkage */

+ 2 - 3
components/dfs/filesystems/elmfat/dfs_elm.c

@@ -17,12 +17,11 @@
  * 2013-03-01     aozima       fixed the stat(st_mtime) issue.
  */
 
-#include <string.h>
-#include <time.h>
-
 #include <rtthread.h>
 #include "ffconf.h"
 #include "ff.h"
+#include <string.h>
+#include <time.h>
 
 /* ELM FatFs provide a DIR struct */
 #define HAVE_DIR_STRUCTURE