Conditionalize use of SIGRTMIN in psiginfo.

This commit is contained in:
Samuel Thibault 2011-02-16 14:41:58 -08:00 committed by Roland McGrath
parent c1d0e639a9
commit f75286c696
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2011-02-16 Samuel Thibault <samuel.thibault@ens-lyon.org>
* stdio-common/psiginfo.c (psiginfo): Check pinfo->si_signo against
SIGRTMIN and SIGRTMAX and print information in that case only when
SIGRTMIN is defined.
2011-02-11 Jakub Jelinek <jakub@redhat.com> 2011-02-11 Jakub Jelinek <jakub@redhat.com>
* stdio-common/printf-parsemb.c (__parse_one_specmb): Handle * stdio-common/printf-parsemb.c (__parse_one_specmb): Handle

View File

@ -86,8 +86,12 @@ psiginfo (const siginfo_t *pinfo, const char *s)
const char *desc; const char *desc;
if (pinfo->si_signo >= 0 && pinfo->si_signo < NSIG if (pinfo->si_signo >= 0 && pinfo->si_signo < NSIG
&& ((desc = INTUSE(_sys_siglist)[pinfo->si_signo]) != NULL && ((desc = INTUSE(_sys_siglist)[pinfo->si_signo]) != NULL
|| (pinfo->si_signo >= SIGRTMIN && pinfo->si_signo < SIGRTMAX))) #ifdef SIGRTMIN
|| (pinfo->si_signo >= SIGRTMIN && pinfo->si_signo < SIGRTMAX)
#endif
))
{ {
#ifdef SIGRTMIN
if (desc == NULL) if (desc == NULL)
{ {
if (pinfo->si_signo - SIGRTMIN < SIGRTMAX - pinfo->si_signo) if (pinfo->si_signo - SIGRTMIN < SIGRTMAX - pinfo->si_signo)
@ -106,6 +110,7 @@ psiginfo (const siginfo_t *pinfo, const char *s)
} }
} }
else else
#endif
fprintf (fp, "%s (", _(desc)); fprintf (fp, "%s (", _(desc));
const char *base = NULL; const char *base = NULL;