Skip to content

Commit 746f527

Browse files
committed
[rtdef] adjust RT_USING_SIGNALS defination
1 parent a6e9c38 commit 746f527

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

include/rtdef.h

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,15 @@
6262
#define RT_USING_LIBC_ISO_ONLY (1)
6363
#else
6464
#define RT_USING_LIBC_ISO_ONLY (0)
65-
#endif /* !defined(RT_USING_LIBC_ISO_ONLY) && !defined(RT_VER_NUM) */
65+
#endif /* !defined(RT_USING_LIBC_ISO_ONLY) && !defined(RT_VER_NUM) */
6666
#include <stdint.h>
6767
#include <stddef.h>
6868
#include <stdarg.h>
6969
#if !RT_USING_LIBC_ISO_ONLY
7070
#include <sys/types.h>
71+
#if defined(RT_USING_SIGNALS) || defined(RT_USING_SMART)
72+
#include <sys/signal.h>
73+
#endif /* defined(RT_USING_SIGNALS) || defined(RT_USING_SMART) */
7174
#endif /* !RT_USING_LIBC_ISO_ONLY */
7275
#endif /* RT_USING_LIBC */
7376

@@ -639,19 +642,10 @@ typedef struct rt_timer *rt_timer_t;
639642
/**@{*/
640643

641644
#ifdef RT_USING_SIGNALS
642-
#include <sys/signal.h>
645+
#define RT_SIG_MAX 32
643646
typedef unsigned long rt_sigset_t;
644647
typedef siginfo_t rt_siginfo_t;
645648
typedef void (*rt_sighandler_t)(int signo);
646-
647-
#define RT_SIG_MAX 32
648-
649-
#else
650-
651-
#ifdef RT_USING_SMART
652-
#include <sys/signal.h>
653-
#endif
654-
655649
#endif /* RT_USING_SIGNALS */
656650
/**@}*/
657651

0 commit comments

Comments
 (0)