From ff097f0467fb0041817846f2472343b7b9c098c4 Mon Sep 17 00:00:00 2001 From: mysterywolf <920369182@qq.com> Date: Tue, 8 Sep 2020 13:16:49 +0800 Subject: 增加 __GNUC__宏定义 和sconscript的平台识别以避免重复定义 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/libc/libc_errno.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/libc/libc_errno.h') diff --git a/include/libc/libc_errno.h b/include/libc/libc_errno.h index 0f3bc7635a..00c1f733d3 100644 --- a/include/libc/libc_errno.h +++ b/include/libc/libc_errno.h @@ -13,7 +13,7 @@ #include -#if defined(RT_USING_NEWLIB) || defined(_WIN32) +#if defined(RT_USING_NEWLIB) || defined(_WIN32) || defined( __GNUC__ ) /* use errno.h file in toolchains */ #include #endif @@ -45,7 +45,7 @@ defined in armcc/errno.h #define ERROR_BASE_NO 0 #endif -#if !defined(RT_USING_NEWLIB) && !defined(_WIN32) +#if !defined(RT_USING_NEWLIB) && !defined(_WIN32) && !defined(__GNUC__ ) #define EPERM (ERROR_BASE_NO + 1) #define ENOENT (ERROR_BASE_NO + 2) -- cgit v1.3.1