Fix compiling warning for Win32.

This commit is contained in:
bernard 2017-06-06 23:34:01 +08:00
parent 380754f4fd
commit 0acf441836
2 changed files with 4 additions and 2 deletions

View File

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

View File

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