diff options
author | Christopher Faylor <me@cgf.cx> | 2007-07-10 04:12:54 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2007-07-10 04:12:54 +0400 |
commit | 5c8891e9624d80b5b85ce485c0c1616993c3e8f0 (patch) | |
tree | a92e37b1876b43d2ca1fddee8dbcdcd01913f69c /winsup/utils/kill.cc | |
parent | 0c1207099c998787731e9741d6e18bba962e9f3f (diff) |
* cygwin/strsig.cc (__signals): New macro.
(sys_sigabbrev): New array of signal strings, patterned after linux.
(siglist): Use __signals.
* cygwin/include/cygwin/signal.h (sys_sigabbrev): Define.
* cygwin/include/cygwin/version.h: Bump API minor version to 177.
* utils/Makefile.in (kill.exe): Remove reliance on libiberty.
* utils/kill.cc (strsigno): New function patterned after libiberty but using
newly exported cygwin array.
Diffstat (limited to 'winsup/utils/kill.cc')
-rw-r--r-- | winsup/utils/kill.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/winsup/utils/kill.cc b/winsup/utils/kill.cc index 2ff41545c..f43ef7762 100644 --- a/winsup/utils/kill.cc +++ b/winsup/utils/kill.cc @@ -34,8 +34,6 @@ static struct option longopts[] = static char opts[] = "hl::fs:v"; -extern "C" const char *strsigno (int); - static void usage (FILE *where = stderr) { @@ -76,6 +74,16 @@ Compiled on %s\n\ ", prog_name, len, v, __DATE__); } +static const char * +strsigno (int signo) +{ + if (signo >= 0 && signo < NSIG) + return sys_sigabbrev[signo]; + static char buf[sizeof ("Unknown signal") + 32]; + sprintf (buf, "Unknown signal %d", signo); + return buf; +} + static int getsig (const char *in_sig) { |