aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-09-03 13:49:24 +0100
committerRon Yorston <rmy@pobox.com>2021-09-03 13:49:24 +0100
commit69c261f09e844e5b7434531614a91c30e40925da (patch)
tree8b4ba07daca53449c906c229cb82d01f21a77fe0
parentdbde555df62c7a574993424c7162cd5ba2250433 (diff)
downloadbusybox-w32-69c261f09e844e5b7434531614a91c30e40925da.tar.gz
busybox-w32-69c261f09e844e5b7434531614a91c30e40925da.tar.bz2
busybox-w32-69c261f09e844e5b7434531614a91c30e40925da.zip
libbb: code shrink u_signal_names.c
Reduce amount of wasted space in the signals[][] array. Saves 48 bytes.
-rw-r--r--libbb/u_signal_names.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libbb/u_signal_names.c b/libbb/u_signal_names.c
index 036ad0038..ef2b6f891 100644
--- a/libbb/u_signal_names.c
+++ b/libbb/u_signal_names.c
@@ -31,10 +31,19 @@
31# undef SIGPIPE 31# undef SIGPIPE
32#endif 32#endif
33 33
34#if ENABLE_PLATFORM_POSIX || defined(SIGSTKFLT) || defined(SIGVTALRM)
35# define SIGLEN 7
36#elif defined(SIGWINCH) || (ENABLE_FEATURE_RTMINMAX && \
37 !ENABLE_FEATURE_RTMINMAX_USE_LIBC_DEFINITIONS && defined(__SIGRTMIN))
38# define SIGLEN 6
39#else
40# define SIGLEN 5
41#endif
42
34/* Believe it or not, but some arches have more than 32 SIGs! 43/* Believe it or not, but some arches have more than 32 SIGs!
35 * HPPA: SIGSTKFLT == 36. */ 44 * HPPA: SIGSTKFLT == 36. */
36 45
37static const char signals[][7] ALIGN1 = { 46static const char signals[][SIGLEN] ALIGN1 = {
38 // SUSv3 says kill must support these, and specifies the numerical values, 47 // SUSv3 says kill must support these, and specifies the numerical values,
39 // http://www.opengroup.org/onlinepubs/009695399/utilities/kill.html 48 // http://www.opengroup.org/onlinepubs/009695399/utilities/kill.html
40 // {0, "EXIT"}, {1, "HUP"}, {2, "INT"}, {3, "QUIT"}, 49 // {0, "EXIT"}, {1, "HUP"}, {2, "INT"}, {3, "QUIT"},