From bfe05aa289054744b68f136b701705cfd242c4de Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 18 May 2020 17:05:05 -0300 Subject: string: Add sigabbrev_np and sigdescr_np The sigabbrev_np returns the abbreviated signal name (e.g. "HUP" for SIGHUP) while sigdescr_np returns the string describing the error number (e.g "Hangup" for SIGHUP). Different than strsignal, sigdescr_np does not attempt to translate the return description and both functions return NULL for an invalid signal number. They should be used instead of sys_siglist or sys_sigabbrev and they are both thread and async-signal safe. They are added as GNU extensions on string.h header (same as strsignal). Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, and s390x-linux-gnu. Tested-by: Carlos O'Donell Reviewed-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/csky/libc.abilist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sysdeps/unix/sysv/linux/csky') diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index ed9222b4c4..0305dfe243 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2101,3 +2101,5 @@ GLIBC_2.32 pthread_attr_setsigmask_np F GLIBC_2.32 pthread_getaffinity_np F GLIBC_2.32 pthread_getattr_np F GLIBC_2.32 pthread_sigmask F +GLIBC_2.32 sigabbrev_np F +GLIBC_2.32 sigdescr_np F -- cgit v1.2.3