summaryrefslogtreecommitdiffstats
path: root/winsup/utils
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/ChangeLog6
-rw-r--r--winsup/utils/Makefile.in2
-rw-r--r--winsup/utils/kill.cc12
3 files changed, 17 insertions, 3 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 7a0c80d53..ca410f189 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-09 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * Makefile.in (kill.exe): Remove reliance on libiberty.
+ * kill.cc (strsigno): New function patterned after libiberty but using
+ newly exported cygwin array.
+
2007-06-03 Christopher Faylor <me+cygwin@cgf.cx>
* cygcheck.cc (pathlike): New class.
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in
index b8f86d8b4..10f7d6550 100644
--- a/winsup/utils/Makefile.in
+++ b/winsup/utils/Makefile.in
@@ -166,7 +166,7 @@ else
$(MINGW_CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) -I$(updir) $<
endif
-kill.exe: kill.o $(bupdir1)/libiberty/strsignal.o
+kill.exe: kill.o
ifdef VERBOSE
$(CXX) -o $@ $^ -B$(cygwin_build)/ $(ALL_LDFLAGS) $(KILL_LIB)
else
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)
{