From 746f527fac9a8d899c0d077c678c1c467a6b1b49 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sun, 17 Sep 2023 23:20:16 -0400 Subject: [PATCH] [rtdef] adjust RT_USING_SIGNALS defination --- include/rtdef.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/include/rtdef.h b/include/rtdef.h index 6d5b3fab64..972bc78b6a 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -62,12 +62,15 @@ #define RT_USING_LIBC_ISO_ONLY (1) #else #define RT_USING_LIBC_ISO_ONLY (0) -#endif /* !defined(RT_USING_LIBC_ISO_ONLY) && !defined(RT_VER_NUM) */ +#endif /* !defined(RT_USING_LIBC_ISO_ONLY) && !defined(RT_VER_NUM) */ #include #include #include #if !RT_USING_LIBC_ISO_ONLY #include +#if defined(RT_USING_SIGNALS) || defined(RT_USING_SMART) +#include +#endif /* defined(RT_USING_SIGNALS) || defined(RT_USING_SMART) */ #endif /* !RT_USING_LIBC_ISO_ONLY */ #endif /* RT_USING_LIBC */ @@ -639,19 +642,10 @@ typedef struct rt_timer *rt_timer_t; /**@{*/ #ifdef RT_USING_SIGNALS -#include +#define RT_SIG_MAX 32 typedef unsigned long rt_sigset_t; typedef siginfo_t rt_siginfo_t; typedef void (*rt_sighandler_t)(int signo); - -#define RT_SIG_MAX 32 - -#else - -#ifdef RT_USING_SMART -#include -#endif - #endif /* RT_USING_SIGNALS */ /**@}*/