[BSP] Fix the WIN32 compiling issue.

rename _errno to __rt_errno for conflict in WIN32.
This commit is contained in:
bernard
2017-11-30 23:56:52 +08:00
parent 2a83353e5f
commit ae7237dc53
12 changed files with 56 additions and 32 deletions

View File

@@ -4,13 +4,18 @@
#ifndef LIBC_FCNTL_H__
#define LIBC_FCNTL_H__
#ifdef RT_USING_NEWLIB
#if defined(RT_USING_NEWLIB) || defined(_WIN32)
#include <fcntl.h>
#ifndef O_NONBLOCK
#define O_NONBLOCK 04000
#endif
#if defined(_WIN32)
#define O_DIRECTORY 0200000
#define O_ACCMODE (_O_RDONLY | _O_WRONLY | _O_RDWR)
#endif
#else
#define O_RDONLY 00
#define O_WRONLY 01