};
#endif
+#ifdef __CYGWIN__
+#define SIG_NAME(x) strsignal(x)
+#else
+#define SIG_NAME(x) sys_signame[x]
+#endif
+
void *
t_malloc(size_t size) {
if (size == 0)
int
get_sig_name(int sig, char *buf) {
- int n = sprintf(buf, "SIG%s", sig < NSIG ? sys_signame[sig] : "unknown");
+ int n = sprintf(buf, "SIG%s", sig < NSIG ? SIG_NAME(sig) : "unknown");
uppercase(buf);
return n;
}
return -1;
}
for (int sig = 1; sig < NSIG; sig++) {
- const char *name = sys_signame[sig];
+ const char *name = SIG_NAME(sig);
if (strcasecmp(name, sig_name + 3) == 0)
return sig;
}