X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=support%2Fmksignames.c;h=6b3196e97010c29b4cfe49a7d2fd55cf7a9aa301;hb=28ef6c316f1aff914bb95ac09787a3c83c1815fd;hp=cfc3508d09c8b4a5fe5cce8ad87e3ba1d65d14bf;hpb=bb70624e964126b7ac4ff085ba163a9c35ffa18f;p=platform%2Fupstream%2Fbash.git diff --git a/support/mksignames.c b/support/mksignames.c index cfc3508..6b3196e 100644 --- a/support/mksignames.c +++ b/support/mksignames.c @@ -34,8 +34,19 @@ char *signal_names[2 * NSIG]; +#define signal_names_size (sizeof(signal_names)/sizeof(signal_names[0])) + char *progname; +/* AIX 4.3 defines SIGRTMIN and SIGRTMAX as 888 and 999 respectively. + I don't want to allocate so much unused space for the intervening signal + numbers, so we just punt if SIGRTMAX is past the bounds of the + signal_names array (handled in configure). */ +#if defined (SIGRTMAX) && defined (UNUSABLE_RT_SIGNALS) +# undef SIGRTMAX +# undef SIGRTMIN +#endif + #if defined (SIGRTMAX) || defined (SIGRTMIN) # define RTLEN 14 # define RTLIM 256 @@ -49,7 +60,7 @@ initialize_signames () int rtmin, rtmax, rtcnt; #endif - for (i = 1; i < sizeof(signal_names)/sizeof(signal_names[0]); i++) + for (i = 1; i < signal_names_size; i++) signal_names[i] = (char *)NULL; /* `signal' 0 is what we do on exit. */