diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-12 20:58:27 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-12 20:58:27 +0000 |
commit | 6ca409e0e4c198fe3081346eebbae3f068fe605a (patch) | |
tree | 060cb05d99220a1eda399194d1209c269f0e8cd8 /coreutils | |
parent | 4185548984357df91311f30c8e43d95f33922576 (diff) | |
download | busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.gz busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.bz2 busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.zip |
trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount
of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts
size saving: 0.5k
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/cal.c | 4 | ||||
-rw-r--r-- | coreutils/cut.c | 4 | ||||
-rw-r--r-- | coreutils/date.c | 5 | ||||
-rw-r--r-- | coreutils/dd.c | 4 | ||||
-rw-r--r-- | coreutils/df.c | 3 | ||||
-rw-r--r-- | coreutils/du.c | 4 | ||||
-rw-r--r-- | coreutils/env.c | 2 | ||||
-rw-r--r-- | coreutils/expr.c | 2 | ||||
-rw-r--r-- | coreutils/head.c | 4 | ||||
-rw-r--r-- | coreutils/install.c | 2 | ||||
-rw-r--r-- | coreutils/ls.c | 5 | ||||
-rw-r--r-- | coreutils/mkdir.c | 2 | ||||
-rw-r--r-- | coreutils/mknod.c | 2 | ||||
-rw-r--r-- | coreutils/mv.c | 5 | ||||
-rw-r--r-- | coreutils/od.c | 6 | ||||
-rw-r--r-- | coreutils/od_bloaty.c | 34 | ||||
-rw-r--r-- | coreutils/sort.c | 2 | ||||
-rw-r--r-- | coreutils/stat.c | 8 | ||||
-rw-r--r-- | coreutils/stty.c | 58 | ||||
-rw-r--r-- | coreutils/tail.c | 2 | ||||
-rw-r--r-- | coreutils/tr.c | 2 | ||||
-rw-r--r-- | coreutils/uname.c | 4 | ||||
-rw-r--r-- | coreutils/uniq.c | 2 |
23 files changed, 85 insertions, 81 deletions
diff --git a/coreutils/cal.c b/coreutils/cal.c index f8fc0b0d3..37aca00bb 100644 --- a/coreutils/cal.c +++ b/coreutils/cal.c | |||
@@ -30,11 +30,11 @@ | |||
30 | #define MAXDAYS 42 /* max slots in a month array */ | 30 | #define MAXDAYS 42 /* max slots in a month array */ |
31 | #define SPACE -1 /* used in day array */ | 31 | #define SPACE -1 /* used in day array */ |
32 | 32 | ||
33 | static const unsigned char days_in_month[] = { | 33 | static const unsigned char days_in_month[] ALIGN1 = { |
34 | 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 | 34 | 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static const unsigned char sep1752[] = { | 37 | static const unsigned char sep1752[] ALIGN1 = { |
38 | 1, 2, 14, 15, 16, | 38 | 1, 2, 14, 15, 16, |
39 | 17, 18, 19, 20, 21, 22, 23, | 39 | 17, 18, 19, 20, 21, 22, 23, |
40 | 24, 25, 26, 27, 28, 29, 30 | 40 | 24, 25, 26, 27, 28, 29, 30 |
diff --git a/coreutils/cut.c b/coreutils/cut.c index 435b21070..2598a9a7c 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | 16 | ||
17 | /* option vars */ | 17 | /* option vars */ |
18 | static const char optstring[] = "b:c:f:d:sn"; | 18 | static const char optstring[] ALIGN1 = "b:c:f:d:sn"; |
19 | #define CUT_OPT_BYTE_FLGS (1<<0) | 19 | #define CUT_OPT_BYTE_FLGS (1<<0) |
20 | #define CUT_OPT_CHAR_FLGS (1<<1) | 20 | #define CUT_OPT_CHAR_FLGS (1<<1) |
21 | #define CUT_OPT_FIELDS_FLGS (1<<2) | 21 | #define CUT_OPT_FIELDS_FLGS (1<<2) |
@@ -163,7 +163,7 @@ static void cut_file(FILE * file) | |||
163 | } | 163 | } |
164 | } | 164 | } |
165 | 165 | ||
166 | static const char _op_on_field[] = " only when operating on fields"; | 166 | static const char _op_on_field[] ALIGN1 = " only when operating on fields"; |
167 | 167 | ||
168 | int cut_main(int argc, char **argv); | 168 | int cut_main(int argc, char **argv); |
169 | int cut_main(int argc, char **argv) | 169 | int cut_main(int argc, char **argv) |
diff --git a/coreutils/date.c b/coreutils/date.c index 5e2bcee3b..5ee70f703 100644 --- a/coreutils/date.c +++ b/coreutils/date.c | |||
@@ -63,8 +63,9 @@ int date_main(int argc, char **argv) | |||
63 | if (!isofmt_arg) { | 63 | if (!isofmt_arg) { |
64 | ifmt = 0; /* default is date */ | 64 | ifmt = 0; /* default is date */ |
65 | } else { | 65 | } else { |
66 | static const char * const isoformats[] = | 66 | static const char *const isoformats[] = { |
67 | { "date", "hours", "minutes", "seconds" }; | 67 | "date", "hours", "minutes", "seconds" |
68 | }; | ||
68 | 69 | ||
69 | for (ifmt = 0; ifmt < 4; ifmt++) | 70 | for (ifmt = 0; ifmt < 4; ifmt++) |
70 | if (!strcmp(isofmt_arg, isoformats[ifmt])) | 71 | if (!strcmp(isofmt_arg, isoformats[ifmt])) |
diff --git a/coreutils/dd.c b/coreutils/dd.c index 3b4b1d785..b17bb5969 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
@@ -46,7 +46,7 @@ static void dd_output_status(int ATTRIBUTE_UNUSED cur_signal) | |||
46 | } | 46 | } |
47 | 47 | ||
48 | static ssize_t full_write_or_warn(int fd, const void *buf, size_t len, | 48 | static ssize_t full_write_or_warn(int fd, const void *buf, size_t len, |
49 | const char * const filename) | 49 | const char *const filename) |
50 | { | 50 | { |
51 | ssize_t n = full_write(fd, buf, len); | 51 | ssize_t n = full_write(fd, buf, len); |
52 | if (n < 0) | 52 | if (n < 0) |
@@ -83,7 +83,7 @@ int dd_main(int argc, char **argv) | |||
83 | FLAG_TWOBUFS = 1 << 3, | 83 | FLAG_TWOBUFS = 1 << 3, |
84 | FLAG_COUNT = 1 << 4, | 84 | FLAG_COUNT = 1 << 4, |
85 | }; | 85 | }; |
86 | static const char keywords[] = | 86 | static const char keywords[] ALIGN1 = |
87 | "bs=\0""count=\0""seek=\0""skip=\0""if=\0""of=\0" | 87 | "bs=\0""count=\0""seek=\0""skip=\0""if=\0""of=\0" |
88 | #if ENABLE_FEATURE_DD_IBS_OBS | 88 | #if ENABLE_FEATURE_DD_IBS_OBS |
89 | "ibs=\0""obs=\0""conv=\0""notrunc\0""sync\0""noerror\0" | 89 | "ibs=\0""obs=\0""conv=\0""notrunc\0""sync\0""noerror\0" |
diff --git a/coreutils/df.c b/coreutils/df.c index 82730806e..5154eeb45 100644 --- a/coreutils/df.c +++ b/coreutils/df.c | |||
@@ -42,7 +42,8 @@ int df_main(int argc, char **argv) | |||
42 | FILE *mount_table; | 42 | FILE *mount_table; |
43 | struct mntent *mount_entry; | 43 | struct mntent *mount_entry; |
44 | struct statfs s; | 44 | struct statfs s; |
45 | static const char hdr_1k[] = "1k-blocks"; /* default display is kilobytes */ | 45 | /* default display is kilobytes */ |
46 | static const char hdr_1k[] ALIGN1 = "1k-blocks"; | ||
46 | const char *disp_units_hdr = hdr_1k; | 47 | const char *disp_units_hdr = hdr_1k; |
47 | 48 | ||
48 | #ifdef CONFIG_FEATURE_HUMAN_READABLE | 49 | #ifdef CONFIG_FEATURE_HUMAN_READABLE |
diff --git a/coreutils/du.c b/coreutils/du.c index cb3e715d9..19748719a 100644 --- a/coreutils/du.c +++ b/coreutils/du.c | |||
@@ -48,7 +48,7 @@ static int one_file_system; | |||
48 | static dev_t dir_dev; | 48 | static dev_t dir_dev; |
49 | 49 | ||
50 | 50 | ||
51 | static void print(long size, const char * const filename) | 51 | static void print(long size, const char *const filename) |
52 | { | 52 | { |
53 | /* TODO - May not want to defer error checking here. */ | 53 | /* TODO - May not want to defer error checking here. */ |
54 | #if ENABLE_FEATURE_HUMAN_READABLE | 54 | #if ENABLE_FEATURE_HUMAN_READABLE |
@@ -64,7 +64,7 @@ static void print(long size, const char * const filename) | |||
64 | } | 64 | } |
65 | 65 | ||
66 | /* tiny recursive du */ | 66 | /* tiny recursive du */ |
67 | static long du(const char * const filename) | 67 | static long du(const char *const filename) |
68 | { | 68 | { |
69 | struct stat statbuf; | 69 | struct stat statbuf; |
70 | long sum; | 70 | long sum; |
diff --git a/coreutils/env.c b/coreutils/env.c index 3008358ec..dc8667181 100644 --- a/coreutils/env.c +++ b/coreutils/env.c | |||
@@ -35,7 +35,7 @@ extern char **environ; | |||
35 | #include "libbb.h" | 35 | #include "libbb.h" |
36 | 36 | ||
37 | #if ENABLE_FEATURE_ENV_LONG_OPTIONS | 37 | #if ENABLE_FEATURE_ENV_LONG_OPTIONS |
38 | static const char env_longopts[] = | 38 | static const char env_longopts[] ALIGN1 = |
39 | "ignore-environment\0" No_argument "i" | 39 | "ignore-environment\0" No_argument "i" |
40 | "unset\0" Required_argument "u" | 40 | "unset\0" Required_argument "u" |
41 | ; | 41 | ; |
diff --git a/coreutils/expr.c b/coreutils/expr.c index 6a4683d90..318fee721 100644 --- a/coreutils/expr.c +++ b/coreutils/expr.c | |||
@@ -277,7 +277,7 @@ static VALUE *eval7(void) | |||
277 | 277 | ||
278 | static VALUE *eval6(void) | 278 | static VALUE *eval6(void) |
279 | { | 279 | { |
280 | static const char keywords[] = | 280 | static const char keywords[] ALIGN1 = |
281 | "quote\0""length\0""match\0""index\0""substr\0"; | 281 | "quote\0""length\0""match\0""index\0""substr\0"; |
282 | 282 | ||
283 | VALUE *r, *i1, *i2; | 283 | VALUE *r, *i1, *i2; |
diff --git a/coreutils/head.c b/coreutils/head.c index bffba4043..a48f147a2 100644 --- a/coreutils/head.c +++ b/coreutils/head.c | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #include "libbb.h" | 14 | #include "libbb.h" |
15 | 15 | ||
16 | static const char head_opts[] = | 16 | static const char head_opts[] ALIGN1 = |
17 | "n:" | 17 | "n:" |
18 | #if ENABLE_FEATURE_FANCY_HEAD | 18 | #if ENABLE_FEATURE_FANCY_HEAD |
19 | "c:qv" | 19 | "c:qv" |
@@ -29,7 +29,7 @@ static const struct suffix_mult head_suffixes[] = { | |||
29 | }; | 29 | }; |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | static const char header_fmt_str[] = "\n==> %s <==\n"; | 32 | static const char header_fmt_str[] ALIGN1 = "\n==> %s <==\n"; |
33 | 33 | ||
34 | int head_main(int argc, char **argv); | 34 | int head_main(int argc, char **argv); |
35 | int head_main(int argc, char **argv) | 35 | int head_main(int argc, char **argv) |
diff --git a/coreutils/install.c b/coreutils/install.c index c2638f492..79cd02036 100644 --- a/coreutils/install.c +++ b/coreutils/install.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include "libcoreutils/coreutils.h" | 16 | #include "libcoreutils/coreutils.h" |
17 | 17 | ||
18 | #if ENABLE_FEATURE_INSTALL_LONG_OPTIONS | 18 | #if ENABLE_FEATURE_INSTALL_LONG_OPTIONS |
19 | static const char install_longopts[] = | 19 | static const char install_longopts[] ALIGN1 = |
20 | "directory\0" No_argument "d" | 20 | "directory\0" No_argument "d" |
21 | "preserve-timestamps\0" No_argument "p" | 21 | "preserve-timestamps\0" No_argument "p" |
22 | "strip\0" No_argument "s" | 22 | "strip\0" No_argument "s" |
diff --git a/coreutils/ls.c b/coreutils/ls.c index 920fad85e..2b2925557 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -120,7 +120,7 @@ SPLIT_SUBDIR = 2, | |||
120 | static smallint show_color; | 120 | static smallint show_color; |
121 | /* long option entry used only for --color, which has no short option | 121 | /* long option entry used only for --color, which has no short option |
122 | * equivalent */ | 122 | * equivalent */ |
123 | static const char ls_color_opt[] = | 123 | static const char ls_color_opt[] ALIGN1 = |
124 | "color\0" Optional_argument "\xff" /* no short equivalent */ | 124 | "color\0" Optional_argument "\xff" /* no short equivalent */ |
125 | ; | 125 | ; |
126 | #else | 126 | #else |
@@ -710,7 +710,8 @@ static int list_single(struct dnode *dn) | |||
710 | /* "[-]SXvThw", GNU options, busybox optionally supports */ | 710 | /* "[-]SXvThw", GNU options, busybox optionally supports */ |
711 | /* "[-]K", SELinux mandated options, busybox optionally supports */ | 711 | /* "[-]K", SELinux mandated options, busybox optionally supports */ |
712 | /* "[-]e", I think we made this one up */ | 712 | /* "[-]e", I think we made this one up */ |
713 | static const char ls_options[] = "Cadil1gnsxAk" | 713 | static const char ls_options[] ALIGN1 = |
714 | "Cadil1gnsxAk" | ||
714 | USE_FEATURE_LS_TIMESTAMPS("cetu") | 715 | USE_FEATURE_LS_TIMESTAMPS("cetu") |
715 | USE_FEATURE_LS_SORTFILES("SXrv") | 716 | USE_FEATURE_LS_SORTFILES("SXrv") |
716 | USE_FEATURE_LS_FILETYPES("Fp") | 717 | USE_FEATURE_LS_FILETYPES("Fp") |
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index a6eaa9612..22a070c31 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c | |||
@@ -25,7 +25,7 @@ | |||
25 | /* This is a NOFORK applet. Be very careful! */ | 25 | /* This is a NOFORK applet. Be very careful! */ |
26 | 26 | ||
27 | #if ENABLE_FEATURE_MKDIR_LONG_OPTIONS | 27 | #if ENABLE_FEATURE_MKDIR_LONG_OPTIONS |
28 | static const char mkdir_longopts[] = | 28 | static const char mkdir_longopts[] ALIGN1 = |
29 | "mode\0" Required_argument "m" | 29 | "mode\0" Required_argument "m" |
30 | "parents\0" No_argument "p" | 30 | "parents\0" No_argument "p" |
31 | #if ENABLE_SELINUX | 31 | #if ENABLE_SELINUX |
diff --git a/coreutils/mknod.c b/coreutils/mknod.c index 415ef55c1..ea6f24ae6 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include "libbb.h" | 14 | #include "libbb.h" |
15 | #include "libcoreutils/coreutils.h" | 15 | #include "libcoreutils/coreutils.h" |
16 | 16 | ||
17 | static const char modes_chars[] = { 'p', 'c', 'u', 'b', 0, 1, 1, 2 }; | 17 | static const char modes_chars[] ALIGN1 = { 'p', 'c', 'u', 'b', 0, 1, 1, 2 }; |
18 | static const mode_t modes_cubp[] = { S_IFIFO, S_IFCHR, S_IFBLK }; | 18 | static const mode_t modes_cubp[] = { S_IFIFO, S_IFCHR, S_IFBLK }; |
19 | 19 | ||
20 | int mknod_main(int argc, char **argv); | 20 | int mknod_main(int argc, char **argv); |
diff --git a/coreutils/mv.c b/coreutils/mv.c index 064407838..4cd0fcfba 100644 --- a/coreutils/mv.c +++ b/coreutils/mv.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "libcoreutils/coreutils.h" | 21 | #include "libcoreutils/coreutils.h" |
22 | 22 | ||
23 | #if ENABLE_FEATURE_MV_LONG_OPTIONS | 23 | #if ENABLE_FEATURE_MV_LONG_OPTIONS |
24 | static const char mv_longopts[] = | 24 | static const char mv_longopts[] ALIGN1 = |
25 | "interactive\0" No_argument "i" | 25 | "interactive\0" No_argument "i" |
26 | "force\0" No_argument "f" | 26 | "force\0" No_argument "f" |
27 | ; | 27 | ; |
@@ -30,7 +30,8 @@ static const char mv_longopts[] = | |||
30 | #define OPT_FILEUTILS_FORCE 1 | 30 | #define OPT_FILEUTILS_FORCE 1 |
31 | #define OPT_FILEUTILS_INTERACTIVE 2 | 31 | #define OPT_FILEUTILS_INTERACTIVE 2 |
32 | 32 | ||
33 | static const char fmt[] = "cannot overwrite %sdirectory with %sdirectory"; | 33 | static const char fmt[] ALIGN1 = |
34 | "cannot overwrite %sdirectory with %sdirectory"; | ||
34 | 35 | ||
35 | int mv_main(int argc, char **argv); | 36 | int mv_main(int argc, char **argv); |
36 | int mv_main(int argc, char **argv) | 37 | int mv_main(int argc, char **argv) |
diff --git a/coreutils/od.c b/coreutils/od.c index 00de080b6..114a746fa 100644 --- a/coreutils/od.c +++ b/coreutils/od.c | |||
@@ -131,7 +131,7 @@ odoffset(int argc, char ***argvp) | |||
131 | } | 131 | } |
132 | } | 132 | } |
133 | 133 | ||
134 | static const char * const add_strings[] = { | 134 | static const char *const add_strings[] = { |
135 | "16/1 \"%3_u \" \"\\n\"", /* a */ | 135 | "16/1 \"%3_u \" \"\\n\"", /* a */ |
136 | "8/2 \" %06o \" \"\\n\"", /* B, o */ | 136 | "8/2 \" %06o \" \"\\n\"", /* B, o */ |
137 | "16/1 \"%03o \" \"\\n\"", /* b */ | 137 | "16/1 \"%03o \" \"\\n\"", /* b */ |
@@ -147,9 +147,9 @@ static const char * const add_strings[] = { | |||
147 | "4/4 \" %011o \" \"\\n\"", /* O */ | 147 | "4/4 \" %011o \" \"\\n\"", /* O */ |
148 | }; | 148 | }; |
149 | 149 | ||
150 | static const char od_opts[] = "aBbcDdeFfHhIiLlOoXxv"; | 150 | static const char od_opts[] ALIGN1 = "aBbcDdeFfHhIiLlOoXxv"; |
151 | 151 | ||
152 | static const char od_o2si[] = { | 152 | static const char od_o2si[] ALIGN1 = { |
153 | 0, 1, 2, 3, 5, | 153 | 0, 1, 2, 3, 5, |
154 | 4, 6, 6, 7, 8, | 154 | 4, 6, 6, 7, 8, |
155 | 9, 0xa, 0xb, 0xa, 0xa, | 155 | 9, 0xa, 0xb, 0xa, 0xa, |
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c index e30860544..d3c9f9a17 100644 --- a/coreutils/od_bloaty.c +++ b/coreutils/od_bloaty.c | |||
@@ -129,20 +129,20 @@ struct tspec { | |||
129 | 10 unsigned decimal | 129 | 10 unsigned decimal |
130 | 8 unsigned hexadecimal */ | 130 | 8 unsigned hexadecimal */ |
131 | 131 | ||
132 | static const uint8_t bytes_to_oct_digits[] = | 132 | static const uint8_t bytes_to_oct_digits[] ALIGN1 = |
133 | {0, 3, 6, 8, 11, 14, 16, 19, 22, 25, 27, 30, 32, 35, 38, 41, 43}; | 133 | {0, 3, 6, 8, 11, 14, 16, 19, 22, 25, 27, 30, 32, 35, 38, 41, 43}; |
134 | 134 | ||
135 | static const uint8_t bytes_to_signed_dec_digits[] = | 135 | static const uint8_t bytes_to_signed_dec_digits[] ALIGN1 = |
136 | {1, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 28, 30, 33, 35, 37, 40}; | 136 | {1, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 28, 30, 33, 35, 37, 40}; |
137 | 137 | ||
138 | static const uint8_t bytes_to_unsigned_dec_digits[] = | 138 | static const uint8_t bytes_to_unsigned_dec_digits[] ALIGN1 = |
139 | {0, 3, 5, 8, 10, 13, 15, 17, 20, 22, 25, 27, 29, 32, 34, 37, 39}; | 139 | {0, 3, 5, 8, 10, 13, 15, 17, 20, 22, 25, 27, 29, 32, 34, 37, 39}; |
140 | 140 | ||
141 | static const uint8_t bytes_to_hex_digits[] = | 141 | static const uint8_t bytes_to_hex_digits[] ALIGN1 = |
142 | {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32}; | 142 | {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32}; |
143 | 143 | ||
144 | /* Convert enum size_spec to the size of the named type. */ | 144 | /* Convert enum size_spec to the size of the named type. */ |
145 | static const signed char width_bytes[] = { | 145 | static const signed char width_bytes[] ALIGN1 = { |
146 | -1, | 146 | -1, |
147 | sizeof(char), | 147 | sizeof(char), |
148 | sizeof(short), | 148 | sizeof(short), |
@@ -212,7 +212,7 @@ static char const *const default_file_list[] = { "-", NULL }; | |||
212 | static FILE *in_stream; | 212 | static FILE *in_stream; |
213 | 213 | ||
214 | #define MAX_INTEGRAL_TYPE_SIZE sizeof(ulonglong_t) | 214 | #define MAX_INTEGRAL_TYPE_SIZE sizeof(ulonglong_t) |
215 | static unsigned char integral_type_size[MAX_INTEGRAL_TYPE_SIZE + 1] = { | 215 | static unsigned char integral_type_size[MAX_INTEGRAL_TYPE_SIZE + 1] ALIGN1 = { |
216 | [sizeof(char)] = CHAR, | 216 | [sizeof(char)] = CHAR, |
217 | #if USHRT_MAX != UCHAR_MAX | 217 | #if USHRT_MAX != UCHAR_MAX |
218 | [sizeof(short)] = SHORT, | 218 | [sizeof(short)] = SHORT, |
@@ -229,11 +229,11 @@ static unsigned char integral_type_size[MAX_INTEGRAL_TYPE_SIZE + 1] = { | |||
229 | }; | 229 | }; |
230 | 230 | ||
231 | #define MAX_FP_TYPE_SIZE sizeof(longdouble_t) | 231 | #define MAX_FP_TYPE_SIZE sizeof(longdouble_t) |
232 | static unsigned char fp_type_size[MAX_FP_TYPE_SIZE + 1] = { | 232 | static unsigned char fp_type_size[MAX_FP_TYPE_SIZE + 1] ALIGN1 = { |
233 | /* gcc seems to allow repeated indexes. Last one stays */ | 233 | /* gcc seems to allow repeated indexes. Last one stays */ |
234 | [sizeof(longdouble_t)] = FLOAT_LONG_DOUBLE, | 234 | [sizeof(longdouble_t)] = FLOAT_LONG_DOUBLE, |
235 | [sizeof(double)] = FLOAT_DOUBLE, | 235 | [sizeof(double)] = FLOAT_DOUBLE, |
236 | [sizeof(float)] = FLOAT_SINGLE, | 236 | [sizeof(float)] = FLOAT_SINGLE |
237 | }; | 237 | }; |
238 | 238 | ||
239 | 239 | ||
@@ -383,7 +383,7 @@ print_named_ascii(size_t n_bytes, const char *block, | |||
383 | const char *unused_fmt_string ATTRIBUTE_UNUSED) | 383 | const char *unused_fmt_string ATTRIBUTE_UNUSED) |
384 | { | 384 | { |
385 | /* Names for some non-printing characters. */ | 385 | /* Names for some non-printing characters. */ |
386 | static const char charname[33][3] = { | 386 | static const char charname[33][3] ALIGN1 = { |
387 | "nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel", | 387 | "nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel", |
388 | " bs", " ht", " nl", " vt", " ff", " cr", " so", " si", | 388 | " bs", " ht", " nl", " vt", " ff", " cr", " so", " si", |
389 | "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb", | 389 | "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb", |
@@ -560,7 +560,7 @@ decode_one_format(const char *s_orig, const char *s, const char **next, | |||
560 | case 'o': | 560 | case 'o': |
561 | case 'u': | 561 | case 'u': |
562 | case 'x': { | 562 | case 'x': { |
563 | static const char CSIL[] = "CSIL"; | 563 | static const char CSIL[] ALIGN1 = "CSIL"; |
564 | 564 | ||
565 | c = *s++; | 565 | c = *s++; |
566 | p = strchr(CSIL, *s); | 566 | p = strchr(CSIL, *s); |
@@ -596,7 +596,7 @@ decode_one_format(const char *s_orig, const char *s, const char **next, | |||
596 | size_spec = integral_type_size[size]; | 596 | size_spec = integral_type_size[size]; |
597 | 597 | ||
598 | { | 598 | { |
599 | static const char doux[] = "doux"; | 599 | static const char doux[] ALIGN1 = "doux"; |
600 | static const char doux_fmt_letter[][4] = { | 600 | static const char doux_fmt_letter[][4] = { |
601 | "lld", "llo", "llu", "llx" | 601 | "lld", "llo", "llu", "llx" |
602 | }; | 602 | }; |
@@ -653,7 +653,7 @@ decode_one_format(const char *s_orig, const char *s, const char **next, | |||
653 | } | 653 | } |
654 | 654 | ||
655 | case 'f': { | 655 | case 'f': { |
656 | static const char FDL[] = "FDL"; | 656 | static const char FDL[] ALIGN1 = "FDL"; |
657 | 657 | ||
658 | fmt = FLOATING_POINT; | 658 | fmt = FLOATING_POINT; |
659 | ++s; | 659 | ++s; |
@@ -836,7 +836,7 @@ format_address_none(off_t address ATTRIBUTE_UNUSED, char c ATTRIBUTE_UNUSED) | |||
836 | { | 836 | { |
837 | } | 837 | } |
838 | 838 | ||
839 | static char address_fmt[] = "%0n"OFF_FMT"xc"; | 839 | static char address_fmt[] ALIGN1 = "%0n"OFF_FMT"xc"; |
840 | /* Corresponds to 'x' above */ | 840 | /* Corresponds to 'x' above */ |
841 | #define address_base_char address_fmt[sizeof(address_fmt)-3] | 841 | #define address_base_char address_fmt[sizeof(address_fmt)-3] |
842 | /* Corresponds to 'n' above */ | 842 | /* Corresponds to 'n' above */ |
@@ -1233,7 +1233,7 @@ int od_main(int argc, char **argv) | |||
1233 | OPT_traditional = (1 << 18) * ENABLE_GETOPT_LONG, | 1233 | OPT_traditional = (1 << 18) * ENABLE_GETOPT_LONG, |
1234 | }; | 1234 | }; |
1235 | #if ENABLE_GETOPT_LONG | 1235 | #if ENABLE_GETOPT_LONG |
1236 | static const char od_longopts[] = | 1236 | static const char od_longopts[] ALIGN1 = |
1237 | "skip-bytes\0" Required_argument "j" | 1237 | "skip-bytes\0" Required_argument "j" |
1238 | "address-radix\0" Required_argument "A" | 1238 | "address-radix\0" Required_argument "A" |
1239 | "read-bytes\0" Required_argument "N" | 1239 | "read-bytes\0" Required_argument "N" |
@@ -1268,11 +1268,11 @@ int od_main(int argc, char **argv) | |||
1268 | argc -= optind; | 1268 | argc -= optind; |
1269 | argv += optind; | 1269 | argv += optind; |
1270 | if (opt & OPT_A) { | 1270 | if (opt & OPT_A) { |
1271 | static const char doxn[] = "doxn"; | 1271 | static const char doxn[] ALIGN1 = "doxn"; |
1272 | static const char doxn_address_base_char[] = { | 1272 | static const char doxn_address_base_char[] ALIGN1 = { |
1273 | 'u', 'o', 'x', /* '?' fourth one is not important */ | 1273 | 'u', 'o', 'x', /* '?' fourth one is not important */ |
1274 | }; | 1274 | }; |
1275 | static const uint8_t doxn_address_pad_len_char[] = { | 1275 | static const uint8_t doxn_address_pad_len_char[] ALIGN1 = { |
1276 | '7', '7', '6', /* '?' */ | 1276 | '7', '7', '6', /* '?' */ |
1277 | }; | 1277 | }; |
1278 | char *p; | 1278 | char *p; |
diff --git a/coreutils/sort.c b/coreutils/sort.c index 6371139cb..98c1bc34a 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | /* These are sort types */ | 25 | /* These are sort types */ |
26 | static const char OPT_STR[] = "ngMucszbrdfimS:T:o:k:t:"; | 26 | static const char OPT_STR[] ALIGN1 = "ngMucszbrdfimS:T:o:k:t:"; |
27 | enum { | 27 | enum { |
28 | FLAG_n = 1, /* Numeric sort */ | 28 | FLAG_n = 1, /* Numeric sort */ |
29 | FLAG_g = 2, /* Sort using strtod() */ | 29 | FLAG_g = 2, /* Sort using strtod() */ |
diff --git a/coreutils/stat.c b/coreutils/stat.c index 7c72127c5..0fddea2bb 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #define OPT_DEREFERENCE (1<<2) | 21 | #define OPT_DEREFERENCE (1<<2) |
22 | #define OPT_SELINUX (1<<3) | 22 | #define OPT_SELINUX (1<<3) |
23 | 23 | ||
24 | static char buf[sizeof("YYYY-MM-DD HH:MM:SS.000000000")]; | 24 | static char buf[sizeof("YYYY-MM-DD HH:MM:SS.000000000")] ALIGN1; |
25 | 25 | ||
26 | static char const * file_type(struct stat const *st) | 26 | static char const * file_type(struct stat const *st) |
27 | { | 27 | { |
@@ -70,7 +70,7 @@ static char const *human_fstype(long f_type) | |||
70 | int i; | 70 | int i; |
71 | static const struct types { | 71 | static const struct types { |
72 | long type; | 72 | long type; |
73 | const char * const fs; | 73 | const char *const fs; |
74 | } humantypes[] = { | 74 | } humantypes[] = { |
75 | { 0xADFF, "affs" }, | 75 | { 0xADFF, "affs" }, |
76 | { 0x1Cd1, "devpts" }, | 76 | { 0x1Cd1, "devpts" }, |
@@ -118,7 +118,7 @@ static char const *human_fstype(long f_type) | |||
118 | #if ENABLE_FEATURE_STAT_FORMAT | 118 | #if ENABLE_FEATURE_STAT_FORMAT |
119 | /* print statfs info */ | 119 | /* print statfs info */ |
120 | static void print_statfs(char *pformat, const size_t buf_len, const char m, | 120 | static void print_statfs(char *pformat, const size_t buf_len, const char m, |
121 | const char * const filename, void const *data | 121 | const char *const filename, void const *data |
122 | USE_SELINUX(, security_context_t scontext)) | 122 | USE_SELINUX(, security_context_t scontext)) |
123 | { | 123 | { |
124 | struct statfs const *statfsbuf = data; | 124 | struct statfs const *statfsbuf = data; |
@@ -168,7 +168,7 @@ static void print_statfs(char *pformat, const size_t buf_len, const char m, | |||
168 | 168 | ||
169 | /* print stat info */ | 169 | /* print stat info */ |
170 | static void print_stat(char *pformat, const size_t buf_len, const char m, | 170 | static void print_stat(char *pformat, const size_t buf_len, const char m, |
171 | const char * const filename, void const *data | 171 | const char *const filename, void const *data |
172 | USE_SELINUX(, security_context_t scontext)) | 172 | USE_SELINUX(, security_context_t scontext)) |
173 | { | 173 | { |
174 | #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) | 174 | #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) |
diff --git a/coreutils/stty.c b/coreutils/stty.c index fbb72baa9..863f28d92 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -127,28 +127,28 @@ enum { | |||
127 | control, input, output, local, combination | 127 | control, input, output, local, combination |
128 | }; | 128 | }; |
129 | 129 | ||
130 | static const char evenp [] = "evenp"; | 130 | static const char evenp [] ALIGN1 = "evenp"; |
131 | static const char raw [] = "raw"; | 131 | static const char raw [] ALIGN1 = "raw"; |
132 | static const char stty_min [] = "min"; | 132 | static const char stty_min [] ALIGN1 = "min"; |
133 | static const char stty_time [] = "time"; | 133 | static const char stty_time [] ALIGN1 = "time"; |
134 | static const char stty_swtch[] = "swtch"; | 134 | static const char stty_swtch[] ALIGN1 = "swtch"; |
135 | static const char stty_eol [] = "eol"; | 135 | static const char stty_eol [] ALIGN1 = "eol"; |
136 | static const char stty_eof [] = "eof"; | 136 | static const char stty_eof [] ALIGN1 = "eof"; |
137 | static const char parity [] = "parity"; | 137 | static const char parity [] ALIGN1 = "parity"; |
138 | static const char stty_oddp [] = "oddp"; | 138 | static const char stty_oddp [] ALIGN1 = "oddp"; |
139 | static const char stty_nl [] = "nl"; | 139 | static const char stty_nl [] ALIGN1 = "nl"; |
140 | static const char stty_ek [] = "ek"; | 140 | static const char stty_ek [] ALIGN1 = "ek"; |
141 | static const char stty_sane [] = "sane"; | 141 | static const char stty_sane [] ALIGN1 = "sane"; |
142 | static const char cbreak [] = "cbreak"; | 142 | static const char cbreak [] ALIGN1 = "cbreak"; |
143 | static const char stty_pass8[] = "pass8"; | 143 | static const char stty_pass8[] ALIGN1 = "pass8"; |
144 | static const char litout [] = "litout"; | 144 | static const char litout [] ALIGN1 = "litout"; |
145 | static const char cooked [] = "cooked"; | 145 | static const char cooked [] ALIGN1 = "cooked"; |
146 | static const char decctlq [] = "decctlq"; | 146 | static const char decctlq [] ALIGN1 = "decctlq"; |
147 | static const char stty_tabs [] = "tabs"; | 147 | static const char stty_tabs [] ALIGN1 = "tabs"; |
148 | static const char stty_lcase[] = "lcase"; | 148 | static const char stty_lcase[] ALIGN1 = "lcase"; |
149 | static const char stty_LCASE[] = "LCASE"; | 149 | static const char stty_LCASE[] ALIGN1 = "LCASE"; |
150 | static const char stty_crt [] = "crt"; | 150 | static const char stty_crt [] ALIGN1 = "crt"; |
151 | static const char stty_dec [] = "dec"; | 151 | static const char stty_dec [] ALIGN1 = "dec"; |
152 | 152 | ||
153 | /* Flags for 'struct mode_info' */ | 153 | /* Flags for 'struct mode_info' */ |
154 | #define SANE_SET 1 /* Set in 'sane' mode */ | 154 | #define SANE_SET 1 /* Set in 'sane' mode */ |
@@ -158,7 +158,7 @@ static const char stty_dec [] = "dec"; | |||
158 | 158 | ||
159 | /* Each mode */ | 159 | /* Each mode */ |
160 | struct mode_info { | 160 | struct mode_info { |
161 | const char * const name; /* Name given on command line */ | 161 | const char *const name; /* Name given on command line */ |
162 | const unsigned char type; /* Which structure element to change */ | 162 | const unsigned char type; /* Which structure element to change */ |
163 | const unsigned char flags; /* Setting and display options */ | 163 | const unsigned char flags; /* Setting and display options */ |
164 | /* were using short here, but ppc32 was unhappy: */ | 164 | /* were using short here, but ppc32 was unhappy: */ |
@@ -324,7 +324,7 @@ enum { | |||
324 | 324 | ||
325 | /* Control character settings */ | 325 | /* Control character settings */ |
326 | struct control_info { | 326 | struct control_info { |
327 | const char * const name; /* Name given on command line */ | 327 | const char *const name; /* Name given on command line */ |
328 | const unsigned char saneval; /* Value to set for 'stty sane' */ | 328 | const unsigned char saneval; /* Value to set for 'stty sane' */ |
329 | const unsigned char offset; /* Offset in c_cc */ | 329 | const unsigned char offset; /* Offset in c_cc */ |
330 | }; | 330 | }; |
@@ -417,11 +417,11 @@ static const char *visible(unsigned ch) | |||
417 | 417 | ||
418 | static tcflag_t *mode_type_flag(unsigned type, const struct termios *mode) | 418 | static tcflag_t *mode_type_flag(unsigned type, const struct termios *mode) |
419 | { | 419 | { |
420 | static const unsigned char tcflag_offsets[] = { | 420 | static const unsigned char tcflag_offsets[] ALIGN1 = { |
421 | offsetof(struct termios, c_cflag), /* control */ | 421 | offsetof(struct termios, c_cflag), /* control */ |
422 | offsetof(struct termios, c_iflag), /* input */ | 422 | offsetof(struct termios, c_iflag), /* input */ |
423 | offsetof(struct termios, c_oflag), /* output */ | 423 | offsetof(struct termios, c_oflag), /* output */ |
424 | offsetof(struct termios, c_lflag), /* local */ | 424 | offsetof(struct termios, c_lflag) /* local */ |
425 | }; | 425 | }; |
426 | 426 | ||
427 | if (type <= local) { | 427 | if (type <= local) { |
@@ -430,7 +430,7 @@ static tcflag_t *mode_type_flag(unsigned type, const struct termios *mode) | |||
430 | return NULL; | 430 | return NULL; |
431 | } | 431 | } |
432 | 432 | ||
433 | static void set_speed_or_die(enum speed_setting type, const char * const arg, | 433 | static void set_speed_or_die(enum speed_setting type, const char *const arg, |
434 | struct termios * const mode) | 434 | struct termios * const mode) |
435 | { | 435 | { |
436 | speed_t baud; | 436 | speed_t baud; |
@@ -560,9 +560,9 @@ enum { | |||
560 | param_ospeed = 8 | 0x80, | 560 | param_ospeed = 8 | 0x80, |
561 | }; | 561 | }; |
562 | 562 | ||
563 | static int find_param(const char * const name) | 563 | static int find_param(const char *const name) |
564 | { | 564 | { |
565 | static const char params[] = | 565 | static const char params[] ALIGN1 = |
566 | "line\0" /* 1 */ | 566 | "line\0" /* 1 */ |
567 | "rows\0" /* 2 */ | 567 | "rows\0" /* 2 */ |
568 | "cols\0" /* 3 */ | 568 | "cols\0" /* 3 */ |
diff --git a/coreutils/tail.c b/coreutils/tail.c index 01469169a..ec21c4234 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c | |||
@@ -63,7 +63,7 @@ static ssize_t tail_read(int fd, char *buf, size_t count) | |||
63 | return r; | 63 | return r; |
64 | } | 64 | } |
65 | 65 | ||
66 | static const char header_fmt[] = "\n==> %s <==\n"; | 66 | static const char header_fmt[] ALIGN1 = "\n==> %s <==\n"; |
67 | 67 | ||
68 | static unsigned eat_num(const char *p) | 68 | static unsigned eat_num(const char *p) |
69 | { | 69 | { |
diff --git a/coreutils/tr.c b/coreutils/tr.c index 594571833..6a34e3087 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c | |||
@@ -52,7 +52,7 @@ static unsigned int expand(const char *arg, char *buffer) | |||
52 | unsigned i; /* XXX: FIXME: use unsigned char? */ | 52 | unsigned i; /* XXX: FIXME: use unsigned char? */ |
53 | unsigned char ac; | 53 | unsigned char ac; |
54 | #define CLO ":]\0" | 54 | #define CLO ":]\0" |
55 | static const char classes[] = | 55 | static const char classes[] ALIGN1 = |
56 | "alpha"CLO "alnum"CLO "digit"CLO "lower"CLO "upper"CLO "space"CLO | 56 | "alpha"CLO "alnum"CLO "digit"CLO "lower"CLO "upper"CLO "space"CLO |
57 | "blank"CLO "punct"CLO "cntrl"CLO; | 57 | "blank"CLO "punct"CLO "cntrl"CLO; |
58 | #define CLASS_invalid 0 /* we increment the retval */ | 58 | #define CLASS_invalid 0 /* we increment the retval */ |
diff --git a/coreutils/uname.c b/coreutils/uname.c index a934c15f4..8f07f1960 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c | |||
@@ -38,8 +38,8 @@ typedef struct { | |||
38 | char processor[8]; /* for "unknown" */ | 38 | char processor[8]; /* for "unknown" */ |
39 | } uname_info_t; | 39 | } uname_info_t; |
40 | 40 | ||
41 | static const char options[] = "snrvmpa"; | 41 | static const char options[] ALIGN1 = "snrvmpa"; |
42 | static const unsigned short int utsname_offset[] = { | 42 | static const unsigned short utsname_offset[] ALIGN2 = { |
43 | offsetof(uname_info_t,name.sysname), | 43 | offsetof(uname_info_t,name.sysname), |
44 | offsetof(uname_info_t,name.nodename), | 44 | offsetof(uname_info_t,name.nodename), |
45 | offsetof(uname_info_t,name.release), | 45 | offsetof(uname_info_t,name.release), |
diff --git a/coreutils/uniq.c b/coreutils/uniq.c index adc196b97..a7caef991 100644 --- a/coreutils/uniq.c +++ b/coreutils/uniq.c | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | 14 | ||
15 | static const char uniq_opts[] = "cdu" "f:s:" "cdu\0\1\2\4"; | 15 | static const char uniq_opts[] ALIGN1 = "cdu" "f:s:" "cdu\0\1\2\4"; |
16 | 16 | ||
17 | static FILE *xgetoptfile_uniq_s(char **argv, int read0write2) | 17 | static FILE *xgetoptfile_uniq_s(char **argv, int read0write2) |
18 | { | 18 | { |