Accepting request 830858 from home:Andreas_Schwab:Factory
- strsignal.patch: use strsignal instead of sys_siglist OBS-URL: https://build.opensuse.org/request/show/830858 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/kbuild?expand=0&rev=48
This commit is contained in:
parent
f7ba911e50
commit
3e8da0cdfa
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 31 14:25:14 UTC 2020 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
- strsignal.patch: use strsignal instead of sys_siglist
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 3 05:46:51 UTC 2020 - Martin Liška <mliska@suse.cz>
|
||||
|
||||
|
@ -40,6 +40,7 @@ Patch12: use-alloca.patch
|
||||
Patch13: glob-lstat.patch
|
||||
Patch14: glob-interface.patch
|
||||
Patch15: gcc10-fno-common-fix.patch
|
||||
Patch16: strsignal.patch
|
||||
BuildRequires: automake
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
@ -76,6 +77,7 @@ The goals of the kBuild framework:
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
|
76
strsignal.patch
Normal file
76
strsignal.patch
Normal file
@ -0,0 +1,76 @@
|
||||
------------------------------------------------------------------------
|
||||
r3408 | bird | 2020-08-13 11:01:14 +0200 (Do, 13 Aug 2020) | 1 line
|
||||
|
||||
kash: Don't use sys_siglist, use strsignal instead. Should be present everywhere except when using VC++ on windows.
|
||||
------------------------------------------------------------------------
|
||||
Index: src/kash/jobs.c
|
||||
===================================================================
|
||||
--- src/kash/jobs.c (revision 3407)
|
||||
+++ src/kash/jobs.c (revision 3408)
|
||||
@@ -389,6 +389,7 @@
|
||||
else
|
||||
fmtstr(s + col, 16, "Done");
|
||||
} else {
|
||||
+ const char *pszSigNm;
|
||||
#if JOBS
|
||||
if (WIFSTOPPED(ps->status))
|
||||
st = WSTOPSIG(ps->status);
|
||||
@@ -396,8 +397,9 @@
|
||||
#endif
|
||||
st = WTERMSIG(ps->status);
|
||||
st &= 0x7f;
|
||||
- if (st < NSIG && sys_siglist[st])
|
||||
- scopyn(sys_siglist[st], s + col, 32);
|
||||
+ pszSigNm = st < NSIG ? strsignal(st) : NULL;
|
||||
+ if (pszSigNm)
|
||||
+ scopyn(pszSigNm, s + col, 32);
|
||||
else
|
||||
fmtstr(s + col, 16, "Signal %d", st);
|
||||
if (WCOREDUMP(ps->status)) {
|
||||
Index: src/kash/shinstance.h
|
||||
===================================================================
|
||||
--- src/kash/shinstance.h (revision 3407)
|
||||
+++ src/kash/shinstance.h (revision 3408)
|
||||
@@ -380,12 +380,8 @@
|
||||
# define SIGCONT 20
|
||||
/*# define SIGBREAK 21 */
|
||||
/*# define SIGABRT 22 */
|
||||
-
|
||||
-# define sys_siglist sys_signame
|
||||
+const char *strsignal(int iSig);
|
||||
#endif /* _MSC_VER */
|
||||
-#ifdef __sun__
|
||||
-# define sys_siglist _sys_siglist
|
||||
-#endif
|
||||
#ifndef HAVE_SYS_SIGNAME
|
||||
extern char sys_signame[NSIG][16];
|
||||
#endif
|
||||
Index: src/kash/sys_signame.c
|
||||
===================================================================
|
||||
--- src/kash/sys_signame.c (revision 3407)
|
||||
+++ src/kash/sys_signame.c (revision 3408)
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
void init_sys_signame(void)
|
||||
{
|
||||
- unsigned i;
|
||||
+ unsigned i;
|
||||
if (sys_signame_initialized)
|
||||
return;
|
||||
for (i = 0; i < NSIG; ++i)
|
||||
@@ -119,3 +119,15 @@
|
||||
#undef SET_SIG_STR
|
||||
sys_signame_initialized = 1;
|
||||
}
|
||||
+
|
||||
+#if defined(_MSC_VER)
|
||||
+const char *strsignal(int iSig)
|
||||
+{
|
||||
+ if (!sys_signame_initialized)
|
||||
+ init_sys_signame();
|
||||
+ if (iSig < NSIG)
|
||||
+ return sys_signame(iSig);
|
||||
+ return NULL;
|
||||
+}
|
||||
+#endif
|
||||
+
|
Loading…
x
Reference in New Issue
Block a user