mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
common: Fix get_signal_name for GNU/Linux.
* common/signal.c (get_signal_name): Use sigdescr_np if available. * configure.ac: Check the function. -- Backport master commit of: c4ba712736ddeda66055567874d573e79d22666b GnuPG-bug-id: 5568 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
f64e0f63d6
commit
d5f9481186
@ -87,7 +87,9 @@ get_signal_name( int signum )
|
||||
{
|
||||
/* Note that we can't use strsignal(), because it is not
|
||||
reentrant. */
|
||||
#if HAVE_DECL_SYS_SIGLIST && defined(NSIG)
|
||||
#if HAVE_SIGDESCR_NP
|
||||
return sigdescr_np (signum);
|
||||
#elif HAVE_DECL_SYS_SIGLIST && defined(NSIG)
|
||||
return (signum >= 0 && signum < NSIG) ? sys_siglist[signum] : "?";
|
||||
#else
|
||||
return NULL;
|
||||
|
@ -1351,7 +1351,7 @@ AC_C_INLINE
|
||||
AC_C_VOLATILE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_MODE_T
|
||||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_FUNCS([sigdescr_np])
|
||||
AC_DECL_SYS_SIGLIST
|
||||
|
||||
gl_HEADER_SYS_SOCKET
|
||||
|
Loading…
x
Reference in New Issue
Block a user