diff options
author | Ron Yorston <rmy@pobox.com> | 2021-09-03 13:49:24 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-09-03 13:49:24 +0100 |
commit | 69c261f09e844e5b7434531614a91c30e40925da (patch) | |
tree | 8b4ba07daca53449c906c229cb82d01f21a77fe0 | |
parent | dbde555df62c7a574993424c7162cd5ba2250433 (diff) | |
download | busybox-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.c | 11 |
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 | ||
37 | static const char signals[][7] ALIGN1 = { | 46 | static 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"}, |