mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
gpg: Use sigdescr_np for newer GNU C library.
* g10/signal.c (got_fatal_signal): 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
c8ad567e7c
commit
467f057ad1
@ -946,6 +946,7 @@ AC_C_INLINE
|
||||
AC_C_VOLATILE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_MODE_T
|
||||
AC_CHECK_FUNCS([sigdescr_np])
|
||||
AC_TYPE_SIGNAL
|
||||
AC_DECL_SYS_SIGLIST
|
||||
|
||||
|
@ -99,7 +99,12 @@ got_fatal_signal( int sig )
|
||||
s = log_get_name(); if( s ) write(2, s, strlen(s) );
|
||||
write(2, ": ", 2 );
|
||||
|
||||
#if HAVE_DECL_SYS_SIGLIST && defined(NSIG)
|
||||
#if HAVE_SIGDESCR_NP
|
||||
s = sigdescr_np (sig);
|
||||
if (!s)
|
||||
s = "?";
|
||||
write (2, s, strlen (s));
|
||||
#elif HAVE_DECL_SYS_SIGLIST && defined(NSIG)
|
||||
s = (sig >= 0 && sig < NSIG) ? sys_siglist[sig] : "?";
|
||||
write (2, s, strlen(s) );
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user