signal.h: fix compile failed when open TTY_SIGINT

In file included from string/lib_strsignal.c:40:0:
string/lib_strsignal.c: In function ‘strsignal’:
string/lib_strsignal.c:142:12: error: ‘CONFIG_SIG_STOP’ undeclared (first use in this function); did you mean ‘CONFIG_SIG_PIPE’?
       case SIGSTOP:
            ^
string/lib_strsignal.c:142:12: note: each undeclared identifier is reported only once for each function it appears in
string/lib_strsignal.c:147:12: error: ‘CONFIG_SIG_STP’ undeclared (first use in this function); did you mean ‘CONFIG_SIG_STOP’?
       case SIGSTP:

Esnure all standard signal number is always defined

Change-Id: I3abce86079ebeba7bab038d7c770efc90b9cffd7
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd
2020-10-30 16:28:33 +08:00
committed by Alin Jerpelea
parent 30f862f651
commit 2dfd7a4e8f
2 changed files with 38 additions and 16 deletions
+38 -9
View File
@@ -166,17 +166,46 @@
# endif
#endif
#ifdef CONFIG_SIG_SIGSTOP_ACTION
# define SIGSTOP CONFIG_SIG_STOP
# define SIGTSTP CONFIG_SIG_TSTP
# define SIGCONT CONFIG_SIG_CONT
#ifndef CONFIG_SIG_STOP
# define SIGSTOP 6
#else
# define SIGSTOP CONFIG_SIG_STOP
#endif
#ifdef CONFIG_SIG_SIGKILL_ACTION
# define SIGKILL CONFIG_SIG_KILL
# define SIGINT CONFIG_SIG_INT
# define SIGQUIT CONFIG_SIG_QUIT
# define SIGTERM CONFIG_SIG_TERM
#ifndef CONFIG_SIG_TSTP
# define SIGTSTP 7
#else
# define SIGTSTP CONFIG_SIG_TSTP
#endif
#ifndef CONFIG_SIG_CONT
# define SIGCONT 8
#else
# define SIGCONT CONFIG_SIG_CONT
#endif
#ifndef CONFIG_SIG_KILL
# define SIGKILL 9
#else
# define SIGKILL CONFIG_SIG_KILL
#endif
#ifndef CONFIG_SIG_INT
# define SIGINT 10
#else
# define SIGINT CONFIG_SIG_INT
#endif
#ifndef CONFIG_SIG_QUIT
# define SIGQUIT 11
#else
# define SIGQUIT CONFIG_SIG_QUIT
#endif
#ifndef CONFIG_SIG_TERM
# define SIGTERM 12
#else
# define SIGTERM CONFIG_SIG_TERM
#endif
#ifndef CONFIG_SIG_PIPE