Detect sys_sigabbrev[] and use it in place of sys_signame[] if

present.  For some reason glibc does not declare sys_sigabbrev so
we must add an extern definition of our own.
This commit is contained in:
Todd C. Miller
2012-08-28 10:11:38 -04:00
parent af4f02d3e2
commit f44afdc423
4 changed files with 85 additions and 3 deletions

View File

@@ -32,7 +32,13 @@
# define sudo_sys_signame _sys_signame
#elif defined(HAVE_DECL___SYS_SIGNAME) && HAVE_DECL___SYS_SIGNAME == 1
# define sudo_sys_signame __sys_signame
#elif defined(HAVE_DECL_SYS_SIGABBREV) && HAVE_DECL_SYS_SIGABBREV == 1
# define sudo_sys_signame sys_sigabbrev
#else
# ifdef HAVE_SYS_SIGABBREV
/* sys_sigabbrev is not declared by glibc */
# define sudo_sys_signame sys_sigabbrev
# endif
extern const char *const sudo_sys_signame[NSIG];
#endif