diff options
author | H. Peter Anvin <hpa@zytor.com> | 2005-12-28 09:01:07 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2005-12-28 09:01:07 -0800 |
commit | 73e2a8496a532dc6554a746c06f23d59a699cccb (patch) | |
tree | 959eb43277569f7d6be9650d2085970291bf40e8 | |
parent | 5822262483ba2957baed20b4499649774c44494d (diff) | |
download | klibc-73e2a8496a532dc6554a746c06f23d59a699cccb.tar.gz |
Handle architectures without user-visible real-time signals.klibc-1.1.9
-rw-r--r-- | dash/trap.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/dash/trap.c b/dash/trap.c index 17f9fcefe24db..ffca2130809dc 100644 --- a/dash/trap.c +++ b/dash/trap.c @@ -392,6 +392,7 @@ int decode_signal(const char *string, int minsig) return i; } +#ifdef SIGRTMIN if ( !strncasecmp(string, "RTMIN", 5) ) { if ( string[5] && string[5] != '+' ) return -1; @@ -409,6 +410,7 @@ int decode_signal(const char *string, int minsig) return -1; return i; } +#endif return -1; } @@ -421,13 +423,15 @@ signal_name(int sig) { static char buf[64]; - if ( sig < 0 || sig >= NSIG ) + if ( sig < 0 || sig >= NSIG ) { return NULL; - else if ( sys_sigabbrev[sig] ) + } else if ( sys_sigabbrev[sig] ) { return sys_sigabbrev[sig]; - else if ( sig >= SIGRTMIN && sig <= SIGRTMAX ) { +#ifdef SIGRTMIN + } else if ( sig >= SIGRTMIN && sig <= SIGRTMAX ) { snprintf(buf, sizeof buf, "RTMIN+%d", sig-SIGRTMIN); return buf; +#endif } else { snprintf(buf, sizeof buf, "%d", sig); return buf; |