diff options
| author | Meco Man <[email protected]> | 2024-03-30 02:31:07 -0400 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2024-04-20 00:57:17 -0400 |
| commit | 792c3c0603f8d4dbadacee8b9e2bdca95be3a322 (patch) | |
| tree | 7edc8f135fa1660471c2dbfb8f607f9cc45bcfbf /include | |
| parent | 52f39d1edf8756dae06fc6a3b0bd7666f22dc764 (diff) | |
[kernel] move errno functions into klibc
Diffstat (limited to 'include')
| -rw-r--r-- | include/rtklibc.h | 10 | ||||
| -rw-r--r-- | include/rtthread.h | 10 |
2 files changed, 10 insertions, 10 deletions
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 diff --git a/include/rtthread.h b/include/rtthread.h index c8993dd7e6..5e70c5dd63 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -728,16 +728,6 @@ rt_device_t rt_console_get_device(void); #endif /* RT_USING_THREADSAFE_PRINTF */ #endif /* defined(RT_USING_DEVICE) && defined(RT_USING_CONSOLE) */ -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) */ - int __rt_ffs(int value); void rt_show_version(void); |
