Browse Source

Fix compiling warning for Win32.

bernard 8 years ago
parent
commit
0acf441836
2 changed files with 4 additions and 2 deletions
  1. 3 1
      components/dfs/include/dfs_posix.h
  2. 1 1
      include/rtthread.h

+ 3 - 1
components/dfs/include/dfs_posix.h

@@ -34,7 +34,7 @@
 extern "C" {
 #endif
 
-#ifndef RT_USING_NEWLIB
+#if !defined(RT_USING_NEWLIB)
 #define O_RDONLY    DFS_O_RDONLY
 #define O_WRONLY    DFS_O_WRONLY
 #define O_RDWR      DFS_O_RDWR
@@ -46,6 +46,7 @@ extern "C" {
 #define O_BINARY    DFS_O_BINARY
 #define O_DIRECTORY DFS_O_DIRECTORY
 
+#if !defined(_WIN32)
 #define S_IFMT      DFS_S_IFMT
 #define S_IFSOCK    DFS_S_IFSOCK
 #define S_IFLNK     DFS_S_IFLNK 
@@ -80,6 +81,7 @@ extern "C" {
 #define S_IROTH     DFS_S_IROTH
 #define S_IWOTH     DFS_S_IWOTH
 #define S_IXOTH     DFS_S_IXOTH
+#endif
 
 #if defined(__CC_ARM)
 #include <stdio.h>

+ 1 - 1
include/rtthread.h

@@ -507,7 +507,7 @@ rt_device_t rt_console_get_device(void);
 rt_err_t rt_get_errno(void);
 void rt_set_errno(rt_err_t no);
 int *_rt_errno(void);
-#ifndef RT_USING_NEWLIB
+#if !defined(RT_USING_NEWLIB) && !defined(_WIN32)
 #ifndef errno
 #define errno    *_rt_errno()
 #endif