* 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:
parent
0c1207099c
commit
5c8891e962
@ -1,3 +1,11 @@
|
|||||||
|
2007-07-09 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
|
* strsig.cc (__signals): New macro.
|
||||||
|
(sys_sigabbrev): New array of signal strings, patterned after linux.
|
||||||
|
(siglist): Use __signals.
|
||||||
|
* include/cygwin/signal.h (sys_sigabbrev): Define.
|
||||||
|
* include/cygwin/version.h: Bump API minor version to 177.
|
||||||
|
|
||||||
2007-07-09 Corinna Vinschen <corinna@vinschen.de>
|
2007-07-09 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* dir.cc (closedir): Revert change from 2007-06-29.
|
* dir.cc (closedir): Revert change from 2007-06-29.
|
||||||
|
@ -269,6 +269,8 @@ _sig_func_ptr sigset (int, _sig_func_ptr);
|
|||||||
|
|
||||||
int sigqueue(pid_t, int, const union sigval);
|
int sigqueue(pid_t, int, const union sigval);
|
||||||
int siginterrupt (int, int);
|
int siginterrupt (int, int);
|
||||||
|
extern const char __declspec(dllimport) *sys_sigabbrev[];
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -317,12 +317,13 @@ details. */
|
|||||||
174: Export stpcpy, stpncpy.
|
174: Export stpcpy, stpncpy.
|
||||||
175: Export fdopendir.
|
175: Export fdopendir.
|
||||||
176: Export wcstol, wcstoll, wcstoul, wcstoull, wcsxfrm.
|
176: Export wcstol, wcstoll, wcstoul, wcstoull, wcsxfrm.
|
||||||
|
177: Export sys_sigabbrev
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
||||||
|
|
||||||
#define CYGWIN_VERSION_API_MAJOR 0
|
#define CYGWIN_VERSION_API_MAJOR 0
|
||||||
#define CYGWIN_VERSION_API_MINOR 176
|
#define CYGWIN_VERSION_API_MINOR 177
|
||||||
|
|
||||||
/* There is also a compatibity version number associated with the
|
/* There is also a compatibity version number associated with the
|
||||||
shared memory regions. It is incremented when incompatible
|
shared memory regions. It is incremented when incompatible
|
||||||
|
@ -23,44 +23,58 @@ struct sigdesc
|
|||||||
const char *str;
|
const char *str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define __signals \
|
||||||
|
_s(SIGHUP, "Hangup"), /* 1 */ \
|
||||||
|
_s(SIGINT, "Interrupt"), /* 2 */ \
|
||||||
|
_s(SIGQUIT, "Quit"), /* 3 */ \
|
||||||
|
_s(SIGILL, "Illegal instruction"), /* 4 */ \
|
||||||
|
_s(SIGTRAP, "Trace/breakpoint trap"), /* 5 */ \
|
||||||
|
_s(SIGABRT, "Aborted"), /* 6 */ \
|
||||||
|
_s(SIGEMT, "EMT instruction"), /* 7 */ \
|
||||||
|
_s(SIGFPE, "Floating point exception"), /* 8 */ \
|
||||||
|
_s(SIGKILL, "Killed"), /* 9 */ \
|
||||||
|
_s(SIGBUS, "Bus error"), /* 10 */ \
|
||||||
|
_s(SIGSEGV, "Segmentation fault"), /* 11 */ \
|
||||||
|
_s(SIGSYS, "Bad system call"), /* 12 */ \
|
||||||
|
_s(SIGPIPE, "Broken pipe"), /* 13 */ \
|
||||||
|
_s(SIGALRM, "Alarm clock"), /* 14 */ \
|
||||||
|
_s(SIGTERM, "Terminated"), /* 15 */ \
|
||||||
|
_s(SIGURG, "Urgent I/O condition"), /* 16 */ \
|
||||||
|
_s(SIGSTOP, "Stopped (signal)"), /* 17 */ \
|
||||||
|
_s(SIGTSTP, "Stopped"), /* 18 */ \
|
||||||
|
_s(SIGCONT, "Continued"), /* 19 */ \
|
||||||
|
_s2(SIGCHLD, "Child exited", /* 20 */ \
|
||||||
|
SIGCLD, "Child exited"), \
|
||||||
|
_s(SIGTTIN, "Stopped (tty input)"), /* 21 */ \
|
||||||
|
_s(SIGTTOU, "Stopped (tty output)"), /* 22 */ \
|
||||||
|
_s2(SIGIO, "I/O possible", /* 23 */ \
|
||||||
|
SIGPOLL, "I/O possible"), \
|
||||||
|
_s(SIGXCPU, "CPU time limit exceeded"), /* 24 */ \
|
||||||
|
_s(SIGXFSZ, "File size limit exceeded"), /* 25 */ \
|
||||||
|
_s(SIGVTALRM, "Virtual timer expired"), /* 26 */ \
|
||||||
|
_s(SIGPROF, "Profiling timer expired"), /* 27 */ \
|
||||||
|
_s(SIGWINCH, "Window changed"), /* 28 */ \
|
||||||
|
_s(SIGLOST, "Resource lost"), /* 29 */ \
|
||||||
|
_s(SIGUSR1, "User defined signal 1"), /* 30 */ \
|
||||||
|
_s(SIGUSR2, "User defined signal 2"), /* 31 */ \
|
||||||
|
_s2(SIGRTMIN, "Real-time signal 0", /* 32 */ \
|
||||||
|
SIGRTMAX, "Real-time signal 0")
|
||||||
|
|
||||||
|
#define _s(n, s) #n
|
||||||
|
#define _s2(n, s, n1, s1) #n
|
||||||
|
const char __declspec(dllexport) * sys_sigabbrev[] NO_COPY_INIT =
|
||||||
|
{
|
||||||
|
NULL,
|
||||||
|
__signals
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef _s
|
||||||
|
#undef _s2
|
||||||
#define _s(n, s) {n, #n, s}
|
#define _s(n, s) {n, #n, s}
|
||||||
|
#define _s2(n, s, n1, s1) {n, #n, s}, {n, #n1, #s1}
|
||||||
static const sigdesc siglist[] =
|
static const sigdesc siglist[] =
|
||||||
{
|
{
|
||||||
_s(SIGHUP, "Hangup"),
|
__signals,
|
||||||
_s(SIGINT, "Interrupt"),
|
|
||||||
_s(SIGQUIT, "Quit"),
|
|
||||||
_s(SIGILL, "Illegal instruction"),
|
|
||||||
_s(SIGTRAP, "Trace/breakpoint trap"),
|
|
||||||
_s(SIGABRT, "Aborted"),
|
|
||||||
_s(SIGEMT, "EMT instruction"),
|
|
||||||
_s(SIGFPE, "Floating point exception"),
|
|
||||||
_s(SIGKILL, "Killed"),
|
|
||||||
_s(SIGBUS, "Bus error"),
|
|
||||||
_s(SIGSEGV, "Segmentation fault"),
|
|
||||||
_s(SIGSYS, "Bad system call"),
|
|
||||||
_s(SIGPIPE, "Broken pipe"),
|
|
||||||
_s(SIGALRM, "Alarm clock"),
|
|
||||||
_s(SIGTERM, "Terminated"),
|
|
||||||
_s(SIGURG, "Urgent I/O condition"),
|
|
||||||
_s(SIGSTOP, "Stopped (signal)"),
|
|
||||||
_s(SIGTSTP, "Stopped"),
|
|
||||||
_s(SIGCONT, "Continued"),
|
|
||||||
_s(SIGCHLD, "Child exited"),
|
|
||||||
_s(SIGCLD, "Child exited"),
|
|
||||||
_s(SIGTTIN, "Stopped (tty input)"),
|
|
||||||
_s(SIGTTOU, "Stopped (tty output)"),
|
|
||||||
_s(SIGIO, "I/O possible"),
|
|
||||||
_s(SIGPOLL, "I/O possible"),
|
|
||||||
_s(SIGXCPU, "CPU time limit exceeded"),
|
|
||||||
_s(SIGXFSZ, "File size limit exceeded"),
|
|
||||||
_s(SIGVTALRM, "Virtual timer expired"),
|
|
||||||
_s(SIGPROF, "Profiling timer expired"),
|
|
||||||
_s(SIGWINCH, "Window changed"),
|
|
||||||
_s(SIGLOST, "Resource lost"),
|
|
||||||
_s(SIGUSR1, "User defined signal 1"),
|
|
||||||
_s(SIGUSR2, "User defined signal 2"),
|
|
||||||
_s(SIGRTMIN, "Real-time signal 0"),
|
|
||||||
_s(SIGRTMAX, "Real-time signal 0"),
|
|
||||||
{0, NULL, NULL}
|
{0, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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>
|
2007-06-03 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
* cygcheck.cc (pathlike): New class.
|
* cygcheck.cc (pathlike): New class.
|
||||||
|
@ -166,7 +166,7 @@ else
|
|||||||
$(MINGW_CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) -I$(updir) $<
|
$(MINGW_CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) -I$(updir) $<
|
||||||
endif
|
endif
|
||||||
|
|
||||||
kill.exe: kill.o $(bupdir1)/libiberty/strsignal.o
|
kill.exe: kill.o
|
||||||
ifdef VERBOSE
|
ifdef VERBOSE
|
||||||
$(CXX) -o $@ $^ -B$(cygwin_build)/ $(ALL_LDFLAGS) $(KILL_LIB)
|
$(CXX) -o $@ $^ -B$(cygwin_build)/ $(ALL_LDFLAGS) $(KILL_LIB)
|
||||||
else
|
else
|
||||||
|
@ -34,8 +34,6 @@ static struct option longopts[] =
|
|||||||
|
|
||||||
static char opts[] = "hl::fs:v";
|
static char opts[] = "hl::fs:v";
|
||||||
|
|
||||||
extern "C" const char *strsigno (int);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage (FILE *where = stderr)
|
usage (FILE *where = stderr)
|
||||||
{
|
{
|
||||||
@ -76,6 +74,16 @@ Compiled on %s\n\
|
|||||||
", prog_name, len, v, __DATE__);
|
", 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
|
static int
|
||||||
getsig (const char *in_sig)
|
getsig (const char *in_sig)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user