* 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.
This commit is contained in:
@@ -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.
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user