|
@@ -5,18 +5,10 @@
|
|
|
*
|
|
|
* Change Logs:
|
|
|
* Date Author Notes
|
|
|
- * 2016-11-12 Bernard The first version
|
|
|
+ * 2021-05-22 Meco Man The first version.
|
|
|
*/
|
|
|
-
|
|
|
-#ifndef LIBC_ERRNO_H__
|
|
|
-#define LIBC_ERRNO_H__
|
|
|
-
|
|
|
-#include <rtconfig.h>
|
|
|
-
|
|
|
-#if defined(RT_USING_NEWLIB) || defined(_WIN32) || (defined( __GNUC__ ) && !defined(__ARMCC_VERSION))
|
|
|
-/* use errno.h file in toolchains */
|
|
|
-#include <errno.h>
|
|
|
-#endif
|
|
|
+#ifndef _SYS_ERRNO_H
|
|
|
+#define _SYS_ERRNO_H
|
|
|
|
|
|
#if defined(__CC_ARM)
|
|
|
/*
|
|
@@ -29,6 +21,7 @@ defined in armcc/errno.h
|
|
|
#define EINVAL 5
|
|
|
#define ENOMEM 6
|
|
|
*/
|
|
|
+
|
|
|
#define ERROR_BASE_NO 7
|
|
|
|
|
|
#elif defined(__IAR_SYSTEMS_ICC__)
|
|
@@ -41,11 +34,12 @@ defined in armcc/errno.h
|
|
|
#define ERROR_BASE_NO 36
|
|
|
|
|
|
#else
|
|
|
-
|
|
|
#define ERROR_BASE_NO 0
|
|
|
#endif
|
|
|
|
|
|
-#if !defined(RT_USING_NEWLIB) && !defined(_WIN32) && !(defined( __GNUC__ ) && !defined(__ARMCC_VERSION))
|
|
|
+#if !defined(_WIN32)
|
|
|
+
|
|
|
+#include <errno.h>
|
|
|
|
|
|
#define EPERM (ERROR_BASE_NO + 1)
|
|
|
#define ENOENT (ERROR_BASE_NO + 2)
|
|
@@ -200,7 +194,6 @@ defined in armcc/errno.h
|
|
|
#define ENOTRECOVERABLE (ERROR_BASE_NO + 131)
|
|
|
#define ERFKILL (ERROR_BASE_NO + 132)
|
|
|
#define EHWPOISON (ERROR_BASE_NO + 133)
|
|
|
-
|
|
|
#endif
|
|
|
|
|
|
#endif
|