From 792c3c0603f8d4dbadacee8b9e2bdca95be3a322 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sat, 30 Mar 2024 02:31:07 -0400 Subject: [kernel] move errno functions into klibc --- include/rtklibc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/rtklibc.h') diff --git a/include/rtklibc.h b/include/rtklibc.h index dea2fdbb27..9a50c71b88 100644 --- a/include/rtklibc.h +++ b/include/rtklibc.h @@ -25,6 +25,16 @@ int rt_vsnprintf(char *buf, rt_size_t size, const char *fmt, va_list args); int rt_sprintf(char *buf, const char *format, ...); int rt_snprintf(char *buf, rt_size_t size, const char *format, ...); +rt_err_t rt_get_errno(void); +void rt_set_errno(rt_err_t no); +int *_rt_errno(void); +const char *rt_strerror(rt_err_t error); +#if !defined(RT_USING_NEWLIBC) && !defined(_WIN32) +#ifndef errno +#define errno *_rt_errno() +#endif +#endif /* !defined(RT_USING_NEWLIBC) && !defined(_WIN32) */ + /* kstring */ #ifndef RT_KSERVICE_USING_STDLIB_MEMORY -- cgit v1.3.1