trylink: produce even more info about final link stage
authorDenis Vlasenko <vda.linux@googlemail.com>
Sun, 12 Aug 2007 20:58:27 +0000 (20:58 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Sun, 12 Aug 2007 20:58:27 +0000 (20:58 -0000)
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

119 files changed:
Makefile
applets/Kbuild
applets/applets.c
applets/usage_compressed
archival/ar.c
archival/dpkg.c
archival/gzip.c
archival/libunarchive/decompress_unzip.c
archival/tar.c
console-tools/setconsole.c
coreutils/cal.c
coreutils/cut.c
coreutils/date.c
coreutils/dd.c
coreutils/df.c
coreutils/du.c
coreutils/env.c
coreutils/expr.c
coreutils/head.c
coreutils/install.c
coreutils/ls.c
coreutils/mkdir.c
coreutils/mknod.c
coreutils/mv.c
coreutils/od.c
coreutils/od_bloaty.c
coreutils/sort.c
coreutils/stat.c
coreutils/stty.c
coreutils/tail.c
coreutils/tr.c
coreutils/uname.c
coreutils/uniq.c
debianutils/run_parts.c
debianutils/start_stop_daemon.c
e2fsprogs/chattr.c
e2fsprogs/fsck.c
e2fsprogs/old_e2fsprogs/blkid/probe.c
e2fsprogs/old_e2fsprogs/e2fsck.c
e2fsprogs/old_e2fsprogs/e2p/ostype.c
e2fsprogs/old_e2fsprogs/fsck.c
editors/awk.c
editors/cmp.c
editors/diff.c
editors/sed.c
editors/vi.c
findutils/find.c
include/platform.h
init/init.c
libbb/compare_string_array.c
libbb/dump.c
libbb/getopt32.c
libbb/human_readable.c
libbb/login.c
libbb/md5.c
libbb/messages.c
libbb/mode_string.c
libbb/mtab_file.c
libbb/parse_mode.c
libbb/process_escape_sequence.c
libbb/uuencode.c
libpwdgrp/pwd_grp.c
loginutils/adduser.c
loginutils/chpasswd.c
loginutils/getty.c
loginutils/sulogin.c
miscutils/adjtimex.c
miscutils/devfsd.c
miscutils/hdparm.c
miscutils/less.c
miscutils/time.c
modutils/insmod.c
networking/arp.c
networking/ftpgetput.c
networking/httpd.c
networking/interface.c
networking/ip.c
networking/ipcalc.c
networking/libiproute/ip_parse_common_args.c
networking/libiproute/ipaddress.c
networking/libiproute/iplink.c
networking/libiproute/iproute.c
networking/libiproute/iprule.c
networking/libiproute/iptunnel.c
networking/libiproute/ll_map.c
networking/libiproute/ll_map.h
networking/libiproute/rtm_map.c
networking/netstat.c
networking/route.c
networking/slattach.c
networking/telnet.c
networking/tftp.c
networking/traceroute.c
networking/udhcp/common.c
networking/udhcp/dhcpc.c
networking/udhcp/dumpleases.c
networking/udhcp/options.c
networking/vconfig.c
networking/wget.c
procps/nmeter.c
procps/renice.c
procps/sysctl.c
scripts/mkconfigs
scripts/trylink
selinux/chcon.c
selinux/runcon.c
selinux/setfiles.c
shell/ash.c
shell/hush.c
shell/lash.c
shell/msh.c
util-linux/fdisk.c
util-linux/fdisk_osf.c
util-linux/getopt.c
util-linux/hexdump.c
util-linux/hwclock.c
util-linux/mdev.c
util-linux/mount.c
util-linux/readprofile.c

index afb4663e8c3f7264d31dce053ccad1120d5220d0..f6991ac4cec754557bb9e9744f734b6a114c60aa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -569,7 +569,7 @@ busybox-all  := $(core-y) $(libs-y)
 # May be overridden by arch/$(ARCH)/Makefile
 quiet_cmd_busybox__ ?= LINK    $@
       cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
 # May be overridden by arch/$(ARCH)/Makefile
 quiet_cmd_busybox__ ?= LINK    $@
       cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
-      -o $@ -Wl,-M \
+      -o $@ -Wl,-Map -Wl,$@.map \
       -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
       -Wl,--start-group $(busybox-all) -Wl,--end-group \
       $(LDLIBS)
       -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
       -Wl,--start-group $(busybox-all) -Wl,--end-group \
       $(LDLIBS)
index e6c5bd506f6ad9f2ae7eb890dfe3d9a3b9fe8401..cf7d29751cb815662e9d9e54222ae4ee914eb449 100644 (file)
@@ -20,6 +20,6 @@ quiet_cmd_gen_usage_compressed = GEN     include/usage_compressed.h
 HOSTCFLAGS_usage.o = -I$(srctree)/include
 
 applets/applets.o:          include/usage_compressed.h
 HOSTCFLAGS_usage.o = -I$(srctree)/include
 
 applets/applets.o:          include/usage_compressed.h
-applets/usage:              .config
-include/usage_compressed.h: applets/usage
+applets/usage:              .config $(srctree)/applets/usage_compressed
+include/usage_compressed.h: applets/usage $(srctree)/applets/usage_compressed
        $(call cmd,gen_usage_compressed)
        $(call cmd,gen_usage_compressed)
index 89dea3e6a2130eceabc5bfda0b6e476997381731..6ff4301e4618ebb4919a2e56bac28de3b7bf768e 100644 (file)
@@ -34,7 +34,7 @@
 
 #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE
 /* Define usage_messages[] */
 
 #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE
 /* Define usage_messages[] */
-static const char usage_messages[] = ""
+static const char usage_messages[] ALIGN1 = ""
 #define MAKE_USAGE
 #include "usage.h"
 #include "applets.h"
 #define MAKE_USAGE
 #include "usage.h"
 #include "applets.h"
@@ -108,12 +108,12 @@ static char *get_trimmed_slice(char *s, char *e)
 }
 
 /* Don't depend on the tools to combine strings. */
 }
 
 /* Don't depend on the tools to combine strings. */
-static const char config_file[] = "/etc/busybox.conf";
+static const char config_file[] ALIGN1 = "/etc/busybox.conf";
 
 /* We don't supply a value for the nul, so an index adjustment is
  * necessary below.  Also, we use unsigned short here to save some
  * space even though these are really mode_t values. */
 
 /* We don't supply a value for the nul, so an index adjustment is
  * necessary below.  Also, we use unsigned short here to save some
  * space even though these are really mode_t values. */
-static const unsigned short mode_mask[] = {
+static const unsigned short mode_mask[] ALIGN2 = {
        /*  SST     sst                 xxx         --- */
        S_ISUID,    S_ISUID|S_IXUSR,    S_IXUSR,    0,  /* user */
        S_ISGID,    S_ISGID|S_IXGRP,    S_IXGRP,    0,  /* group */
        /*  SST     sst                 xxx         --- */
        S_ISUID,    S_ISUID|S_IXUSR,    S_IXUSR,    0,  /* user */
        S_ISGID,    S_ISGID|S_IXGRP,    S_IXGRP,    0,  /* group */
@@ -255,7 +255,7 @@ static void parse_config_file(void)
 
                                for (i = 0; i < 3; i++) {
                                        /* There are 4 chars + 1 nul for each of user/group/other. */
 
                                for (i = 0; i < 3; i++) {
                                        /* There are 4 chars + 1 nul for each of user/group/other. */
-                                       static const char mode_chars[] = "Ssx-\0" "Ssx-\0" "Ttx-";
+                                       static const char mode_chars[] ALIGN1 = "Ssx-\0" "Ssx-\0" "Ttx-";
 
                                        const char *q;
                                        q = strchrnul(mode_chars + 5*i, *e++);
 
                                        const char *q;
                                        q = strchrnul(mode_chars + 5*i, *e++);
@@ -499,8 +499,8 @@ static void install_links(const char *busybox, int use_symbolic_links)
        /* directory table
         * this should be consistent w/ the enum,
         * busybox.h::bb_install_loc_t, or else... */
        /* directory table
         * this should be consistent w/ the enum,
         * busybox.h::bb_install_loc_t, or else... */
-       static const char usr_bin [] = "/usr/bin";
-       static const char usr_sbin[] = "/usr/sbin";
+       static const char usr_bin [] ALIGN1 = "/usr/bin";
+       static const char usr_sbin[] ALIGN1 = "/usr/sbin";
        static const char *const install_dir[] = {
                &usr_bin [8], /* "", equivalent to "/" for concat_path_file() */
                &usr_bin [4], /* "/bin" */
        static const char *const install_dir[] = {
                &usr_bin [8], /* "", equivalent to "/" for concat_path_file() */
                &usr_bin [4], /* "/bin" */
index fd581cc66cc500ef81976ca38edc7c8aa738a92b..9da683088faa5d99341d8363f6f13c7a80714e17 100755 (executable)
@@ -12,7 +12,7 @@ sz=`"$loc/usage" | wc -c` || exit 1
 
 exec >"$target"
 
 
 exec >"$target"
 
-echo 'static const char packed_usage[] = '
+echo 'static const char packed_usage[] ALIGN1 = '
 "$loc/usage" | bzip2 -1 | od -v -t x1 \
 | $SED -e 's/^[^ ]*//' -e 's/  *\(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
 echo ';'
 "$loc/usage" | bzip2 -1 | od -v -t x1 \
 | $SED -e 's/^[^ ]*//' -e 's/  *\(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
 echo ';'
index e85ca5c6fdd36b10e58fd29fc6fba9e67e60c8bb..7b16c2b5925852ea5902f08d26cf03557fe34850 100644 (file)
@@ -41,10 +41,11 @@ static void header_verbose_list_ar(const file_header_t *file_header)
 int ar_main(int argc, char **argv);
 int ar_main(int argc, char **argv)
 {
 int ar_main(int argc, char **argv);
 int ar_main(int argc, char **argv)
 {
+       static const char msg_unsupported_err[] ALIGN1 =
+               "archive %s is not supported";
+
        archive_handle_t *archive_handle;
        unsigned opt;
        archive_handle_t *archive_handle;
        unsigned opt;
-       static const char msg_unsupported_err[] =
-                       "Archive %s not supported.  Install binutils 'ar'.";
        char magic[8];
 
        archive_handle = init_handle();
        char magic[8];
 
        archive_handle = init_handle();
@@ -88,7 +89,8 @@ int ar_main(int argc, char **argv)
        }
        archive_handle->offset += 7;
 
        }
        archive_handle->offset += 7;
 
-       while (get_header_ar(archive_handle) == EXIT_SUCCESS) /* repeat */;
+       while (get_header_ar(archive_handle) == EXIT_SUCCESS)
+               continue;
 
        return EXIT_SUCCESS;
 }
 
        return EXIT_SUCCESS;
 }
index bd729a2a9048421881d2191b80258909d2578ede..0c1f96fc97ab6a04cf943aa54491358d6042e9b3 100644 (file)
@@ -582,7 +582,8 @@ static int read_package_field(const char *package_buffer, char **field_name, cha
 
 static unsigned fill_package_struct(char *control_buffer)
 {
 
 static unsigned fill_package_struct(char *control_buffer)
 {
-       static const char field_names[] = "Package\0""Version\0"
+       static const char field_names[] ALIGN1 =
+               "Package\0""Version\0"
                "Pre-Depends\0""Depends\0""Replaces\0""Provides\0"
                "Conflicts\0""Suggests\0""Recommends\0""Enhances\0";
 
                "Pre-Depends\0""Depends\0""Replaces\0""Provides\0"
                "Conflicts\0""Suggests\0""Recommends\0""Enhances\0";
 
@@ -1226,7 +1227,7 @@ static int run_package_script(const char *package_name, const char *script_type)
        return result;
 }
 
        return result;
 }
 
-static const char *all_control_files[] = {
+static const char *const all_control_files[] = {
        "preinst", "postinst", "prerm", "postrm",
        "list", "md5sums", "shlibs", "conffiles",
        "config", "templates", NULL
        "preinst", "postinst", "prerm", "postrm",
        "list", "md5sums", "shlibs", "conffiles",
        "config", "templates", NULL
index 08c660e40aba7b958e961243822e01cacd9671f0..83d78e47c7a7736d5ca0a6b768a21f33781807dd 100644 (file)
@@ -768,26 +768,24 @@ static void check_match(IPos start, IPos match, int length)
 #define BL_CODES  19
 /* number of codes used to transfer the bit lengths */
 
 #define BL_CODES  19
 /* number of codes used to transfer the bit lengths */
 
-typedef uch extra_bits_t;
-
 /* extra bits for each length code */
 /* extra bits for each length code */
-static const extra_bits_t extra_lbits[LENGTH_CODES]= {
+static const uint8_t extra_lbits[LENGTH_CODES] ALIGN1 = {
        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4,
        4, 4, 5, 5, 5, 5, 0
 };
 
 /* extra bits for each distance code */
        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4,
        4, 4, 5, 5, 5, 5, 0
 };
 
 /* extra bits for each distance code */
-static const extra_bits_t extra_dbits[D_CODES] = {
+static const uint8_t extra_dbits[D_CODES] ALIGN1 = {
        0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,
        10, 10, 11, 11, 12, 12, 13, 13
 };
 
 /* extra bits for each bit length code */
        0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,
        10, 10, 11, 11, 12, 12, 13, 13
 };
 
 /* extra bits for each bit length code */
-static const extra_bits_t extra_blbits[BL_CODES] = {
+static const uint8_t extra_blbits[BL_CODES] ALIGN1 = {
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7 };
 
 /* number of codes at each bit length for an optimal tree */
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7 };
 
 /* number of codes at each bit length for an optimal tree */
-static const uch bl_order[BL_CODES] = {
+static const uint8_t bl_order[BL_CODES] ALIGN1 = {
        16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
 
 #define STORED_BLOCK 0
        16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
 
 #define STORED_BLOCK 0
@@ -861,7 +859,7 @@ typedef struct ct_data {
 typedef struct tree_desc {
        ct_data *dyn_tree;      /* the dynamic tree */
        ct_data *static_tree;   /* corresponding static tree or NULL */
 typedef struct tree_desc {
        ct_data *dyn_tree;      /* the dynamic tree */
        ct_data *static_tree;   /* corresponding static tree or NULL */
-       const extra_bits_t *extra_bits; /* extra bits for each code or NULL */
+       const uint8_t *extra_bits;      /* extra bits for each code or NULL */
        int extra_base;         /* base index for extra_bits */
        int elems;                      /* max number of elements in the tree */
        int max_length;         /* max bit length for the codes */
        int extra_base;         /* base index for extra_bits */
        int elems;                      /* max number of elements in the tree */
        int max_length;         /* max bit length for the codes */
@@ -1064,7 +1062,7 @@ static void pqdownheap(ct_data * tree, int k)
 static void gen_bitlen(tree_desc * desc)
 {
        ct_data *tree = desc->dyn_tree;
 static void gen_bitlen(tree_desc * desc)
 {
        ct_data *tree = desc->dyn_tree;
-       const extra_bits_t *extra = desc->extra_bits;
+       const uint8_t *extra = desc->extra_bits;
        int base = desc->extra_base;
        int max_code = desc->max_code;
        int max_length = desc->max_length;
        int base = desc->extra_base;
        int max_code = desc->max_code;
        int max_length = desc->max_length;
index c698763d38c85d5013e7320ac3c91346bef38de9..ead628ed507fdc4b7caf58c12bb59a9882e6b75f 100644 (file)
@@ -182,39 +182,39 @@ static state_t* alloc_state(void)
 #endif
 
 
 #endif
 
 
-static const unsigned short mask_bits[] = {
+static const unsigned short mask_bits[] ALIGN2 = {
        0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
        0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
 };
 
 /* Copy lengths for literal codes 257..285 */
        0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
        0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
 };
 
 /* Copy lengths for literal codes 257..285 */
-static const unsigned short cplens[] = {
+static const unsigned short cplens[] ALIGN2 = {
        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59,
        67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
 };
 
 /* note: see note #13 above about the 258 in this list. */
 /* Extra bits for literal codes 257..285 */
        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59,
        67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
 };
 
 /* note: see note #13 above about the 258 in this list. */
 /* Extra bits for literal codes 257..285 */
-static const unsigned char cplext[] = {
+static const unsigned char cplext[] ALIGN1 = {
        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5,
        5, 5, 5, 0, 99, 99
 }; /* 99 == invalid */
 
 /* Copy offsets for distance codes 0..29 */
        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5,
        5, 5, 5, 0, 99, 99
 }; /* 99 == invalid */
 
 /* Copy offsets for distance codes 0..29 */
-static const unsigned short cpdist[] = {
+static const unsigned short cpdist[] ALIGN2 = {
        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513,
        769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577
 };
 
 /* Extra bits for distance codes */
        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513,
        769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577
 };
 
 /* Extra bits for distance codes */
-static const unsigned char cpdext[] = {
+static const unsigned char cpdext[] ALIGN1 = {
        0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10,
        11, 11, 12, 12, 13, 13
 };
 
 /* Tables for deflate from PKZIP's appnote.txt. */
 /* Order of the bit length code lengths */
        0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10,
        11, 11, 12, 12, 13, 13
 };
 
 /* Tables for deflate from PKZIP's appnote.txt. */
 /* Order of the bit length code lengths */
-static const unsigned char border[] = {
+static const unsigned char border[] ALIGN1 = {
        16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
 };
 
        16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
 };
 
index 7d7bf79d6e7e2d28f6059afb2a09b0fc82e7d64d..bed8cf24c71999c941ac836dbeabfc97fb4e6fa7 100644 (file)
@@ -715,7 +715,7 @@ enum {
        OPT_NOPRESERVE_PERM = 1 << OPTBIT_NOPRESERVE_PERM, // no-same-permissions
 };
 #if ENABLE_FEATURE_TAR_LONG_OPTIONS
        OPT_NOPRESERVE_PERM = 1 << OPTBIT_NOPRESERVE_PERM, // no-same-permissions
 };
 #if ENABLE_FEATURE_TAR_LONG_OPTIONS
-static const char tar_longopts[] =
+static const char tar_longopts[] ALIGN1 =
        "list\0"                No_argument       "t"
        "extract\0"             No_argument       "x"
        "directory\0"           Required_argument "C"
        "list\0"                No_argument       "t"
        "extract\0"             No_argument       "x"
        "directory\0"           Required_argument "C"
index 5908dad488da6f71214bb47e64b45532c690d5f0..a9bbc78d5ab3814b5698ee717609b3e9f2856daa 100644 (file)
@@ -11,7 +11,7 @@
 #include "libbb.h"
 
 #if ENABLE_FEATURE_SETCONSOLE_LONG_OPTIONS
 #include "libbb.h"
 
 #if ENABLE_FEATURE_SETCONSOLE_LONG_OPTIONS
-static const char setconsole_longopts[] =
+static const char setconsole_longopts[] ALIGN1 =
        "reset\0" No_argument "r"
        ;
 #endif
        "reset\0" No_argument "r"
        ;
 #endif
index f8fc0b0d3456b4a9c7fe64585fda9690068e429f..37aca00bb2426b3300157754f451a7647c8ca532 100644 (file)
 #define        MAXDAYS                 42              /* max slots in a month array */
 #define        SPACE                   -1              /* used in day array */
 
 #define        MAXDAYS                 42              /* max slots in a month array */
 #define        SPACE                   -1              /* used in day array */
 
-static const unsigned char days_in_month[] = {
+static const unsigned char days_in_month[] ALIGN1 = {
        0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
 };
 
        0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
 };
 
-static const unsigned char sep1752[] = {
+static const unsigned char sep1752[] ALIGN1 = {
                 1,     2,      14,     15,     16,
        17,     18,     19,     20,     21,     22,     23,
        24,     25,     26,     27,     28,     29,     30
                 1,     2,      14,     15,     16,
        17,     18,     19,     20,     21,     22,     23,
        24,     25,     26,     27,     28,     29,     30
index 435b21070f2221d4c79ba7e1436966519c84e535..2598a9a7c2eb7d9c9ed2d187d70fc5f039826bb7 100644 (file)
@@ -15,7 +15,7 @@
 
 
 /* option vars */
 
 
 /* option vars */
-static const char optstring[] = "b:c:f:d:sn";
+static const char optstring[] ALIGN1 = "b:c:f:d:sn";
 #define CUT_OPT_BYTE_FLGS      (1<<0)
 #define CUT_OPT_CHAR_FLGS      (1<<1)
 #define CUT_OPT_FIELDS_FLGS    (1<<2)
 #define CUT_OPT_BYTE_FLGS      (1<<0)
 #define CUT_OPT_CHAR_FLGS      (1<<1)
 #define CUT_OPT_FIELDS_FLGS    (1<<2)
@@ -163,7 +163,7 @@ static void cut_file(FILE * file)
        }
 }
 
        }
 }
 
-static const char _op_on_field[] = " only when operating on fields";
+static const char _op_on_field[] ALIGN1 = " only when operating on fields";
 
 int cut_main(int argc, char **argv);
 int cut_main(int argc, char **argv)
 
 int cut_main(int argc, char **argv);
 int cut_main(int argc, char **argv)
index 5e2bcee3bf01cd454cd0d650047443c6f7c7107f..5ee70f70375e5a025e9c36c4bd512e1e74a8beb4 100644 (file)
@@ -63,8 +63,9 @@ int date_main(int argc, char **argv)
                if (!isofmt_arg) {
                        ifmt = 0; /* default is date */
                } else {
                if (!isofmt_arg) {
                        ifmt = 0; /* default is date */
                } else {
-                       static const char * const isoformats[] =
-                               { "date", "hours", "minutes", "seconds" };
+                       static const char *const isoformats[] = {
+                               "date", "hours", "minutes", "seconds"
+                       };
 
                        for (ifmt = 0; ifmt < 4; ifmt++)
                                if (!strcmp(isofmt_arg, isoformats[ifmt]))
 
                        for (ifmt = 0; ifmt < 4; ifmt++)
                                if (!strcmp(isofmt_arg, isoformats[ifmt]))
index 3b4b1d785a985cd80b8da8eaf4a34fee2bf8aba3..b17bb5969c3b1fa6c87064b9488d80f7f61d61c7 100644 (file)
@@ -46,7 +46,7 @@ static void dd_output_status(int ATTRIBUTE_UNUSED cur_signal)
 }
 
 static ssize_t full_write_or_warn(int fd, const void *buf, size_t len,
 }
 
 static ssize_t full_write_or_warn(int fd, const void *buf, size_t len,
-       const char * const filename)
+       const char *const filename)
 {
        ssize_t n = full_write(fd, buf, len);
        if (n < 0)
 {
        ssize_t n = full_write(fd, buf, len);
        if (n < 0)
@@ -83,7 +83,7 @@ int dd_main(int argc, char **argv)
                FLAG_TWOBUFS = 1 << 3,
                FLAG_COUNT   = 1 << 4,
        };
                FLAG_TWOBUFS = 1 << 3,
                FLAG_COUNT   = 1 << 4,
        };
-       static const char keywords[] =
+       static const char keywords[] ALIGN1 =
                "bs=\0""count=\0""seek=\0""skip=\0""if=\0""of=\0"
 #if ENABLE_FEATURE_DD_IBS_OBS
                "ibs=\0""obs=\0""conv=\0""notrunc\0""sync\0""noerror\0"
                "bs=\0""count=\0""seek=\0""skip=\0""if=\0""of=\0"
 #if ENABLE_FEATURE_DD_IBS_OBS
                "ibs=\0""obs=\0""conv=\0""notrunc\0""sync\0""noerror\0"
index 82730806edce899470c23e8668e5526bdc7f7104..5154eeb451140c3540e99dea334accc0f925bb63 100644 (file)
@@ -42,7 +42,8 @@ int df_main(int argc, char **argv)
        FILE *mount_table;
        struct mntent *mount_entry;
        struct statfs s;
        FILE *mount_table;
        struct mntent *mount_entry;
        struct statfs s;
-       static const char hdr_1k[] = "1k-blocks"; /* default display is kilobytes */
+       /* default display is kilobytes */
+       static const char hdr_1k[] ALIGN1 = "1k-blocks";
        const char *disp_units_hdr = hdr_1k;
 
 #ifdef CONFIG_FEATURE_HUMAN_READABLE
        const char *disp_units_hdr = hdr_1k;
 
 #ifdef CONFIG_FEATURE_HUMAN_READABLE
index cb3e715d9a7c76c1f28f963420f0eeb374acdc8d..19748719a0dd285441703109c2cd8875f75d6988 100644 (file)
@@ -48,7 +48,7 @@ static int one_file_system;
 static dev_t dir_dev;
 
 
 static dev_t dir_dev;
 
 
-static void print(long size, const char * const filename)
+static void print(long size, const char *const filename)
 {
        /* TODO - May not want to defer error checking here. */
 #if ENABLE_FEATURE_HUMAN_READABLE
 {
        /* TODO - May not want to defer error checking here. */
 #if ENABLE_FEATURE_HUMAN_READABLE
@@ -64,7 +64,7 @@ static void print(long size, const char * const filename)
 }
 
 /* tiny recursive du */
 }
 
 /* tiny recursive du */
-static long du(const char * const filename)
+static long du(const char *const filename)
 {
        struct stat statbuf;
        long sum;
 {
        struct stat statbuf;
        long sum;
index 3008358ec58a3bf7744913ddc1b3ec5102c25e42..dc8667181e9c015aca72a7d3e1f178a323766cc9 100644 (file)
@@ -35,7 +35,7 @@ extern char **environ;
 #include "libbb.h"
 
 #if ENABLE_FEATURE_ENV_LONG_OPTIONS
 #include "libbb.h"
 
 #if ENABLE_FEATURE_ENV_LONG_OPTIONS
-static const char env_longopts[] =
+static const char env_longopts[] ALIGN1 =
        "ignore-environment\0" No_argument       "i"
        "unset\0"              Required_argument "u"
        ;
        "ignore-environment\0" No_argument       "i"
        "unset\0"              Required_argument "u"
        ;
index 6a4683d9092b95e2379270465c03cac22b60c128..318fee721a0e1edda3da29b287e1785cd231e0a4 100644 (file)
@@ -277,7 +277,7 @@ static VALUE *eval7(void)
 
 static VALUE *eval6(void)
 {
 
 static VALUE *eval6(void)
 {
-       static const char keywords[] =
+       static const char keywords[] ALIGN1 =
                "quote\0""length\0""match\0""index\0""substr\0";
 
        VALUE *r, *i1, *i2;
                "quote\0""length\0""match\0""index\0""substr\0";
 
        VALUE *r, *i1, *i2;
index bffba4043b5aeed4c01405d5c7f9cefcb4fcd603..a48f147a28a1ff713df0010ccea1519227a05373 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "libbb.h"
 
 
 #include "libbb.h"
 
-static const char head_opts[] =
+static const char head_opts[] ALIGN1 =
        "n:"
 #if ENABLE_FEATURE_FANCY_HEAD
        "c:qv"
        "n:"
 #if ENABLE_FEATURE_FANCY_HEAD
        "c:qv"
@@ -29,7 +29,7 @@ static const struct suffix_mult head_suffixes[] = {
 };
 #endif
 
 };
 #endif
 
-static const char header_fmt_str[] = "\n==> %s <==\n";
+static const char header_fmt_str[] ALIGN1 = "\n==> %s <==\n";
 
 int head_main(int argc, char **argv);
 int head_main(int argc, char **argv)
 
 int head_main(int argc, char **argv);
 int head_main(int argc, char **argv)
index c2638f49240c9b30c64ed53e5fa263c2e6bedb87..79cd020362b74ace5f9fee2a7266c268a63c7b62 100644 (file)
@@ -16,7 +16,7 @@
 #include "libcoreutils/coreutils.h"
 
 #if ENABLE_FEATURE_INSTALL_LONG_OPTIONS
 #include "libcoreutils/coreutils.h"
 
 #if ENABLE_FEATURE_INSTALL_LONG_OPTIONS
-static const char install_longopts[] =
+static const char install_longopts[] ALIGN1 =
        "directory\0"           No_argument       "d"
        "preserve-timestamps\0" No_argument       "p"
        "strip\0"               No_argument       "s"
        "directory\0"           No_argument       "d"
        "preserve-timestamps\0" No_argument       "p"
        "strip\0"               No_argument       "s"
index 920fad85e9656c5caee298c73aa0f4c4f6535e17..2b292555740edab62d69baa30fc3389caf96518d 100644 (file)
@@ -120,7 +120,7 @@ SPLIT_SUBDIR    = 2,
 static smallint show_color;
 /* long option entry used only for --color, which has no short option
  * equivalent */
 static smallint show_color;
 /* long option entry used only for --color, which has no short option
  * equivalent */
-static const char ls_color_opt[] =
+static const char ls_color_opt[] ALIGN1 =
        "color\0" Optional_argument "\xff" /* no short equivalent */
        ;
 #else
        "color\0" Optional_argument "\xff" /* no short equivalent */
        ;
 #else
@@ -710,7 +710,8 @@ static int list_single(struct dnode *dn)
 /* "[-]SXvThw", GNU options, busybox optionally supports */
 /* "[-]K", SELinux mandated options, busybox optionally supports */
 /* "[-]e", I think we made this one up */
 /* "[-]SXvThw", GNU options, busybox optionally supports */
 /* "[-]K", SELinux mandated options, busybox optionally supports */
 /* "[-]e", I think we made this one up */
-static const char ls_options[] = "Cadil1gnsxAk"
+static const char ls_options[] ALIGN1 =
+       "Cadil1gnsxAk"
        USE_FEATURE_LS_TIMESTAMPS("cetu")
        USE_FEATURE_LS_SORTFILES("SXrv")
        USE_FEATURE_LS_FILETYPES("Fp")
        USE_FEATURE_LS_TIMESTAMPS("cetu")
        USE_FEATURE_LS_SORTFILES("SXrv")
        USE_FEATURE_LS_FILETYPES("Fp")
index a6eaa9612937a5e651a1eba5508dc0329a517874..22a070c31ac36af54c97868425feb4f867afcf45 100644 (file)
@@ -25,7 +25,7 @@
 /* This is a NOFORK applet. Be very careful! */
 
 #if ENABLE_FEATURE_MKDIR_LONG_OPTIONS
 /* This is a NOFORK applet. Be very careful! */
 
 #if ENABLE_FEATURE_MKDIR_LONG_OPTIONS
-static const char mkdir_longopts[] =
+static const char mkdir_longopts[] ALIGN1 =
        "mode\0"    Required_argument "m"
        "parents\0" No_argument       "p"
 #if ENABLE_SELINUX
        "mode\0"    Required_argument "m"
        "parents\0" No_argument       "p"
 #if ENABLE_SELINUX
index 415ef55c167661b003c5676189bfbb2da705d427..ea6f24ae6a2f21568f86e5ddbb4a5c54b79f63e3 100644 (file)
@@ -14,7 +14,7 @@
 #include "libbb.h"
 #include "libcoreutils/coreutils.h"
 
 #include "libbb.h"
 #include "libcoreutils/coreutils.h"
 
-static const char modes_chars[] = { 'p', 'c', 'u', 'b', 0, 1, 1, 2 };
+static const char modes_chars[] ALIGN1 = { 'p', 'c', 'u', 'b', 0, 1, 1, 2 };
 static const mode_t modes_cubp[] = { S_IFIFO, S_IFCHR, S_IFBLK };
 
 int mknod_main(int argc, char **argv);
 static const mode_t modes_cubp[] = { S_IFIFO, S_IFCHR, S_IFBLK };
 
 int mknod_main(int argc, char **argv);
index 064407838a647cb12732f74bca2d6c5144e7ba68..4cd0fcfbaf7b98e1bb122a43e6004a754c7f8a35 100644 (file)
@@ -21,7 +21,7 @@
 #include "libcoreutils/coreutils.h"
 
 #if ENABLE_FEATURE_MV_LONG_OPTIONS
 #include "libcoreutils/coreutils.h"
 
 #if ENABLE_FEATURE_MV_LONG_OPTIONS
-static const char mv_longopts[] =
+static const char mv_longopts[] ALIGN1 =
        "interactive\0" No_argument "i"
        "force\0"       No_argument "f"
        ;
        "interactive\0" No_argument "i"
        "force\0"       No_argument "f"
        ;
@@ -30,7 +30,8 @@ static const char mv_longopts[] =
 #define OPT_FILEUTILS_FORCE       1
 #define OPT_FILEUTILS_INTERACTIVE 2
 
 #define OPT_FILEUTILS_FORCE       1
 #define OPT_FILEUTILS_INTERACTIVE 2
 
-static const char fmt[] = "cannot overwrite %sdirectory with %sdirectory";
+static const char fmt[] ALIGN1 =
+       "cannot overwrite %sdirectory with %sdirectory";
 
 int mv_main(int argc, char **argv);
 int mv_main(int argc, char **argv)
 
 int mv_main(int argc, char **argv);
 int mv_main(int argc, char **argv)
index 00de080b69ef4cc3dbb9377795df4f0b1d6b56fe..114a746fa6133fcb9397bf1450642b072c8b38a3 100644 (file)
@@ -131,7 +131,7 @@ odoffset(int argc, char ***argvp)
        }
 }
 
        }
 }
 
-static const char * const add_strings[] = {
+static const char *const add_strings[] = {
        "16/1 \"%3_u \" \"\\n\"",                               /* a */
        "8/2 \" %06o \" \"\\n\"",                               /* B, o */
        "16/1 \"%03o \" \"\\n\"",                               /* b */
        "16/1 \"%3_u \" \"\\n\"",                               /* a */
        "8/2 \" %06o \" \"\\n\"",                               /* B, o */
        "16/1 \"%03o \" \"\\n\"",                               /* b */
@@ -147,9 +147,9 @@ static const char * const add_strings[] = {
        "4/4 \"    %011o \" \"\\n\"",                   /* O */
 };
 
        "4/4 \"    %011o \" \"\\n\"",                   /* O */
 };
 
-static const char od_opts[] = "aBbcDdeFfHhIiLlOoXxv";
+static const char od_opts[] ALIGN1 = "aBbcDdeFfHhIiLlOoXxv";
 
 
-static const char od_o2si[] = {
+static const char od_o2si[] ALIGN1 = {
        0, 1, 2, 3, 5,
        4, 6, 6, 7, 8,
        9, 0xa, 0xb, 0xa, 0xa,
        0, 1, 2, 3, 5,
        4, 6, 6, 7, 8,
        9, 0xa, 0xb, 0xa, 0xa,
index e3086054462f00b14850fce74253555e585c5963..d3c9f9a1720dc673c58917178ca013d0b0b2a6bc 100644 (file)
@@ -129,20 +129,20 @@ struct tspec {
    10  unsigned decimal
    8   unsigned hexadecimal  */
 
    10  unsigned decimal
    8   unsigned hexadecimal  */
 
-static const uint8_t bytes_to_oct_digits[] =
+static const uint8_t bytes_to_oct_digits[] ALIGN1 =
 {0, 3, 6, 8, 11, 14, 16, 19, 22, 25, 27, 30, 32, 35, 38, 41, 43};
 
 {0, 3, 6, 8, 11, 14, 16, 19, 22, 25, 27, 30, 32, 35, 38, 41, 43};
 
-static const uint8_t bytes_to_signed_dec_digits[] =
+static const uint8_t bytes_to_signed_dec_digits[] ALIGN1 =
 {1, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 28, 30, 33, 35, 37, 40};
 
 {1, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 28, 30, 33, 35, 37, 40};
 
-static const uint8_t bytes_to_unsigned_dec_digits[] =
+static const uint8_t bytes_to_unsigned_dec_digits[] ALIGN1 =
 {0, 3, 5, 8, 10, 13, 15, 17, 20, 22, 25, 27, 29, 32, 34, 37, 39};
 
 {0, 3, 5, 8, 10, 13, 15, 17, 20, 22, 25, 27, 29, 32, 34, 37, 39};
 
-static const uint8_t bytes_to_hex_digits[] =
+static const uint8_t bytes_to_hex_digits[] ALIGN1 =
 {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32};
 
 /* Convert enum size_spec to the size of the named type.  */
 {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32};
 
 /* Convert enum size_spec to the size of the named type.  */
-static const signed char width_bytes[] = {
+static const signed char width_bytes[] ALIGN1 = {
        -1,
        sizeof(char),
        sizeof(short),
        -1,
        sizeof(char),
        sizeof(short),
@@ -212,7 +212,7 @@ static char const *const default_file_list[] = { "-", NULL };
 static FILE *in_stream;
 
 #define MAX_INTEGRAL_TYPE_SIZE sizeof(ulonglong_t)
 static FILE *in_stream;
 
 #define MAX_INTEGRAL_TYPE_SIZE sizeof(ulonglong_t)
-static unsigned char integral_type_size[MAX_INTEGRAL_TYPE_SIZE + 1] = {
+static unsigned char integral_type_size[MAX_INTEGRAL_TYPE_SIZE + 1] ALIGN1 = {
        [sizeof(char)] = CHAR,
 #if USHRT_MAX != UCHAR_MAX
        [sizeof(short)] = SHORT,
        [sizeof(char)] = CHAR,
 #if USHRT_MAX != UCHAR_MAX
        [sizeof(short)] = SHORT,
@@ -229,11 +229,11 @@ static unsigned char integral_type_size[MAX_INTEGRAL_TYPE_SIZE + 1] = {
 };
 
 #define MAX_FP_TYPE_SIZE sizeof(longdouble_t)
 };
 
 #define MAX_FP_TYPE_SIZE sizeof(longdouble_t)
-static unsigned char fp_type_size[MAX_FP_TYPE_SIZE + 1] = {
+static unsigned char fp_type_size[MAX_FP_TYPE_SIZE + 1] ALIGN1 = {
        /* gcc seems to allow repeated indexes. Last one stays */
        [sizeof(longdouble_t)] = FLOAT_LONG_DOUBLE,
        [sizeof(double)] = FLOAT_DOUBLE,
        /* gcc seems to allow repeated indexes. Last one stays */
        [sizeof(longdouble_t)] = FLOAT_LONG_DOUBLE,
        [sizeof(double)] = FLOAT_DOUBLE,
-       [sizeof(float)] = FLOAT_SINGLE,
+       [sizeof(float)] = FLOAT_SINGLE
 };
 
 
 };
 
 
@@ -383,7 +383,7 @@ print_named_ascii(size_t n_bytes, const char *block,
                const char *unused_fmt_string ATTRIBUTE_UNUSED)
 {
        /* Names for some non-printing characters.  */
                const char *unused_fmt_string ATTRIBUTE_UNUSED)
 {
        /* Names for some non-printing characters.  */
-       static const char charname[33][3] = {
+       static const char charname[33][3] ALIGN1 = {
                "nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel",
                " bs", " ht", " nl", " vt", " ff", " cr", " so", " si",
                "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb",
                "nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel",
                " bs", " ht", " nl", " vt", " ff", " cr", " so", " si",
                "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,
        case 'o':
        case 'u':
        case 'x': {
        case 'o':
        case 'u':
        case 'x': {
-               static const char CSIL[] = "CSIL";
+               static const char CSIL[] ALIGN1 = "CSIL";
 
                c = *s++;
                p = strchr(CSIL, *s);
 
                c = *s++;
                p = strchr(CSIL, *s);
@@ -596,7 +596,7 @@ decode_one_format(const char *s_orig, const char *s, const char **next,
                size_spec = integral_type_size[size];
 
                {
                size_spec = integral_type_size[size];
 
                {
-                       static const char doux[] = "doux";
+                       static const char doux[] ALIGN1 = "doux";
                        static const char doux_fmt_letter[][4] = {
                                "lld", "llo", "llu", "llx"
                        };
                        static const char doux_fmt_letter[][4] = {
                                "lld", "llo", "llu", "llx"
                        };
@@ -653,7 +653,7 @@ decode_one_format(const char *s_orig, const char *s, const char **next,
        }
 
        case 'f': {
        }
 
        case 'f': {
-               static const char FDL[] = "FDL";
+               static const char FDL[] ALIGN1 = "FDL";
 
                fmt = FLOATING_POINT;
                ++s;
 
                fmt = FLOATING_POINT;
                ++s;
@@ -836,7 +836,7 @@ format_address_none(off_t address ATTRIBUTE_UNUSED, char c ATTRIBUTE_UNUSED)
 {
 }
 
 {
 }
 
-static char address_fmt[] = "%0n"OFF_FMT"xc";
+static char address_fmt[] ALIGN1 = "%0n"OFF_FMT"xc";
 /* Corresponds to 'x' above */
 #define address_base_char address_fmt[sizeof(address_fmt)-3]
 /* Corresponds to 'n' above */
 /* Corresponds to 'x' above */
 #define address_base_char address_fmt[sizeof(address_fmt)-3]
 /* Corresponds to 'n' above */
@@ -1233,7 +1233,7 @@ int od_main(int argc, char **argv)
                OPT_traditional = (1 << 18) * ENABLE_GETOPT_LONG,
        };
 #if ENABLE_GETOPT_LONG
                OPT_traditional = (1 << 18) * ENABLE_GETOPT_LONG,
        };
 #if ENABLE_GETOPT_LONG
-       static const char od_longopts[] =
+       static const char od_longopts[] ALIGN1 =
                "skip-bytes\0"        Required_argument "j"
                "address-radix\0"     Required_argument "A"
                "read-bytes\0"        Required_argument "N"
                "skip-bytes\0"        Required_argument "j"
                "address-radix\0"     Required_argument "A"
                "read-bytes\0"        Required_argument "N"
@@ -1268,11 +1268,11 @@ int od_main(int argc, char **argv)
        argc -= optind;
        argv += optind;
        if (opt & OPT_A) {
        argc -= optind;
        argv += optind;
        if (opt & OPT_A) {
-               static const char doxn[] = "doxn";
-               static const char doxn_address_base_char[] = {
+               static const char doxn[] ALIGN1 = "doxn";
+               static const char doxn_address_base_char[] ALIGN1 = {
                        'u', 'o', 'x', /* '?' fourth one is not important */
                };
                        'u', 'o', 'x', /* '?' fourth one is not important */
                };
-               static const uint8_t doxn_address_pad_len_char[] = {
+               static const uint8_t doxn_address_pad_len_char[] ALIGN1 = {
                        '7', '7', '6', /* '?' */
                };
                char *p;
                        '7', '7', '6', /* '?' */
                };
                char *p;
index 6371139cbcffc99e8debb2cb6ed0c6ebd9fbd8ca..98c1bc34aa63eac4740341e73f8e7d6764601066 100644 (file)
@@ -23,7 +23,7 @@
 */
 
 /* These are sort types */
 */
 
 /* These are sort types */
-static const char OPT_STR[] = "ngMucszbrdfimS:T:o:k:t:";
+static const char OPT_STR[] ALIGN1 = "ngMucszbrdfimS:T:o:k:t:";
 enum {
        FLAG_n  = 1,            /* Numeric sort */
        FLAG_g  = 2,            /* Sort using strtod() */
 enum {
        FLAG_n  = 1,            /* Numeric sort */
        FLAG_g  = 2,            /* Sort using strtod() */
index 7c72127c50ffd74f7494f6baa36b282ad715a691..0fddea2bb4101276510303e90b9475cc1cb9c6b8 100644 (file)
@@ -21,7 +21,7 @@
 #define OPT_DEREFERENCE        (1<<2)
 #define OPT_SELINUX            (1<<3)
 
 #define OPT_DEREFERENCE        (1<<2)
 #define OPT_SELINUX            (1<<3)
 
-static char buf[sizeof("YYYY-MM-DD HH:MM:SS.000000000")];
+static char buf[sizeof("YYYY-MM-DD HH:MM:SS.000000000")] ALIGN1;
 
 static char const * file_type(struct stat const *st)
 {
 
 static char const * file_type(struct stat const *st)
 {
@@ -70,7 +70,7 @@ static char const *human_fstype(long f_type)
        int i;
        static const struct types {
                long type;
        int i;
        static const struct types {
                long type;
-               const char * const fs;
+               const char *const fs;
        } humantypes[] = {
                { 0xADFF,     "affs" },
                { 0x1Cd1,     "devpts" },
        } humantypes[] = {
                { 0xADFF,     "affs" },
                { 0x1Cd1,     "devpts" },
@@ -118,7 +118,7 @@ static char const *human_fstype(long f_type)
 #if ENABLE_FEATURE_STAT_FORMAT
 /* print statfs info */
 static void print_statfs(char *pformat, const size_t buf_len, const char m,
 #if ENABLE_FEATURE_STAT_FORMAT
 /* print statfs info */
 static void print_statfs(char *pformat, const size_t buf_len, const char m,
-                        const char * const filename, void const *data
+                        const char *const filename, void const *data
                         USE_SELINUX(, security_context_t scontext))
 {
        struct statfs const *statfsbuf = data;
                         USE_SELINUX(, security_context_t scontext))
 {
        struct statfs const *statfsbuf = data;
@@ -168,7 +168,7 @@ static void print_statfs(char *pformat, const size_t buf_len, const char m,
 
 /* print stat info */
 static void print_stat(char *pformat, const size_t buf_len, const char m,
 
 /* print stat info */
 static void print_stat(char *pformat, const size_t buf_len, const char m,
-                      const char * const filename, void const *data
+                      const char *const filename, void const *data
                           USE_SELINUX(, security_context_t scontext))
 {
 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
                           USE_SELINUX(, security_context_t scontext))
 {
 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
index fbb72baa94da8950429a62d0206c5fa9076f0c36..863f28d92eb1b73de71c233400f8cafa2da25446 100644 (file)
@@ -127,28 +127,28 @@ enum {
        control, input, output, local, combination
 };
 
        control, input, output, local, combination
 };
 
-static const char evenp     [] = "evenp";
-static const char raw       [] = "raw";
-static const char stty_min  [] = "min";
-static const char stty_time [] = "time";
-static const char stty_swtch[] = "swtch";
-static const char stty_eol  [] = "eol";
-static const char stty_eof  [] = "eof";
-static const char parity    [] = "parity";
-static const char stty_oddp [] = "oddp";
-static const char stty_nl   [] = "nl";
-static const char stty_ek   [] = "ek";
-static const char stty_sane [] = "sane";
-static const char cbreak    [] = "cbreak";
-static const char stty_pass8[] = "pass8";
-static const char litout    [] = "litout";
-static const char cooked    [] = "cooked";
-static const char decctlq   [] = "decctlq";
-static const char stty_tabs [] = "tabs";
-static const char stty_lcase[] = "lcase";
-static const char stty_LCASE[] = "LCASE";
-static const char stty_crt  [] = "crt";
-static const char stty_dec  [] = "dec";
+static const char evenp     [] ALIGN1 = "evenp";
+static const char raw       [] ALIGN1 = "raw";
+static const char stty_min  [] ALIGN1 = "min";
+static const char stty_time [] ALIGN1 = "time";
+static const char stty_swtch[] ALIGN1 = "swtch";
+static const char stty_eol  [] ALIGN1 = "eol";
+static const char stty_eof  [] ALIGN1 = "eof";
+static const char parity    [] ALIGN1 = "parity";
+static const char stty_oddp [] ALIGN1 = "oddp";
+static const char stty_nl   [] ALIGN1 = "nl";
+static const char stty_ek   [] ALIGN1 = "ek";
+static const char stty_sane [] ALIGN1 = "sane";
+static const char cbreak    [] ALIGN1 = "cbreak";
+static const char stty_pass8[] ALIGN1 = "pass8";
+static const char litout    [] ALIGN1 = "litout";
+static const char cooked    [] ALIGN1 = "cooked";
+static const char decctlq   [] ALIGN1 = "decctlq";
+static const char stty_tabs [] ALIGN1 = "tabs";
+static const char stty_lcase[] ALIGN1 = "lcase";
+static const char stty_LCASE[] ALIGN1 = "LCASE";
+static const char stty_crt  [] ALIGN1 = "crt";
+static const char stty_dec  [] ALIGN1 = "dec";
 
 /* Flags for 'struct mode_info' */
 #define SANE_SET 1              /* Set in 'sane' mode                  */
 
 /* Flags for 'struct mode_info' */
 #define SANE_SET 1              /* Set in 'sane' mode                  */
@@ -158,7 +158,7 @@ static const char stty_dec  [] = "dec";
 
 /* Each mode */
 struct mode_info {
 
 /* Each mode */
 struct mode_info {
-       const char * const name;      /* Name given on command line           */
+       const char *const name;      /* Name given on command line           */
        const unsigned char type;     /* Which structure element to change    */
        const unsigned char flags;    /* Setting and display options          */
        /* were using short here, but ppc32 was unhappy: */
        const unsigned char type;     /* Which structure element to change    */
        const unsigned char flags;    /* Setting and display options          */
        /* were using short here, but ppc32 was unhappy: */
@@ -324,7 +324,7 @@ enum {
 
 /* Control character settings */
 struct control_info {
 
 /* Control character settings */
 struct control_info {
-       const char * const name;               /* Name given on command line */
+       const char *const name;               /* Name given on command line */
        const unsigned char saneval;          /* Value to set for 'stty sane' */
        const unsigned char offset;           /* Offset in c_cc */
 };
        const unsigned char saneval;          /* Value to set for 'stty sane' */
        const unsigned char offset;           /* Offset in c_cc */
 };
@@ -417,11 +417,11 @@ static const char *visible(unsigned ch)
 
 static tcflag_t *mode_type_flag(unsigned type, const struct termios *mode)
 {
 
 static tcflag_t *mode_type_flag(unsigned type, const struct termios *mode)
 {
-       static const unsigned char tcflag_offsets[] = {
+       static const unsigned char tcflag_offsets[] ALIGN1 = {
                offsetof(struct termios, c_cflag), /* control */
                offsetof(struct termios, c_iflag), /* input */
                offsetof(struct termios, c_oflag), /* output */
                offsetof(struct termios, c_cflag), /* control */
                offsetof(struct termios, c_iflag), /* input */
                offsetof(struct termios, c_oflag), /* output */
-               offsetof(struct termios, c_lflag), /* local */
+               offsetof(struct termios, c_lflag)  /* local */
        };
 
        if (type <= local) {
        };
 
        if (type <= local) {
@@ -430,7 +430,7 @@ static tcflag_t *mode_type_flag(unsigned type, const struct termios *mode)
        return NULL;
 }
 
        return NULL;
 }
 
-static void set_speed_or_die(enum speed_setting type, const char * const arg,
+static void set_speed_or_die(enum speed_setting type, const char *const arg,
                                        struct termios * const mode)
 {
        speed_t baud;
                                        struct termios * const mode)
 {
        speed_t baud;
@@ -560,9 +560,9 @@ enum {
        param_ospeed  = 8 | 0x80,
 };
 
        param_ospeed  = 8 | 0x80,
 };
 
-static int find_param(const char * const name)
+static int find_param(const char *const name)
 {
 {
-       static const char params[] =
+       static const char params[] ALIGN1 =
                "line\0"    /* 1 */
                "rows\0"    /* 2 */
                "cols\0"    /* 3 */
                "line\0"    /* 1 */
                "rows\0"    /* 2 */
                "cols\0"    /* 3 */
index 01469169a76b1fa010ef8016ef3bd1b046edd704..ec21c4234fd63c5a11fda0b45b5781a93a1739aa 100644 (file)
@@ -63,7 +63,7 @@ static ssize_t tail_read(int fd, char *buf, size_t count)
        return r;
 }
 
        return r;
 }
 
-static const char header_fmt[] = "\n==> %s <==\n";
+static const char header_fmt[] ALIGN1 = "\n==> %s <==\n";
 
 static unsigned eat_num(const char *p)
 {
 
 static unsigned eat_num(const char *p)
 {
index 594571833e4d99eb487a356acde9ec69e4ca6add..6a34e3087ae0d4957a46c4766381bb5e42827f3e 100644 (file)
@@ -52,7 +52,7 @@ static unsigned int expand(const char *arg, char *buffer)
        unsigned i; /* XXX: FIXME: use unsigned char? */
        unsigned char ac;
 #define CLO ":]\0"
        unsigned i; /* XXX: FIXME: use unsigned char? */
        unsigned char ac;
 #define CLO ":]\0"
-       static const char classes[] =
+       static const char classes[] ALIGN1 =
                "alpha"CLO "alnum"CLO "digit"CLO "lower"CLO "upper"CLO "space"CLO
                "blank"CLO "punct"CLO "cntrl"CLO;
 #define CLASS_invalid 0 /* we increment the retval */
                "alpha"CLO "alnum"CLO "digit"CLO "lower"CLO "upper"CLO "space"CLO
                "blank"CLO "punct"CLO "cntrl"CLO;
 #define CLASS_invalid 0 /* we increment the retval */
index a934c15f4a6b52e6128d600bdff19d562b0c8423..8f07f1960c7a50ac771e8e8d4726f5d20760156f 100644 (file)
@@ -38,8 +38,8 @@ typedef struct {
        char processor[8];                      /* for "unknown" */
 } uname_info_t;
 
        char processor[8];                      /* for "unknown" */
 } uname_info_t;
 
-static const char options[] = "snrvmpa";
-static const unsigned short int utsname_offset[] = {
+static const char options[] ALIGN1 = "snrvmpa";
+static const unsigned short utsname_offset[] ALIGN2 = {
        offsetof(uname_info_t,name.sysname),
        offsetof(uname_info_t,name.nodename),
        offsetof(uname_info_t,name.release),
        offsetof(uname_info_t,name.sysname),
        offsetof(uname_info_t,name.nodename),
        offsetof(uname_info_t,name.release),
index adc196b97365efab96f8461a9e4ce914c2c1721e..a7caef991ca74051821dc228b448a7010f9c6a66 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "libbb.h"
 
 
 #include "libbb.h"
 
-static const char uniq_opts[] = "cdu" "f:s:" "cdu\0\1\2\4";
+static const char uniq_opts[] ALIGN1 = "cdu" "f:s:" "cdu\0\1\2\4";
 
 static FILE *xgetoptfile_uniq_s(char **argv, int read0write2)
 {
 
 static FILE *xgetoptfile_uniq_s(char **argv, int read0write2)
 {
index 8a1f38a1db307a841c9d66761bdf53ec09a21658..5066742cfe5904c003a7935209e9318bc2b1d3db 100644 (file)
@@ -35,7 +35,7 @@
 #include "libbb.h"
 
 #if ENABLE_FEATURE_RUN_PARTS_LONG_OPTIONS
 #include "libbb.h"
 
 #if ENABLE_FEATURE_RUN_PARTS_LONG_OPTIONS
-static const char runparts_longopts[] =
+static const char runparts_longopts[] ALIGN1 =
        "arg\0"     Required_argument "a"
        "umask\0"   Required_argument "u"
        "test\0"    No_argument       "t"
        "arg\0"     Required_argument "a"
        "umask\0"   Required_argument "u"
        "test\0"    No_argument       "t"
index cf792709c4aa35036d6c0949b4000e7a182b9164..f24168e339a478b5c133c6eed2cc980cc5225c69 100644 (file)
@@ -192,7 +192,7 @@ static int do_stop(void)
 }
 
 #if ENABLE_FEATURE_START_STOP_DAEMON_LONG_OPTIONS
 }
 
 #if ENABLE_FEATURE_START_STOP_DAEMON_LONG_OPTIONS
-static const char start_stop_daemon_longopts[] =
+static const char start_stop_daemon_longopts[] ALIGN1 =
        "stop\0"         No_argument       "K"
        "start\0"        No_argument       "S"
        "background\0"   No_argument       "b"
        "stop\0"         No_argument       "K"
        "start\0"        No_argument       "S"
        "background\0"   No_argument       "b"
index 0ac03738c361306bc94822e668a430c5ca077a61..35424f842cf386cff2e05bbad2f15dc2a830f633 100644 (file)
@@ -38,7 +38,7 @@ struct globals {
 static unsigned long get_flag(char c)
 {
        /* Two separate vectors take less space than vector of structs */
 static unsigned long get_flag(char c)
 {
        /* Two separate vectors take less space than vector of structs */
-       static const char flags_letter[] = "ASDacdijsutT";
+       static const char flags_letter[] ALIGN1 = "ASDacdijsutT";
        static const unsigned long flags_val[] = {
                /* A */ EXT2_NOATIME_FL,
                /* S */ EXT2_SYNC_FL,
        static const unsigned long flags_val[] = {
                /* A */ EXT2_NOATIME_FL,
                /* S */ EXT2_SYNC_FL,
index eb1fa84c8bda5ac01e5a3753797a2270ae8a947d..dfcbf67ddf29dae068e14a8a80924c511c950371 100644 (file)
@@ -79,7 +79,7 @@ struct fsck_instance {
        char    *base_device; /* /dev/hda for /dev/hdaN etc */
 };
 
        char    *base_device; /* /dev/hda for /dev/hdaN etc */
 };
 
-static const char ignored_types[] =
+static const char ignored_types[] ALIGN1 =
        "ignore\0"
        "iso9660\0"
        "nfs\0"
        "ignore\0"
        "iso9660\0"
        "nfs\0"
@@ -90,7 +90,7 @@ static const char ignored_types[] =
        "devpts\0";
 
 #if 0
        "devpts\0";
 
 #if 0
-static const char really_wanted[] =
+static const char really_wanted[] ALIGN1 =
        "minix\0"
        "ext2\0"
        "ext3\0"
        "minix\0"
        "ext2\0"
        "ext3\0"
index 8c6e2aa3386d29fc725b97a439a2b392902e0f6d..453b4d04a2bdeccfb59ff86380d9273c24454d9b 100644 (file)
@@ -379,7 +379,7 @@ static int probe_udf(int fd, blkid_cache cache __BLKID_ATTR((unused)),
 {
        int j, bs;
        struct iso_volume_descriptor isosb;
 {
        int j, bs;
        struct iso_volume_descriptor isosb;
-       const char * const * m;
+       const char *const *m;
 
        /* determine the block size by scanning in 2K increments
           (block sizes larger than 2K will be null padded) */
 
        /* determine the block size by scanning in 2K increments
           (block sizes larger than 2K will be null padded) */
index efb870076e25421d5a46aff04a3294aea27ea7c1..3d5b4f4fba9f85d59fc1278a7e0dedc409232a63 100644 (file)
@@ -2168,7 +2168,7 @@ static int e2fsck_run_ext3_journal(e2fsck_t ctx)
  * This function will move the journal inode from a visible file in
  * the filesystem directory hierarchy to the reserved inode if necessary.
  */
  * This function will move the journal inode from a visible file in
  * the filesystem directory hierarchy to the reserved inode if necessary.
  */
-static const char * const journal_names[] = {
+static const char *const journal_names[] = {
        ".journal", "journal", ".journal.dat", "journal.dat", 0 };
 
 static void e2fsck_move_ext3_journal(e2fsck_t ctx)
        ".journal", "journal", ".journal.dat", "journal.dat", 0 };
 
 static void e2fsck_move_ext3_journal(e2fsck_t ctx)
@@ -2179,7 +2179,7 @@ static void e2fsck_move_ext3_journal(e2fsck_t ctx)
        ext2_filsys             fs = ctx->fs;
        ext2_ino_t              ino;
        errcode_t               retval;
        ext2_filsys             fs = ctx->fs;
        ext2_ino_t              ino;
        errcode_t               retval;
-       const char * const *    cpp;
+       const char *const *    cpp;
        int                     group, mount_flags;
 
        clear_problem_context(&pctx);
        int                     group, mount_flags;
 
        clear_problem_context(&pctx);
@@ -2372,7 +2372,7 @@ err_out:
  * abbreviation of the form '@<i>' is expanded by looking up the index
  * letter <i> in the table below.
  */
  * abbreviation of the form '@<i>' is expanded by looking up the index
  * letter <i> in the table below.
  */
-static const char * const abbrevs[] = {
+static const char *const abbrevs[] = {
        N_("aextended attribute"),
        N_("Aerror allocating"),
        N_("bblock"),
        N_("aextended attribute"),
        N_("Aerror allocating"),
        N_("bblock"),
@@ -2410,7 +2410,7 @@ static const char * const abbrevs[] = {
  * Give more user friendly names to the "special" inodes.
  */
 #define num_special_inodes      11
  * Give more user friendly names to the "special" inodes.
  */
 #define num_special_inodes      11
-static const char * const special_inode_name[] =
+static const char *const special_inode_name[] =
 {
        N_("<The NULL inode>"),                 /* 0 */
        N_("<The bad blocks inode>"),           /* 1 */
 {
        N_("<The NULL inode>"),                 /* 0 */
        N_("<The bad blocks inode>"),           /* 1 */
@@ -2485,7 +2485,7 @@ static void expand_at_expression(e2fsck_t ctx, char ch,
                                          struct problem_context *pctx,
                                          int *first)
 {
                                          struct problem_context *pctx,
                                          int *first)
 {
-       const char * const *cpp;
+       const char *const *cpp;
        const char *str;
 
        /* Search for the abbreviation */
        const char *str;
 
        /* Search for the abbreviation */
@@ -8178,7 +8178,7 @@ struct latch_descr {
  * These are the prompts which are used to ask the user if they want
  * to fix a problem.
  */
  * These are the prompts which are used to ask the user if they want
  * to fix a problem.
  */
-static const char * const prompt[] = {
+static const char *const prompt[] = {
        N_("(no prompt)"),      /* 0 */
        N_("Fix"),              /* 1 */
        N_("Clear"),            /* 2 */
        N_("(no prompt)"),      /* 0 */
        N_("Fix"),              /* 1 */
        N_("Clear"),            /* 2 */
@@ -8206,7 +8206,7 @@ static const char * const prompt[] = {
  * These messages are printed when we are preen mode and we will be
  * automatically fixing the problem.
  */
  * These messages are printed when we are preen mode and we will be
  * automatically fixing the problem.
  */
-static const char * const preen_msg[] = {
+static const char *const preen_msg[] = {
        N_("(NONE)"),           /* 0 */
        N_("FIXED"),            /* 1 */
        N_("CLEARED"),          /* 2 */
        N_("(NONE)"),           /* 0 */
        N_("FIXED"),            /* 1 */
        N_("CLEARED"),          /* 2 */
index 0e111d40899beae46c33da9701003ad1eb2cddf1..1abe2ba91263311b1dd70ba47ac3849bebb55ed6 100644 (file)
@@ -12,7 +12,7 @@
 #include <string.h>
 #include <stdlib.h>
 
 #include <string.h>
 #include <stdlib.h>
 
-static const char * const os_tab[] =
+static const char *const os_tab[] =
        { "Linux",
          "Hurd",
          "Masix",
        { "Linux",
          "Hurd",
          "Masix",
@@ -42,7 +42,7 @@ char *e2p_os2string(int os_type)
  */
 int e2p_string2os(char *str)
 {
  */
 int e2p_string2os(char *str)
 {
-       const char * const *cpp;
+       const char *const *cpp;
        int i = 0;
 
        for (cpp = os_tab; *cpp; cpp++, i++) {
        int i = 0;
 
        for (cpp = os_tab; *cpp; cpp++, i++) {
index cf398079cbd6a208e0e0928651a239e17bc738d9..261783726f288f8056d031af08b3c6105e7b3ab5 100644 (file)
@@ -115,7 +115,7 @@ struct fsck_instance {
  * Required for the uber-silly devfs /dev/ide/host1/bus2/target3/lun3
  * pathames.
  */
  * Required for the uber-silly devfs /dev/ide/host1/bus2/target3/lun3
  * pathames.
  */
-static const char * const devfs_hier[] = {
+static const char *const devfs_hier[] = {
        "host", "bus", "target", "lun", 0
 };
 #endif
        "host", "bus", "target", "lun", 0
 };
 #endif
@@ -124,7 +124,7 @@ static char *base_device(const char *device)
 {
        char *str, *cp;
 #ifdef CONFIG_FEATURE_DEVFS
 {
        char *str, *cp;
 #ifdef CONFIG_FEATURE_DEVFS
-       const char * const *hier;
+       const char *const *hier;
        const char *disk;
        int len;
 #endif
        const char *disk;
        int len;
 #endif
@@ -226,7 +226,7 @@ errout:
 }
 
 
 }
 
 
-static const char * const ignored_types[] = {
+static const char *const ignored_types[] = {
        "ignore",
        "iso9660",
        "nfs",
        "ignore",
        "iso9660",
        "nfs",
@@ -238,7 +238,7 @@ static const char * const ignored_types[] = {
        NULL
 };
 
        NULL
 };
 
-static const char * const really_wanted[] = {
+static const char *const really_wanted[] = {
        "minix",
        "ext2",
        "ext3",
        "minix",
        "ext2",
        "ext3",
index 752c73e7eaa672bfa498c156c39ac43049aed906..4ec3d4652d8c1e125d56129bbac15b4adb4e6064 100644 (file)
@@ -263,7 +263,7 @@ enum {
 
 #define        OC_B    OC_BUILTIN
 
 
 #define        OC_B    OC_BUILTIN
 
-static const char tokenlist[] =
+static const char tokenlist[] ALIGN1 =
        "\1("       NTC
        "\1)"       NTC
        "\1/"       NTC                                 /* REGEXP */
        "\1("       NTC
        "\1)"       NTC
        "\1/"       NTC                                 /* REGEXP */
@@ -373,7 +373,7 @@ enum {
        ENVIRON,    F0,         NUM_INTERNAL_VARS
 };
 
        ENVIRON,    F0,         NUM_INTERNAL_VARS
 };
 
-static const char vNames[] =
+static const char vNames[] ALIGN1 =
        "CONVFMT\0" "OFMT\0"    "FS\0*"     "OFS\0"
        "ORS\0"     "RS\0*"     "RT\0"      "FILENAME\0"
        "SUBSEP\0"  "ARGIND\0"  "ARGC\0"    "ARGV\0"
        "CONVFMT\0" "OFMT\0"    "FS\0*"     "OFS\0"
        "ORS\0"     "RS\0*"     "RT\0"      "FILENAME\0"
        "SUBSEP\0"  "ARGIND\0"  "ARGC\0"    "ARGV\0"
@@ -381,16 +381,15 @@ static const char vNames[] =
        "NR\0"      "NF\0*"     "IGNORECASE\0*"
        "ENVIRON\0" "$\0*"      "\0";
 
        "NR\0"      "NF\0*"     "IGNORECASE\0*"
        "ENVIRON\0" "$\0*"      "\0";
 
-static const char vValues[] =
+static const char vValues[] ALIGN1 =
        "%.6g\0"    "%.6g\0"    " \0"       " \0"
        "\n\0"      "\n\0"      "\0"        "\0"
        "\034\0"
        "\377";
 
 /* hash size may grow to these values */
        "%.6g\0"    "%.6g\0"    " \0"       " \0"
        "\n\0"      "\n\0"      "\0"        "\0"
        "\034\0"
        "\377";
 
 /* hash size may grow to these values */
-#define FIRST_PRIME 61;
-static const unsigned PRIMES[] = { 251, 1021, 4093, 16381, 65521 };
-
+#define FIRST_PRIME 61
+static const uint16_t PRIMES[] ALIGN2 = { 251, 1021, 4093, 16381, 65521 };
 
 
 /* Globals. Split in two parts so that first one is addressed
 
 
 /* Globals. Split in two parts so that first one is addressed
@@ -504,17 +503,17 @@ static int awk_exit(int) ATTRIBUTE_NORETURN;
 
 /* ---- error handling ---- */
 
 
 /* ---- error handling ---- */
 
-static const char EMSG_INTERNAL_ERROR[] = "Internal error";
-static const char EMSG_UNEXP_EOS[] = "Unexpected end of string";
-static const char EMSG_UNEXP_TOKEN[] = "Unexpected token";
-static const char EMSG_DIV_BY_ZERO[] = "Division by zero";
-static const char EMSG_INV_FMT[] = "Invalid format specifier";
-static const char EMSG_TOO_FEW_ARGS[] = "Too few arguments for builtin";
-static const char EMSG_NOT_ARRAY[] = "Not an array";
-static const char EMSG_POSSIBLE_ERROR[] = "Possible syntax error";
-static const char EMSG_UNDEF_FUNC[] = "Call to undefined function";
+static const char EMSG_INTERNAL_ERROR[] ALIGN1 = "Internal error";
+static const char EMSG_UNEXP_EOS[] ALIGN1 = "Unexpected end of string";
+static const char EMSG_UNEXP_TOKEN[] ALIGN1 = "Unexpected token";
+static const char EMSG_DIV_BY_ZERO[] ALIGN1 = "Division by zero";
+static const char EMSG_INV_FMT[] ALIGN1 = "Invalid format specifier";
+static const char EMSG_TOO_FEW_ARGS[] ALIGN1 = "Too few arguments for builtin";
+static const char EMSG_NOT_ARRAY[] ALIGN1 = "Not an array";
+static const char EMSG_POSSIBLE_ERROR[] ALIGN1 = "Possible syntax error";
+static const char EMSG_UNDEF_FUNC[] ALIGN1 = "Call to undefined function";
 #if !ENABLE_FEATURE_AWK_MATH
 #if !ENABLE_FEATURE_AWK_MATH
-static const char EMSG_NO_MATH[] = "Math support is not compiled in";
+static const char EMSG_NO_MATH[] ALIGN1 = "Math support is not compiled in";
 #endif
 
 static void zero_out_var(var * vp)
 #endif
 
 static void zero_out_var(var * vp)
@@ -522,8 +521,8 @@ static void zero_out_var(var * vp)
        memset(vp, 0, sizeof(*vp));
 }
 
        memset(vp, 0, sizeof(*vp));
 }
 
-static void syntax_error(const char * const message) ATTRIBUTE_NORETURN;
-static void syntax_error(const char * const message)
+static void syntax_error(const char *const message) ATTRIBUTE_NORETURN;
+static void syntax_error(const char *const message)
 {
        bb_error_msg_and_die("%s:%i: %s", g_progname, g_lineno, message);
 }
 {
        bb_error_msg_and_die("%s:%i: %s", g_progname, g_lineno, message);
 }
@@ -825,7 +824,7 @@ static var *copyvar(var *dest, const var *src)
 
 static var *incvar(var *v)
 {
 
 static var *incvar(var *v)
 {
-       return setvar_i(v, getvar_i(v)+1.);
+       return setvar_i(v, getvar_i(v) + 1.);
 }
 
 /* return true if v is number or numeric string */
 }
 
 /* return true if v is number or numeric string */
index da431f39b274f0ecdcb9410a2d9a3172a6bec6db..ffdfb91036c5cdc6eb4ad97cc650af84601d03d1 100644 (file)
@@ -33,12 +33,12 @@ static FILE *cmp_xfopen_input(const char *filename)
        xfunc_die();    /* We already output an error message. */
 }
 
        xfunc_die();    /* We already output an error message. */
 }
 
-static const char fmt_eof[] = "cmp: EOF on %s\n";
-static const char fmt_differ[] = "%s %s differ: char %"OFF_FMT"d, line %d\n";
+static const char fmt_eof[] ALIGN1 = "cmp: EOF on %s\n";
+static const char fmt_differ[] ALIGN1 = "%s %s differ: char %"OFF_FMT"d, line %d\n";
 // This fmt_l_opt uses gnu-isms.  SUSv3 would be "%.0s%.0s%"OFF_FMT"d %o %o\n"
 // This fmt_l_opt uses gnu-isms.  SUSv3 would be "%.0s%.0s%"OFF_FMT"d %o %o\n"
-static const char fmt_l_opt[] = "%.0s%.0s%"OFF_FMT"d %3o %3o\n";
+static const char fmt_l_opt[] ALIGN1 = "%.0s%.0s%"OFF_FMT"d %3o %3o\n";
 
 
-static const char opt_chars[] = "sl";
+static const char opt_chars[] ALIGN1 = "sl";
 #define CMP_OPT_s (1<<0)
 #define CMP_OPT_l (1<<1)
 
 #define CMP_OPT_s (1<<0)
 #define CMP_OPT_l (1<<1)
 
index 88f8b22dbbf8ca512f91ba7b04c077d6d99f9e97..41808b1ac9f5cc1ff8b68b5c4c20e6cf6aff08a2 100644 (file)
@@ -166,7 +166,7 @@ static void print_only(const char *path, size_t dirlen, const char *entry)
 
 static void print_status(int val, char *path1, char *path2, char *entry)
 {
 
 static void print_status(int val, char *path1, char *path2, char *entry)
 {
-       const char * const _entry = entry ? entry : "";
+       const char *const _entry = entry ? entry : "";
        char * const _path1 = entry ? concat_path_file(path1, _entry) : path1;
        char * const _path2 = entry ? concat_path_file(path2, _entry) : path2;
 
        char * const _path1 = entry ? concat_path_file(path1, _entry) : path1;
        char * const _path2 = entry ? concat_path_file(path2, _entry) : path2;
 
index 4647079aa48bed62798f61b74b8a72667b21956c..01ef93c6c58b88aa0f4f15b49a63b9b8252aebf2 100644 (file)
@@ -89,7 +89,7 @@ typedef struct sed_cmd_s {
        char cmd;               /* The command char: abcdDgGhHilnNpPqrstwxy:={} */
 } sed_cmd_t;
 
        char cmd;               /* The command char: abcdDgGhHilnNpPqrstwxy:={} */
 } sed_cmd_t;
 
-static const char semicolon_whitespace[] = "; \n\r\t\v";
+static const char semicolon_whitespace[] ALIGN1 = "; \n\r\t\v";
 
 struct globals {
        /* options */
 
 struct globals {
        /* options */
index c4f3a8393762079d77cd24ebb37cf6c445bd7d7f..74566499cd08f4b764aec2af0300924eb1d4dfac 100644 (file)
@@ -62,18 +62,18 @@ enum {
 
 /* vt102 typical ESC sequence */
 /* terminal standout start/normal ESC sequence */
 
 /* vt102 typical ESC sequence */
 /* terminal standout start/normal ESC sequence */
-static const char SOs[] = "\033[7m";
-static const char SOn[] = "\033[0m";
+static const char SOs[] ALIGN1 = "\033[7m";
+static const char SOn[] ALIGN1 = "\033[0m";
 /* terminal bell sequence */
 /* terminal bell sequence */
-static const char bell[] = "\007";
+static const char bell[] ALIGN1 = "\007";
 /* Clear-end-of-line and Clear-end-of-screen ESC sequence */
 /* Clear-end-of-line and Clear-end-of-screen ESC sequence */
-static const char Ceol[] = "\033[0K";
-static const char Ceos [] = "\033[0J";
+static const char Ceol[] ALIGN1 = "\033[0K";
+static const char Ceos[] ALIGN1 = "\033[0J";
 /* Cursor motion arbitrary destination ESC sequence */
 /* Cursor motion arbitrary destination ESC sequence */
-static const char CMrc[] = "\033[%d;%dH";
+static const char CMrc[] ALIGN1 = "\033[%d;%dH";
 /* Cursor motion up and down ESC sequence */
 /* Cursor motion up and down ESC sequence */
-static const char CMup[] = "\033[A";
-static const char CMdown[] = "\n";
+static const char CMup[] ALIGN1 = "\033[A";
+static const char CMdown[] ALIGN1 = "\n";
 
 
 enum {
 
 
 enum {
@@ -2663,7 +2663,7 @@ static void ni(const char * s) // display messages
 static int format_edit_status(void)    // show file status on status line
 {
        static int tot;
 static int format_edit_status(void)    // show file status on status line
 {
        static int tot;
-       static const char cmd_mode_indicator[] = "-IR-";
+       static const char cmd_mode_indicator[] ALIGN1 = "-IR-";
        int cur, percent, ret, trunc_at;
 
        // file_modified is now a counter rather than a flag.  this
        int cur, percent, ret, trunc_at;
 
        // file_modified is now a counter rather than a flag.  this
index 47cba7c88bb308670c5bb0a84c50333482ad03d2..ea789a01c5f865987a262fdd19327772b83864af 100644 (file)
@@ -470,7 +470,7 @@ static action*** parse_params(char **argv)
        USE_FEATURE_FIND_CONTEXT(PARM_context   ,)
        };
 
        USE_FEATURE_FIND_CONTEXT(PARM_context   ,)
        };
 
-       static const char params[] =
+       static const char params[] ALIGN1 =
                                 "-a\0"
                                 "-o\0"
        USE_FEATURE_FIND_NOT(    "!\0"       )
                                 "-a\0"
                                 "-o\0"
        USE_FEATURE_FIND_NOT(    "!\0"       )
@@ -794,7 +794,7 @@ static action*** parse_params(char **argv)
 int find_main(int argc, char **argv);
 int find_main(int argc, char **argv)
 {
 int find_main(int argc, char **argv);
 int find_main(int argc, char **argv)
 {
-       static const char options[] =
+       static const char options[] ALIGN1 =
                          "-follow\0"
 USE_FEATURE_FIND_XDEV(    "-xdev\0"    )
 USE_FEATURE_FIND_MAXDEPTH("-maxdepth\0")
                          "-follow\0"
 USE_FEATURE_FIND_XDEV(    "-xdev\0"    )
 USE_FEATURE_FIND_MAXDEPTH("-maxdepth\0")
index dcdb5c8f7fba92873b6bf7fc61c26a7de38f2764..ff23ca18ceb0020735df0234beab38195d19731a 100644 (file)
@@ -169,7 +169,7 @@ __extension__ typedef unsigned long long __u64;
 # error "Sorry, this libc version is not supported :("
 #endif
 
 # error "Sorry, this libc version is not supported :("
 #endif
 
-// Don't perpetuate e2fsck crap into the headers.  Clean up e2fsck instead.
+/* Don't perpetuate e2fsck crap into the headers.  Clean up e2fsck instead. */
 
 #if defined __GLIBC__ || defined __UCLIBC__ \
        || defined __dietlibc__ || defined _NEWLIB_VERSION
 
 #if defined __GLIBC__ || defined __UCLIBC__ \
        || defined __dietlibc__ || defined _NEWLIB_VERSION
@@ -210,6 +210,16 @@ typedef unsigned smalluint;
 #include <stdbool.h>
 #endif
 
 #include <stdbool.h>
 #endif
 
+/* Try to defeat gcc's alignment of "char message[]"-like data */
+#if 1 /* if needed: !defined(arch1) && !defined(arch2) */
+#define ALIGN1 __attribute__((aligned(1)))
+#define ALIGN2 __attribute__((aligned(2)))
+#else
+/* Arches which MUST have 2 or 4 byte alignment for everything are here */
+#define ALIGN1
+#define ALIGN2
+#endif
+
 
 /* uclibc does not implement daemon() for no-mmu systems.
  * For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably.
 
 /* uclibc does not implement daemon() for no-mmu systems.
  * For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably.
@@ -289,7 +299,7 @@ static ALWAYS_INLINE char* strchrnul(const char *s, char c)
 
 #if defined(__linux__)
 #include <sys/mount.h>
 
 #if defined(__linux__)
 #include <sys/mount.h>
-// Make sure we have all the new mount flags we actually try to use.
+/* Make sure we have all the new mount flags we actually try to use. */
 #ifndef MS_BIND
 #define MS_BIND        (1<<12)
 #endif
 #ifndef MS_BIND
 #define MS_BIND        (1<<12)
 #endif
@@ -303,7 +313,7 @@ static ALWAYS_INLINE char* strchrnul(const char *s, char c)
 #define MS_SILENT      (1<<15)
 #endif
 
 #define MS_SILENT      (1<<15)
 #endif
 
-// The shared subtree stuff, which went in around 2.6.15
+/* The shared subtree stuff, which went in around 2.6.15. */
 #ifndef MS_UNBINDABLE
 #define MS_UNBINDABLE  (1<<17)
 #endif
 #ifndef MS_UNBINDABLE
 #define MS_UNBINDABLE  (1<<17)
 #endif
index 5c7efe210b6a7894b7bc63b6f59149644049ee5b..a196ab3ed16e8d0dd9295dc4421c3c9bfdb045eb 100644 (file)
@@ -106,7 +106,7 @@ enum {
 #endif
 };
 
 #endif
 };
 
-static const char * const environment[] = {
+static const char *const environment[] = {
        "HOME=/",
        bb_PATH_root_path,
        "SHELL=/bin/sh",
        "HOME=/",
        bb_PATH_root_path,
        "SHELL=/bin/sh",
@@ -457,7 +457,7 @@ static pid_t run(const struct init_action *a)
 
 #if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__)
        if (a->action & ASKFIRST) {
 
 #if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__)
        if (a->action & ASKFIRST) {
-               static const char press_enter[] =
+               static const char press_enter[] ALIGN1 =
 #ifdef CUSTOMIZED_BANNER
 #include CUSTOMIZED_BANNER
 #endif
 #ifdef CUSTOMIZED_BANNER
 #include CUSTOMIZED_BANNER
 #endif
@@ -923,7 +923,7 @@ int init_main(int argc, char **argv)
        chdir("/");
        setsid();
        {
        chdir("/");
        setsid();
        {
-               const char * const *e;
+               const char *const *e;
                /* Make sure environs is set to something sane */
                for (e = environment; *e; e++)
                        putenv((char *) *e);
                /* Make sure environs is set to something sane */
                for (e = environment; *e; e++)
                        putenv((char *) *e);
index e873d7cc3c0661dc297536dd72380382c21c47dc..731d3d8c1421be0d1bd6c05537b47a7629a7f87a 100644 (file)
@@ -7,7 +7,7 @@
 
 /* returns the array index of the string */
 /* (index of first match is returned, or -1) */
 
 /* returns the array index of the string */
 /* (index of first match is returned, or -1) */
-int index_in_str_array(const char * const string_array[], const char *key)
+int index_in_str_array(const char *const string_array[], const char *key)
 {
        int i;
 
 {
        int i;
 
@@ -36,7 +36,7 @@ int index_in_strings(const char *strings, const char *key)
 /* returns the array index of the string, even if it matches only a beginning */
 /* (index of first match is returned, or -1) */
 #ifdef UNUSED
 /* returns the array index of the string, even if it matches only a beginning */
 /* (index of first match is returned, or -1) */
 #ifdef UNUSED
-int index_in_substr_array(const char * const string_array[], const char *key)
+int index_in_substr_array(const char *const string_array[], const char *key)
 {
        int i;
        int len = strlen(key);
 {
        int i;
        int len = strlen(key);
index 5ddbbaaf688931f53ba6c4d81ce0477ffa84b568..0d1bb18f2a179ee499f30322f1180435c76169f2 100644 (file)
@@ -26,12 +26,12 @@ static int exitval;                 /* final exit value */
 int bb_dump_blocksize;                 /* data block size */
 int bb_dump_length = -1;               /* max bytes to read */
 
 int bb_dump_blocksize;                 /* data block size */
 int bb_dump_length = -1;               /* max bytes to read */
 
-static const char index_str[] = ".#-+ 0123456789";
+static const char index_str[] ALIGN1 = ".#-+ 0123456789";
 
 
-static const char size_conv_str[] =
+static const char size_conv_str[] ALIGN1 =
 "\x1\x4\x4\x4\x4\x4\x4\x8\x8\x8\x8\010cdiouxXeEfgG";
 
 "\x1\x4\x4\x4\x4\x4\x4\x8\x8\x8\x8\010cdiouxXeEfgG";
 
-static const char lcc[] = "diouxX";
+static const char lcc[] ALIGN1 = "diouxX";
 
 int bb_dump_size(FS * fs)
 {
 
 int bb_dump_size(FS * fs)
 {
@@ -440,7 +440,7 @@ static void bpad(PR * pr)
        while ((*p2++ = *p1++) != 0);
 }
 
        while ((*p2++ = *p1++) != 0);
 }
 
-static const char conv_str[] =
+static const char conv_str[] ALIGN1 =
        "\0\\0\0"
        "\007\\a\0"                             /* \a */
        "\b\\b\0"
        "\0\\0\0"
        "\007\\a\0"                             /* \a */
        "\b\\b\0"
@@ -479,7 +479,7 @@ static void conv_c(PR * pr, unsigned char * p)
 
 static void conv_u(PR * pr, unsigned char * p)
 {
 
 static void conv_u(PR * pr, unsigned char * p)
 {
-       static const char list[] =
+       static const char list[] ALIGN1 =
                "nul\0soh\0stx\0etx\0eot\0enq\0ack\0bel\0"
                "bs\0_ht\0_lf\0_vt\0_ff\0_cr\0_so\0_si\0_"
                "dle\0dcl\0dc2\0dc3\0dc4\0nak\0syn\0etb\0"
                "nul\0soh\0stx\0etx\0eot\0enq\0ack\0bel\0"
                "bs\0_ht\0_lf\0_vt\0_ff\0_cr\0_so\0_si\0_"
                "dle\0dcl\0dc2\0dc3\0dc4\0nak\0syn\0etb\0"
index c7c8cb79c3d14b9dba24a8da8c4f59b7daf1c3af..672d70a0aa8984a997f3b1b55b15b3c8aa2ebc9b 100644 (file)
@@ -76,7 +76,7 @@ const char *applet_long_options
 
         This struct allows you to define long options:
 
 
         This struct allows you to define long options:
 
-        static const char applet_longopts[] =
+        static const char applet_longopts[] ALIGN1 =
                //"name\0" has_arg val
                "verbose\0" No_argument "v"
                ;
                //"name\0" has_arg val
                "verbose\0" No_argument "v"
                ;
index 09fa82c093fff6c4e203bdc47dfee1943b317a6e..d60ef61d7fbd224d3842857f9b95a3ea3d939b77 100644 (file)
 const char *make_human_readable_str(unsigned long long size,
        unsigned long block_size, unsigned long display_unit)
 {
 const char *make_human_readable_str(unsigned long long size,
        unsigned long block_size, unsigned long display_unit)
 {
-       /* The code will adjust for additional (appended) units. */
-       static const char zero_and_units[] = { '0', 0, 'k', 'M', 'G', 'T' };
-       static const char fmt[] = "%llu";
-       static const char fmt_tenths[] = "%llu.%d%c";
+       /* The code will adjust for additional (appended) units */
+       static const char zero_and_units[] ALIGN1 = { '0', 0, 'k', 'M', 'G', 'T' };
+       static const char fmt[] ALIGN1 = "%llu";
+       static const char fmt_tenths[] ALIGN1 = "%llu.%d%c";
 
 
-       static char str[21];            /* Sufficient for 64 bit unsigned integers. */
+       static char str[21] ALIGN1;  /* Sufficient for 64 bit unsigned integers */
 
        unsigned long long val;
        int frac;
 
        unsigned long long val;
        int frac;
@@ -53,7 +53,7 @@ const char *make_human_readable_str(unsigned long long size,
        }
 
        if (display_unit) {
        }
 
        if (display_unit) {
-               val += display_unit/2;  /* Deal with rounding. */
+               val += display_unit/2;  /* Deal with rounding */
                val /= display_unit;    /* Don't combine with the line above!!! */
        } else {
                ++u;
                val /= display_unit;    /* Don't combine with the line above!!! */
        } else {
                ++u;
index 1cbadd228c88e5fcd80d82365f5ad2d008b99d79..308e1bfed613398aae4062869444a1852c6a16ed 100644 (file)
@@ -15,8 +15,8 @@
 
 #define LOGIN " login: "
 
 
 #define LOGIN " login: "
 
-static const char fmtstr_d[] = "%A, %d %B %Y";
-static const char fmtstr_t[] = "%H:%M:%S";
+static const char fmtstr_d[] ALIGN1 = "%A, %d %B %Y";
+static const char fmtstr_t[] ALIGN1 = "%H:%M:%S";
 
 void print_login_issue(const char *issue_file, const char *tty)
 {
 
 void print_login_issue(const char *issue_file, const char *tty)
 {
index e672559cf3da3c794b3760c9f6d579c2f4a394e7..9de37b9e4b294b2c809f3d4f8e9ceee072ecc2dd 100644 (file)
@@ -75,7 +75,7 @@ static void md5_hash_block(const void *buffer, md5_ctx_t *ctx)
                0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391
        };
 
                0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391
        };
 
-       static const char P_array[] = {
+       static const char P_array[] ALIGN1 = {
 #  if MD5_SIZE_VS_SPEED > 1
                0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,   /* 1 */
 #  endif       /* MD5_SIZE_VS_SPEED > 1 */
 #  if MD5_SIZE_VS_SPEED > 1
                0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,   /* 1 */
 #  endif       /* MD5_SIZE_VS_SPEED > 1 */
@@ -85,7 +85,7 @@ static void md5_hash_block(const void *buffer, md5_ctx_t *ctx)
        };
 
 #  if MD5_SIZE_VS_SPEED > 1
        };
 
 #  if MD5_SIZE_VS_SPEED > 1
-       static const char S_array[] = {
+       static const char S_array[] ALIGN1 = {
                7, 12, 17, 22,
                5, 9, 14, 20,
                4, 11, 16, 23,
                7, 12, 17, 22,
                5, 9, 14, 20,
                4, 11, 16, 23,
index 8cab2dcc8c7359694b370e9a0bf7bc92fcce84c2..c4052b187ad6910d1ecabeed4325c46ac2741396 100644 (file)
 #else
 #define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")"
 #endif
 #else
 #define BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")"
 #endif
-const char bb_banner[] = BANNER;
-
-const char bb_msg_memory_exhausted[] = "memory exhausted";
-const char bb_msg_invalid_date[] = "invalid date '%s'";
-const char bb_msg_write_error[] = "write error";
-const char bb_msg_read_error[] = "read error";
-const char bb_msg_unknown[] = "(unknown)";
-const char bb_msg_can_not_create_raw_socket[] = "can't create raw socket";
-const char bb_msg_perm_denied_are_you_root[] = "permission denied. (are you root?)";
-const char bb_msg_requires_arg[] = "%s requires an argument";
-const char bb_msg_invalid_arg[] = "invalid argument '%s' to '%s'";
-const char bb_msg_standard_input[] = "standard input";
-const char bb_msg_standard_output[] = "standard output";
-
-const char bb_str_default[] = "default";
-const char bb_hexdigits_upcase[] = "0123456789ABCDEF";
-
-const char bb_path_passwd_file[] = "/etc/passwd";
-const char bb_path_shadow_file[] = "/etc/shadow";
-const char bb_path_group_file[] = "/etc/group";
-const char bb_path_gshadow_file[] = "/etc/gshadow";
-const char bb_path_motd_file[] = "/etc/motd";
-const char bb_dev_null[] = "/dev/null";
-const char bb_busybox_exec_path[] = CONFIG_BUSYBOX_EXEC_PATH;
-const char bb_default_login_shell[] = LIBBB_DEFAULT_LOGIN_SHELL;
+const char bb_banner[] ALIGN1 = BANNER;
+
+const char bb_msg_memory_exhausted[] ALIGN1 = "memory exhausted";
+const char bb_msg_invalid_date[] ALIGN1 = "invalid date '%s'";
+const char bb_msg_write_error[] ALIGN1 = "write error";
+const char bb_msg_read_error[] ALIGN1 = "read error";
+const char bb_msg_unknown[] ALIGN1 = "(unknown)";
+const char bb_msg_can_not_create_raw_socket[] ALIGN1 = "can't create raw socket";
+const char bb_msg_perm_denied_are_you_root[] ALIGN1 = "permission denied. (are you root?)";
+const char bb_msg_requires_arg[] ALIGN1 = "%s requires an argument";
+const char bb_msg_invalid_arg[] ALIGN1 = "invalid argument '%s' to '%s'";
+const char bb_msg_standard_input[] ALIGN1 = "standard input";
+const char bb_msg_standard_output[] ALIGN1 = "standard output";
+
+const char bb_str_default[] ALIGN1 = "default";
+const char bb_hexdigits_upcase[] ALIGN1 = "0123456789ABCDEF";
+
+const char bb_path_passwd_file[] ALIGN1 = "/etc/passwd";
+const char bb_path_shadow_file[] ALIGN1 = "/etc/shadow";
+const char bb_path_group_file[] ALIGN1 = "/etc/group";
+const char bb_path_gshadow_file[] ALIGN1 = "/etc/gshadow";
+const char bb_path_motd_file[] ALIGN1 = "/etc/motd";
+const char bb_dev_null[] ALIGN1 = "/dev/null";
+const char bb_busybox_exec_path[] ALIGN1 = CONFIG_BUSYBOX_EXEC_PATH;
+const char bb_default_login_shell[] ALIGN1 = LIBBB_DEFAULT_LOGIN_SHELL;
 /* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin,
  * but I want to save a few bytes here. Check libbb.h before changing! */
 /* util-linux manpage says /sbin:/bin:/usr/sbin:/usr/bin,
  * but I want to save a few bytes here. Check libbb.h before changing! */
-const char bb_PATH_root_path[] = "PATH=/sbin:/usr/sbin:/bin:/usr/bin";
+const char bb_PATH_root_path[] ALIGN1 = "PATH=/sbin:/usr/sbin:/bin:/usr/bin";
 
 
 const int const_int_0;
 
 
 const int const_int_0;
@@ -47,7 +47,7 @@ const int const_int_1 = 1;
 
 #include <utmp.h>
 /* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */
 
 #include <utmp.h>
 /* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */
-const char bb_path_wtmp_file[] =
+const char bb_path_wtmp_file[] ALIGN1 =
 #if defined _PATH_WTMP
 _PATH_WTMP;
 #elif defined WTMP_FILE
 #if defined _PATH_WTMP
 _PATH_WTMP;
 #elif defined WTMP_FILE
index d3ff1837579912e87312a60870bc4fb83e568bc4..d17cc4a43a3d40b0c5a8bf9ef8b59bc40d081400 100644 (file)
@@ -47,9 +47,9 @@ static const mode_t mode_flags[] = {
 
 /* The previous version used "0pcCd?bB-?l?s???".  However, the '0', 'C',
  * and 'B' types don't appear to be available on linux.  So I removed them. */
 
 /* The previous version used "0pcCd?bB-?l?s???".  However, the '0', 'C',
  * and 'B' types don't appear to be available on linux.  So I removed them. */
-static const char type_chars[16] = "?pc?d?b?-?l?s???";
+static const char type_chars[16] ALIGN1 = "?pc?d?b?-?l?s???";
 /*                                  0123456789abcdef */
 /*                                  0123456789abcdef */
-static const char mode_chars[7] = "rwxSTst";
+static const char mode_chars[7] ALIGN1 = "rwxSTst";
 
 const char *bb_mode_string(mode_t mode)
 {
 
 const char *bb_mode_string(mode_t mode)
 {
index d00405d8a4d7dd97dd7d133d8adf33d51200bce0..030b148d38459cf1e480077097530922c197c8d5 100644 (file)
@@ -11,5 +11,5 @@
 
 /* Busybox mount uses either /proc/mounts or /etc/mtab to
  * get the list of currently mounted filesystems */
 
 /* Busybox mount uses either /proc/mounts or /etc/mtab to
  * get the list of currently mounted filesystems */
-const char bb_path_mtab_file[] =
+const char bb_path_mtab_file[] ALIGN1 =
 USE_FEATURE_MTAB_SUPPORT("/etc/mtab")SKIP_FEATURE_MTAB_SUPPORT("/proc/mounts");
 USE_FEATURE_MTAB_SUPPORT("/etc/mtab")SKIP_FEATURE_MTAB_SUPPORT("/proc/mounts");
index a31bd4bfd604cc950d50661fda58a79affed260e..fd549003989328d8b0c672edd834f95ee4fdf396 100644 (file)
@@ -31,8 +31,8 @@ int bb_parse_mode(const char *s, mode_t *current_mode)
                S_ISUID | S_ISGID,           /* s */
                S_ISVTX                      /* t */
        };
                S_ISUID | S_ISGID,           /* s */
                S_ISVTX                      /* t */
        };
-       static const char who_chars[] = "augo";
-       static const char perm_chars[] = "rwxXst";
+       static const char who_chars[] ALIGN1 = "augo";
+       static const char perm_chars[] ALIGN1 = "rwxXst";
 
        const char *p;
        mode_t wholist;
 
        const char *p;
        mode_t wholist;
index 3178ad34a18d98b92a6a93b11fc1b3906f21af32..1cadbd373e5e4ed09a2ec78ad514d88844ee78a7 100644 (file)
@@ -18,7 +18,7 @@
 
 char bb_process_escape_sequence(const char **ptr)
 {
 
 char bb_process_escape_sequence(const char **ptr)
 {
-       static const char charmap[] = {
+       static const char charmap[] ALIGN1 = {
                'a',  'b',  'f',  'n',  'r',  't',  'v',  '\\', 0,
                '\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', '\\' };
 
                'a',  'b',  'f',  'n',  'r',  't',  'v',  '\\', 0,
                '\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', '\\' };
 
index f525322f8ba2337afcb0f79ce5b92d3a7ec3fd0c..0aedf3387a0975eff780e7baee5e2182c926a16a 100644 (file)
@@ -8,7 +8,7 @@
 #include "libbb.h"
 
 /* Conversion table.  for base 64 */
 #include "libbb.h"
 
 /* Conversion table.  for base 64 */
-const char bb_uuenc_tbl_base64[65 + 2] = {
+const char bb_uuenc_tbl_base64[65 + 2] ALIGN1 = {
        'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
        'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
        'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
        'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
        'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
        'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
@@ -21,7 +21,7 @@ const char bb_uuenc_tbl_base64[65 + 2] = {
        '\n', '\0' /* needed for uudecode.c */
 };
 
        '\n', '\0' /* needed for uudecode.c */
 };
 
-const char bb_uuenc_tbl_std[65] = {
+const char bb_uuenc_tbl_std[65] ALIGN1 = {
        '`', '!', '"', '#', '$', '%', '&', '\'',
        '(', ')', '*', '+', ',', '-', '.', '/',
        '0', '1', '2', '3', '4', '5', '6', '7',
        '`', '!', '"', '#', '$', '%', '&', '\'',
        '(', ')', '*', '+', ',', '-', '.', '/',
        '0', '1', '2', '3', '4', '5', '6', '7',
index b535ef5c43d01d7e974036b819c46d467c54177d..7e7ff4810438ac533d53012dc68f6e7613038fef 100644 (file)
@@ -695,7 +695,8 @@ int putpwent(const struct passwd *__restrict p, FILE *__restrict f)
 
 int putgrent(const struct group *__restrict p, FILE *__restrict f)
 {
 
 int putgrent(const struct group *__restrict p, FILE *__restrict f)
 {
-       static const char format[] = ",%s";
+       static const char format[] ALIGN1 = ",%s";
+
        char **m;
        const char *fmt;
        int rv = -1;
        char **m;
        const char *fmt;
        int rv = -1;
@@ -735,18 +736,19 @@ int putgrent(const struct group *__restrict p, FILE *__restrict f)
 }
 
 #if ENABLE_USE_BB_SHADOW
 }
 
 #if ENABLE_USE_BB_SHADOW
-static const unsigned char _sp_off[] = {
-       offsetof(struct spwd, sp_lstchg),       /* 2 - not a char ptr */
-       offsetof(struct spwd, sp_min),          /* 3 - not a char ptr */
-       offsetof(struct spwd, sp_max),          /* 4 - not a char ptr */
-       offsetof(struct spwd, sp_warn),         /* 5 - not a char ptr */
-       offsetof(struct spwd, sp_inact),        /* 6 - not a char ptr */
-       offsetof(struct spwd, sp_expire),       /* 7 - not a char ptr */
+static const unsigned char _sp_off[] ALIGN1 = {
+       offsetof(struct spwd, sp_lstchg),       /* 2 - not a char ptr */
+       offsetof(struct spwd, sp_min),          /* 3 - not a char ptr */
+       offsetof(struct spwd, sp_max),          /* 4 - not a char ptr */
+       offsetof(struct spwd, sp_warn),         /* 5 - not a char ptr */
+       offsetof(struct spwd, sp_inact),        /* 6 - not a char ptr */
+       offsetof(struct spwd, sp_expire)        /* 7 - not a char ptr */
 };
 
 int putspent(const struct spwd *p, FILE *stream)
 {
 };
 
 int putspent(const struct spwd *p, FILE *stream)
 {
-       static const char ld_format[] = "%ld:";
+       static const char ld_format[] ALIGN1 = "%ld:";
+
        const char *f;
        long x;
        int i;
        const char *f;
        long x;
        int i;
@@ -787,14 +789,14 @@ DO_UNLOCK:
 /* Internal uClibc functions.                                         */
 /**********************************************************************/
 
 /* Internal uClibc functions.                                         */
 /**********************************************************************/
 
-static const unsigned char pw_off[] = {
-       offsetof(struct passwd, pw_name),       /* 0 */
-       offsetof(struct passwd, pw_passwd),     /* 1 */
-       offsetof(struct passwd, pw_uid),        /* 2 - not a char ptr */
-       offsetof(struct passwd, pw_gid),        /* 3 - not a char ptr */
-       offsetof(struct passwd, pw_gecos),      /* 4 */
-       offsetof(struct passwd, pw_dir),        /* 5 */
-       offsetof(struct passwd, pw_shell)       /* 6 */
+static const unsigned char pw_off[] ALIGN1 = {
+       offsetof(struct passwd, pw_name),       /* 0 */
+       offsetof(struct passwd, pw_passwd),     /* 1 */
+       offsetof(struct passwd, pw_uid),        /* 2 - not a char ptr */
+       offsetof(struct passwd, pw_gid),        /* 3 - not a char ptr */
+       offsetof(struct passwd, pw_gecos),      /* 4 */
+       offsetof(struct passwd, pw_dir),        /* 5 */
+       offsetof(struct passwd, pw_shell)       /* 6 */
 };
 
 static int bb__parsepwent(void *data, char *line)
 };
 
 static int bb__parsepwent(void *data, char *line)
@@ -845,10 +847,10 @@ static int bb__parsepwent(void *data, char *line)
 
 /**********************************************************************/
 
 
 /**********************************************************************/
 
-static const unsigned char gr_off[] = {
-       offsetof(struct group, gr_name),        /* 0 */
-       offsetof(struct group, gr_passwd),      /* 1 */
-       offsetof(struct group, gr_gid)          /* 2 - not a char ptr */
+static const unsigned char gr_off[] ALIGN1 = {
+       offsetof(struct group, gr_name),        /* 0 */
+       offsetof(struct group, gr_passwd),      /* 1 */
+       offsetof(struct group, gr_gid)          /* 2 - not a char ptr */
 };
 
 static int bb__parsegrent(void *data, char *line)
 };
 
 static int bb__parsegrent(void *data, char *line)
@@ -943,16 +945,16 @@ static int bb__parsegrent(void *data, char *line)
 /**********************************************************************/
 
 #if ENABLE_USE_BB_SHADOW
 /**********************************************************************/
 
 #if ENABLE_USE_BB_SHADOW
-static const unsigned char sp_off[] = {
-       offsetof(struct spwd, sp_namp),         /* 0 */
-       offsetof(struct spwd, sp_pwdp),         /* 1 */
-       offsetof(struct spwd, sp_lstchg),       /* 2 - not a char ptr */
-       offsetof(struct spwd, sp_min),          /* 3 - not a char ptr */
-       offsetof(struct spwd, sp_max),          /* 4 - not a char ptr */
-       offsetof(struct spwd, sp_warn),         /* 5 - not a char ptr */
-       offsetof(struct spwd, sp_inact),        /* 6 - not a char ptr */
-       offsetof(struct spwd, sp_expire),       /* 7 - not a char ptr */
-       offsetof(struct spwd, sp_flag)          /* 8 - not a char ptr */
+static const unsigned char sp_off[] ALIGN1 = {
+       offsetof(struct spwd, sp_namp),         /* 0 */
+       offsetof(struct spwd, sp_pwdp),         /* 1 */
+       offsetof(struct spwd, sp_lstchg),       /* 2 - not a char ptr */
+       offsetof(struct spwd, sp_min),          /* 3 - not a char ptr */
+       offsetof(struct spwd, sp_max),          /* 4 - not a char ptr */
+       offsetof(struct spwd, sp_warn),         /* 5 - not a char ptr */
+       offsetof(struct spwd, sp_inact),        /* 6 - not a char ptr */
+       offsetof(struct spwd, sp_expire),       /* 7 - not a char ptr */
+       offsetof(struct spwd, sp_flag)          /* 8 - not a char ptr */
 };
 
 static int bb__parsespent(void *data, char * line)
 };
 
 static int bb__parsespent(void *data, char * line)
index 6c69aaf41e75c9a93c63c00461764af115a185ee..79cd2f4f7cc8caf5d7fc27505c562389429b26a3 100644 (file)
@@ -81,7 +81,8 @@ static void passwd_wrapper(const char *login) ATTRIBUTE_NORETURN;
 
 static void passwd_wrapper(const char *login)
 {
 
 static void passwd_wrapper(const char *login)
 {
-       static const char prog[] = "passwd";
+       static const char prog[] ALIGN1 = "passwd";
+
        BB_EXECLP(prog, prog, login, NULL);
        bb_error_msg_and_die("failed to execute '%s', you must set the password for '%s' manually", prog, login);
 }
        BB_EXECLP(prog, prog, login, NULL);
        bb_error_msg_and_die("failed to execute '%s', you must set the password for '%s' manually", prog, login);
 }
index 3e02c8e7c353544e0aa3d3d75303b9f05be88df3..6fb4dca7ac08ed12d2bb28c7f9e44242c8b337ee 100644 (file)
@@ -11,7 +11,7 @@
 #if ENABLE_GETOPT_LONG
 #include <getopt.h>
 
 #if ENABLE_GETOPT_LONG
 #include <getopt.h>
 
-static const char chpasswd_longopts[] =
+static const char chpasswd_longopts[] ALIGN1 =
        "encrypted\0" No_argument "e"
        "md5\0"       No_argument "m"
        ;
        "encrypted\0" No_argument "e"
        "md5\0"       No_argument "m"
        ;
index 2fcb0d902d9df57998999b06047bb379c0e75267..0254d3203421529615c4982f20f91b70c9114211 100644 (file)
@@ -93,7 +93,7 @@ struct options {
        int speeds[MAX_SPEED];          /* baud rates to be tried */
 };
 
        int speeds[MAX_SPEED];          /* baud rates to be tried */
 };
 
-static const char opt_string[] = "I:LH:f:hil:mt:wn";
+static const char opt_string[] ALIGN1 = "I:LH:f:hil:mt:wn";
 #define F_INITSTRING    (1<<0)          /* initstring is set */
 #define F_LOCAL         (1<<1)          /* force local */
 #define F_FAKEHOST      (1<<2)          /* force fakehost */
 #define F_INITSTRING    (1<<0)          /* initstring is set */
 #define F_LOCAL         (1<<1)          /* force local */
 #define F_FAKEHOST      (1<<2)          /* force fakehost */
index 36b10fbc4f05271fa17b99084ae4c198b986f10e..5638c4bc9fee907586f6cd224910f66ed0d87c4c 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "libbb.h"
 
 
 #include "libbb.h"
 
-static const char * const forbid[] = {
+static const char *const forbid[] = {
        "ENV",
        "BASH_ENV",
        "HOME",
        "ENV",
        "BASH_ENV",
        "HOME",
@@ -40,7 +40,7 @@ int sulogin_main(int argc, char **argv)
        char *cp;
        int timeout = 0;
        char *timeout_arg;
        char *cp;
        int timeout = 0;
        char *timeout_arg;
-       const char * const *p;
+       const char *const *p;
        struct passwd *pwd;
        const char *shell;
 #if ENABLE_FEATURE_SHADOWPASSWDS
        struct passwd *pwd;
        const char *shell;
 #if ENABLE_FEATURE_SHADOWPASSWDS
index 9f8227cf0b6a7a79727e9932ff81b6b3492ac55a..1e6d15fa749cfdde1db6e503736f2d7d83c06328 100644 (file)
 #include "libbb.h"
 #include <sys/timex.h>
 
 #include "libbb.h"
 #include <sys/timex.h>
 
-static const struct {int bit; const char *name;} statlist[] = {
+static const struct {
+       int bit;
+       const char *name;
+} statlist[] = {
        { STA_PLL,       "PLL"       },
        { STA_PPSFREQ,   "PPSFREQ"   },
        { STA_PPSTIME,   "PPSTIME"   },
        { STA_PLL,       "PLL"       },
        { STA_PPSFREQ,   "PPSFREQ"   },
        { STA_PPSTIME,   "PPSTIME"   },
@@ -28,15 +31,17 @@ static const struct {int bit; const char *name;} statlist[] = {
        { STA_PPSWANDER, "PPSWANDER" },
        { STA_PPSERROR,  "PPSERROR"  },
        { STA_CLOCKERR,  "CLOCKERR"  },
        { STA_PPSWANDER, "PPSWANDER" },
        { STA_PPSERROR,  "PPSERROR"  },
        { STA_CLOCKERR,  "CLOCKERR"  },
-       { 0, NULL } };
+       { 0, NULL }
+};
 
 
-static const char * const ret_code_descript[] = {
+static const char *const ret_code_descript[] = {
        "clock synchronized",
        "insert leap second",
        "delete leap second",
        "leap second in progress",
        "leap second has occurred",
        "clock synchronized",
        "insert leap second",
        "delete leap second",
        "leap second in progress",
        "leap second has occurred",
-       "clock not synchronized" };
+       "clock not synchronized"
+};
 
 int adjtimex_main(int argc, char **argv);
 int adjtimex_main(int argc, char **argv)
 
 int adjtimex_main(int argc, char **argv);
 int adjtimex_main(int argc, char **argv)
index 848f2b3eac8b5399dea45077bb5f59f3c2de2afe..6b31f368a979959ec8bafe799b6e1b964bddd0cc 100644 (file)
@@ -245,12 +245,10 @@ static struct config_entry_struct *last_config = NULL;
 static char *mount_point = NULL;
 static volatile int caught_signal = FALSE;
 static volatile int caught_sighup = FALSE;
 static char *mount_point = NULL;
 static volatile int caught_signal = FALSE;
 static volatile int caught_sighup = FALSE;
-static struct initial_symlink_struct
-{
+static struct initial_symlink_struct {
        const char *dest;
        const char *name;
        const char *dest;
        const char *name;
-} initial_symlinks[] =
-{
+} initial_symlinks[] = {
        {"/proc/self/fd", "fd"},
        {"fd/0", "stdin"},
        {"fd/1", "stdout"},
        {"/proc/self/fd", "fd"},
        {"fd/0", "stdin"},
        {"fd/1", "stdout"},
@@ -258,12 +256,10 @@ static struct initial_symlink_struct
        {NULL, NULL},
 };
 
        {NULL, NULL},
 };
 
-static struct event_type
-{
+static struct event_type {
        unsigned int type;        /*  The DEVFSD_NOTIFY_* value                  */
        const char *config_name;  /*  The name used in the config file           */
        unsigned int type;        /*  The DEVFSD_NOTIFY_* value                  */
        const char *config_name;  /*  The name used in the config file           */
-} event_types[] =
-{
+} event_types[] = {
        {DEVFSD_NOTIFY_REGISTERED,   "REGISTER"},
        {DEVFSD_NOTIFY_UNREGISTERED, "UNREGISTER"},
        {DEVFSD_NOTIFY_ASYNC_OPEN,   "ASYNC_OPEN"},
        {DEVFSD_NOTIFY_REGISTERED,   "REGISTER"},
        {DEVFSD_NOTIFY_UNREGISTERED, "UNREGISTER"},
        {DEVFSD_NOTIFY_ASYNC_OPEN,   "ASYNC_OPEN"},
@@ -277,10 +273,10 @@ static struct event_type
 
 /* Busybox messages */
 
 
 /* Busybox messages */
 
-static const char * const bb_msg_proto_rev                     = "protocol revision";
-static const char * const bb_msg_bad_config            = "bad %s config file: %s";
-static const char * const bb_msg_small_buffer          = "buffer too small";
-static const char * const bb_msg_variable_not_found = "variable: %s not found";
+static const char bb_msg_proto_rev[] ALIGN1          = "protocol revision";
+static const char bb_msg_bad_config[] ALIGN1         = "bad %s config file: %s";
+static const char bb_msg_small_buffer[] ALIGN1       = "buffer too small";
+static const char bb_msg_variable_not_found[] ALIGN1 = "variable: %s not found";
 
 /* Busybox stuff */
 #if ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG
 
 /* Busybox stuff */
 #if ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG
@@ -387,10 +383,10 @@ int devfsd_main(int argc, char **argv)
 
        /* NB: The check for CONFIG_FILE is done in read_config_file() */
 
 
        /* NB: The check for CONFIG_FILE is done in read_config_file() */
 
-       if (print_version ||(DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev)) {
+       if (print_version || (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev)) {
                printf("%s v%s\nDaemon %s:\t%d\nKernel-side %s:\t%d\n",
                                applet_name, DEVFSD_VERSION, bb_msg_proto_rev,
                printf("%s v%s\nDaemon %s:\t%d\nKernel-side %s:\t%d\n",
                                applet_name, DEVFSD_VERSION, bb_msg_proto_rev,
-                               DEVFSD_PROTOCOL_REVISION_DAEMON,bb_msg_proto_rev, proto_rev);
+                               DEVFSD_PROTOCOL_REVISION_DAEMON, bb_msg_proto_rev, proto_rev);
                if (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev)
                        bb_error_msg_and_die("%s mismatch!", bb_msg_proto_rev);
                exit(EXIT_SUCCESS); /* -v */
                if (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev)
                        bb_error_msg_and_die("%s mismatch!", bb_msg_proto_rev);
                exit(EXIT_SUCCESS); /* -v */
@@ -509,7 +505,7 @@ static void process_config_line(const char *line, unsigned long *event_mask)
        int i;
 
        /* !!!! Only Uppercase Keywords in devsfd.conf */
        int i;
 
        /* !!!! Only Uppercase Keywords in devsfd.conf */
-       static const char options[] =
+       static const char options[] ALIGN1 =
                "CLEAR_CONFIG\0""INCLUDE\0""OPTIONAL_INCLUDE\0"
                "RESTORE\0""PERMISSIONS\0""MODLOAD\0""EXECUTE\0"
                "COPY\0""IGNORE\0""MKOLDCOMPAT\0""MKNEWCOMPAT\0"
                "CLEAR_CONFIG\0""INCLUDE\0""OPTIONAL_INCLUDE\0"
                "RESTORE\0""PERMISSIONS\0""MODLOAD\0""EXECUTE\0"
                "COPY\0""IGNORE\0""MKOLDCOMPAT\0""MKNEWCOMPAT\0"
index 98cc04fd3249110b5250d8c5b50178ae2350780a..484c97061542ef1043d2f18c2cd97d785ed695e5 100644 (file)
 #define CDROM 0x0005
 
 #if ENABLE_FEATURE_HDPARM_GET_IDENTITY
 #define CDROM 0x0005
 
 #if ENABLE_FEATURE_HDPARM_GET_IDENTITY
-static const char * const pkt_str[] = {
+static const char *const pkt_str[] = {
        "Direct-access device",                 /* word 0, bits 12-8 = 00 */
        "Sequential-access device",             /* word 0, bits 12-8 = 01 */
        "Printer",                              /* word 0, bits 12-8 = 02 */
        "Direct-access device",                 /* word 0, bits 12-8 = 00 */
        "Sequential-access device",             /* word 0, bits 12-8 = 01 */
        "Printer",                              /* word 0, bits 12-8 = 02 */
@@ -163,7 +163,7 @@ static const char * const pkt_str[] = {
        "Unknown",                      /* word 0, bits 12-8 = 1f */
 };
 
        "Unknown",                      /* word 0, bits 12-8 = 1f */
 };
 
-static const char * const ata1_cfg_str[] = {                   /* word 0 in ATA-1 mode */
+static const char *const ata1_cfg_str[] = {                    /* word 0 in ATA-1 mode */
        "Reserved",                             /* bit 0 */
        "hard sectored",                        /* bit 1 */
        "soft sectored",                        /* bit 2 */
        "Reserved",                             /* bit 0 */
        "hard sectored",                        /* bit 1 */
        "soft sectored",                        /* bit 2 */
@@ -326,7 +326,7 @@ static const char actual_ver[MINOR_MAX+2] = {
 #define NUM_CMD_FEAT_STR       48
 
 #if ENABLE_FEATURE_HDPARM_GET_IDENTITY
 #define NUM_CMD_FEAT_STR       48
 
 #if ENABLE_FEATURE_HDPARM_GET_IDENTITY
-static const char * const cmd_feat_str[] = {
+static const char *const cmd_feat_str[] = {
        "",                                     /* word 82 bit 15: obsolete  */
        "NOP cmd",                              /* word 82 bit 14 */
        "READ BUFFER cmd",                      /* word 82 bit 13 */
        "",                                     /* word 82 bit 15: obsolete  */
        "NOP cmd",                              /* word 82 bit 14 */
        "READ BUFFER cmd",                      /* word 82 bit 13 */
@@ -413,7 +413,7 @@ void identify_from_stdin(void);
 #define SECU_LEVEL      0x0010
 #define NUM_SECU_STR    6
 #if ENABLE_FEATURE_HDPARM_GET_IDENTITY
 #define SECU_LEVEL      0x0010
 #define NUM_SECU_STR    6
 #if ENABLE_FEATURE_HDPARM_GET_IDENTITY
-static const char * const secu_str[] = {
+static const char *const secu_str[] = {
        "supported",                    /* word 128, bit 0 */
        "enabled",                      /* word 128, bit 1 */
        "locked",                       /* word 128, bit 2 */
        "supported",                    /* word 128, bit 0 */
        "enabled",                      /* word 128, bit 1 */
        "locked",                       /* word 128, bit 2 */
@@ -1096,14 +1096,16 @@ static unsigned long hwif_irq;
 // Too bad, really.
 
 #if ENABLE_FEATURE_HDPARM_GET_IDENTITY
 // Too bad, really.
 
 #if ENABLE_FEATURE_HDPARM_GET_IDENTITY
-static const char * const cfg_str[] =
-{      "",          "HardSect",   "SoftSect",   "NotMFM",
+static const char *const cfg_str[] = {
+       "",          "HardSect",   "SoftSect",   "NotMFM",
        "HdSw>15uSec", "SpinMotCtl", "Fixed",     "Removeable",
        "DTR<=5Mbs",   "DTR>5Mbs",   "DTR>10Mbs", "RotSpdTol>.5%",
        "dStbOff",     "TrkOff",     "FmtGapReq", "nonMagnetic"
 };
 
        "HdSw>15uSec", "SpinMotCtl", "Fixed",     "Removeable",
        "DTR<=5Mbs",   "DTR>5Mbs",   "DTR>10Mbs", "RotSpdTol>.5%",
        "dStbOff",     "TrkOff",     "FmtGapReq", "nonMagnetic"
 };
 
-static const char * const BuffType[] = {"Unknown", "1Sect", "DualPort", "DualPortCache"};
+static const char *const BuffType[] = {
+       "Unknown", "1Sect", "DualPort", "DualPortCache"
+};
 
 static void dump_identity(const struct hd_driveid *id)
 {
 
 static void dump_identity(const struct hd_driveid *id)
 {
@@ -1930,7 +1932,8 @@ static void parse_xfermode(int flag, smallint *get, smallint *set, int *value)
 }
 
 /*------- getopt short options --------*/
 }
 
 /*------- getopt short options --------*/
-static const char hdparm_options[] = "gfu::n::p:r::m::c::k::a::B:tTh"
+static const char hdparm_options[] ALIGN1 =
+       "gfu::n::p:r::m::c::k::a::B:tTh"
        USE_FEATURE_HDPARM_GET_IDENTITY("iI")
        USE_FEATURE_HDPARM_HDIO_GETSET_DMA("d::")
 #ifdef HDIO_DRIVE_CMD
        USE_FEATURE_HDPARM_GET_IDENTITY("iI")
        USE_FEATURE_HDPARM_HDIO_GETSET_DMA("d::")
 #ifdef HDIO_DRIVE_CMD
index a6649c5ca30b6028a7ea80526196c829e410ea77..046a3c459e08871b0a043188f09dffc93f4a5536 100644 (file)
@@ -450,12 +450,12 @@ static void cap_cur_fline(int nlines)
        }
 }
 
        }
 }
 
-static const char controls[] =
+static const char controls[] ALIGN1 =
        /* NUL: never encountered; TAB: not converted */
        /**/"\x01\x02\x03\x04\x05\x06\x07\x08"  "\x0a\x0b\x0c\x0d\x0e\x0f"
        "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
        "\x7f\x9b"; /* DEL and infamous Meta-ESC :( */
        /* NUL: never encountered; TAB: not converted */
        /**/"\x01\x02\x03\x04\x05\x06\x07\x08"  "\x0a\x0b\x0c\x0d\x0e\x0f"
        "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
        "\x7f\x9b"; /* DEL and infamous Meta-ESC :( */
-static const char ctrlconv[] =
+static const char ctrlconv[] ALIGN1 =
        /* '\n': it's a former NUL - subst with '@', not 'J' */
        "\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x40\x4b\x4c\x4d\x4e\x4f"
        "\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f";
        /* '\n': it's a former NUL - subst with '@', not 'J' */
        "\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x40\x4b\x4c\x4d\x4e\x4f"
        "\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f";
index 9b7db662aa4c54ba7ba6c160b2be70f710482993..e8473f702c0b2287fa21cc4fcbf5c969b796fbd2 100644 (file)
@@ -23,15 +23,15 @@ typedef struct {
 
 #define UL unsigned long
 
 
 #define UL unsigned long
 
-static const char default_format[] = "real\t%E\nuser\t%u\nsys\t%T";
+static const char default_format[] ALIGN1 = "real\t%E\nuser\t%u\nsys\t%T";
 
 /* The output format for the -p option .*/
 
 /* The output format for the -p option .*/
-static const char posix_format[] = "real %e\nuser %U\nsys %S";
+static const char posix_format[] ALIGN1 = "real %e\nuser %U\nsys %S";
 
 
 /* Format string for printing all statistics verbosely.
    Keep this output to 24 lines so users on terminals can see it all.*/
 
 
 /* Format string for printing all statistics verbosely.
    Keep this output to 24 lines so users on terminals can see it all.*/
-static const char long_format[] =
+static const char long_format[] ALIGN1 =
        "\tCommand being timed: \"%C\"\n"
        "\tUser time (seconds): %U\n"
        "\tSystem time (seconds): %S\n"
        "\tCommand being timed: \"%C\"\n"
        "\tUser time (seconds): %U\n"
        "\tSystem time (seconds): %S\n"
index 8a6cc05ddff42866ea8cb2d7294ef711fa7399a0..c0bc0eb1bf905bf4e2630ffbb4ac605164d6cc9d 100644 (file)
@@ -3613,12 +3613,12 @@ static int obj_gpl_license(struct obj_file *f, const char **license)
         * linux/include/linux/module.h.  Checking for leading "GPL" will not
         * work, somebody will use "GPL sucks, this is proprietary".
         */
         * linux/include/linux/module.h.  Checking for leading "GPL" will not
         * work, somebody will use "GPL sucks, this is proprietary".
         */
-       static const char * const gpl_licenses[] = {
+       static const char *const gpl_licenses[] = {
                "GPL",
                "GPL v2",
                "GPL and additional rights",
                "Dual BSD/GPL",
                "GPL",
                "GPL v2",
                "GPL and additional rights",
                "Dual BSD/GPL",
-               "Dual MPL/GPL",
+               "Dual MPL/GPL"
        };
 
        sec = obj_find_section(f, ".modinfo");
        };
 
        sec = obj_find_section(f, ".modinfo");
@@ -3681,7 +3681,8 @@ static void set_tainted(struct obj_file *f, int fd, char *m_name,
 /* Check if loading this module will taint the kernel. */
 static void check_tainted_module(struct obj_file *f, char *m_name)
 {
 /* Check if loading this module will taint the kernel. */
 static void check_tainted_module(struct obj_file *f, char *m_name)
 {
-       static const char tainted_file[] = TAINT_FILENAME;
+       static const char tainted_file[] ALIGN1 = TAINT_FILENAME;
+
        int fd, kernel_has_tainted;
        const char *ptr;
 
        int fd, kernel_has_tainted;
        const char *ptr;
 
@@ -3750,7 +3751,8 @@ static void
 add_ksymoops_symbols(struct obj_file *f, const char *filename,
                                 const char *m_name)
 {
 add_ksymoops_symbols(struct obj_file *f, const char *filename,
                                 const char *m_name)
 {
-       static const char symprefix[] = "__insmod_";
+       static const char symprefix[] ALIGN1 = "__insmod_";
+
        struct obj_section *sec;
        struct obj_symbol *sym;
        char *name, *absolute_filename;
        struct obj_section *sec;
        struct obj_symbol *sym;
        char *name, *absolute_filename;
index 907433b4a689a04344e889b33055f88cfc474127..a5a73734920d32ca50bc40c83fdb42d8cd0bb1c2 100644 (file)
@@ -46,7 +46,7 @@ static int sockfd;              /* active socket descriptor     */
 static smallint hw_set;         /* flag if hw-type was set (-H) */
 static const char *device = ""; /* current device               */
 
 static smallint hw_set;         /* flag if hw-type was set (-H) */
 static const char *device = ""; /* current device               */
 
-static const char options[] =
+static const char options[] ALIGN1 =
        "pub\0"
        "priv\0"
        "temp\0"
        "pub\0"
        "priv\0"
        "temp\0"
index 02e7c52707f3fc1af8652f4af52d771daaf7bced..f3d6009dd0a84451ecfa9cf41f13b00f4d2c0789 100644 (file)
@@ -287,7 +287,7 @@ int ftp_send(ftp_host_info_t *server, FILE *control_stream,
 #define FTPGETPUT_OPT_PORT     16
 
 #if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS
 #define FTPGETPUT_OPT_PORT     16
 
 #if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS
-static const char ftpgetput_longopts[] =
+static const char ftpgetput_longopts[] ALIGN1 =
        "continue\0" Required_argument "c"
        "verbose\0"  No_argument       "v"
        "username\0" Required_argument "u"
        "continue\0" Required_argument "c"
        "verbose\0"  No_argument       "v"
        "username\0" Required_argument "u"
index fb3129f0b39b3aa0fd2bcb09eb6e48169b2bf692..b083d645ca6f02d5807f50cade5135a3f8f8d517 100644 (file)
@@ -98,8 +98,8 @@
 # define PIPE_BUF 4096
 #endif
 
 # define PIPE_BUF 4096
 #endif
 
-static const char default_path_httpd_conf[] = "/etc";
-static const char httpd_conf[] = "httpd.conf";
+static const char default_path_httpd_conf[] ALIGN1 = "/etc";
+static const char httpd_conf[] ALIGN1 = "httpd.conf";
 
 #define TIMEOUT 60
 
 
 #define TIMEOUT 60
 
@@ -202,9 +202,9 @@ struct globals {
        ContentLength = -1; \
 } while (0)
 
        ContentLength = -1; \
 } while (0)
 
-static const char request_GET[] = "GET";    /* size algorithmic optimize */
+static const char request_GET[] ALIGN1 = "GET";    /* size algorithmic optimize */
 
 
-static const char* const suffixTable [] = {
+static const char *const suffixTable[] = {
 /* Warning: shorted equivalent suffix in one line must be first */
        ".htm.html", "text/html",
        ".jpg.jpeg", "image/jpeg",
 /* Warning: shorted equivalent suffix in one line must be first */
        ".htm.html", "text/html",
        ".jpg.jpeg", "image/jpeg",
@@ -288,7 +288,7 @@ static const HttpEnumString httpResponseNames[] = {
 };
 
 
 };
 
 
-static const char RFC1123FMT[] = "%a, %d %b %Y %H:%M:%S GMT";
+static const char RFC1123FMT[] ALIGN1 = "%a, %d %b %Y %H:%M:%S GMT";
 
 
 #define STRNCASECMP(a, str) strncasecmp((a), (str), sizeof(str)-1)
 
 
 #define STRNCASECMP(a, str) strncasecmp((a), (str), sizeof(str)-1)
@@ -1268,7 +1268,7 @@ static int sendCgi(const char *url,
                                 * <cr><lf> pair here. We will output "200 OK" line
                                 * if needed, but CGI still has to provide blank line
                                 * between header and body */
                                 * <cr><lf> pair here. We will output "200 OK" line
                                 * if needed, but CGI still has to provide blank line
                                 * between header and body */
-                               static const char HTTP_200[] = "HTTP/1.0 200 OK\r\n";
+                               static const char HTTP_200[] ALIGN1 = "HTTP/1.0 200 OK\r\n";
 
                                /* Must use safe_read, not full_read, because
                                 * CGI may output a few first bytes and then wait
 
                                /* Must use safe_read, not full_read, because
                                 * CGI may output a few first bytes and then wait
@@ -1343,9 +1343,9 @@ static int sendCgi(const char *url,
 static int sendFile(const char *url)
 {
        char * suffix;
 static int sendFile(const char *url)
 {
        char * suffix;
-       int  f;
-       const char * const * table;
-       const char * try_suffix;
+       int f;
+       const char *const *table;
+       const char *try_suffix;
 
        suffix = strrchr(url, '.');
 
 
        suffix = strrchr(url, '.');
 
index 9e6ed63e05fdd9339e2ca96b4030cf32119e82d2..61ce12ef1b1bfb1dd6742f530acdfd42ddf3585d 100644 (file)
@@ -871,7 +871,7 @@ static int hw_null_address(const struct hwtype *hw, void *ap)
        return 1;
 }
 
        return 1;
 }
 
-static const char TRext[] = "\0\0\0Ki\0Mi\0Gi\0Ti";
+static const char TRext[] ALIGN1 = "\0\0\0Ki\0Mi\0Gi\0Ti";
 
 static void print_bytes_scaled(unsigned long long ull, const char *end)
 {
 
 static void print_bytes_scaled(unsigned long long ull, const char *end)
 {
@@ -1020,7 +1020,7 @@ static void ife_print(struct interface *ptr)
        if (ptr->flags == 0) {
                printf("[NO FLAGS] ");
        } else {
        if (ptr->flags == 0) {
                printf("[NO FLAGS] ");
        } else {
-               static const char ife_print_flags_strs[] =
+               static const char ife_print_flags_strs[] ALIGN1 =
                        "UP\0"
                        "BROADCAST\0"
                        "DEBUG\0"
                        "UP\0"
                        "BROADCAST\0"
                        "DEBUG\0"
@@ -1038,7 +1038,7 @@ static void ife_print(struct interface *ptr)
                        "DYNAMIC\0"
 #endif
                        ;
                        "DYNAMIC\0"
 #endif
                        ;
-               static const unsigned short ife_print_flags_mask[] = {
+               static const unsigned short ife_print_flags_mask[] ALIGN2 = {
                        IFF_UP,
                        IFF_BROADCAST,
                        IFF_DEBUG,
                        IFF_UP,
                        IFF_BROADCAST,
                        IFF_DEBUG,
@@ -1051,9 +1051,9 @@ static void ife_print(struct interface *ptr)
                        IFF_ALLMULTI,
                        IFF_SLAVE,
                        IFF_MASTER,
                        IFF_ALLMULTI,
                        IFF_SLAVE,
                        IFF_MASTER,
-                       IFF_MULTICAST,
+                       IFF_MULTICAST
 #ifdef HAVE_DYNAMIC
 #ifdef HAVE_DYNAMIC
-                       IFF_DYNAMIC,
+                       ,IFF_DYNAMIC
 #endif
                };
                const unsigned short *mask = ife_print_flags_mask;
 #endif
                };
                const unsigned short *mask = ife_print_flags_mask;
index bf7e84c537190b90cd98eac699751abbd5502ba5..c82d731c13429d6f26fd6342fa4f64a9a98a536a 100644 (file)
@@ -82,7 +82,7 @@ int iptunnel_main(int argc, char **argv)
 int ip_main(int argc, char **argv);
 int ip_main(int argc, char **argv)
 {
 int ip_main(int argc, char **argv);
 int ip_main(int argc, char **argv)
 {
-       static const char keywords[] =
+       static const char keywords[] ALIGN1 =
                USE_FEATURE_IP_ADDRESS("address\0")
                USE_FEATURE_IP_ROUTE("route\0")
                USE_FEATURE_IP_LINK("link\0")
                USE_FEATURE_IP_ADDRESS("address\0")
                USE_FEATURE_IP_ROUTE("route\0")
                USE_FEATURE_IP_LINK("link\0")
index f3e3ad98f45ef9b3e1fdab16e633365f9e8f2149..2a099eff012b4b636dfd4ca61c42efca0089f8f7 100644 (file)
@@ -63,7 +63,7 @@ int get_prefix(unsigned long netmask);
 #define SILENT    0x20
 
 #if ENABLE_FEATURE_IPCALC_LONG_OPTIONS
 #define SILENT    0x20
 
 #if ENABLE_FEATURE_IPCALC_LONG_OPTIONS
-       static const char ipcalc_longopts[] =
+       static const char ipcalc_longopts[] ALIGN1 =
                "netmask\0"   No_argument "m"
                "broadcast\0" No_argument "b"
                "network\0"   No_argument "n"
                "netmask\0"   No_argument "m"
                "broadcast\0" No_argument "b"
                "network\0"   No_argument "n"
index 0e429a06fbfbdd2a23bb6e6cb937003726f7e389..ff333993fbb791a625b601e380d7751a79de6e51 100644 (file)
@@ -26,7 +26,7 @@ void ip_parse_common_args(int *argcp, char ***argvp)
 {
        int argc = *argcp;
        char **argv = *argvp;
 {
        int argc = *argcp;
        char **argv = *argvp;
-       static const char ip_common_commands[] =
+       static const char ip_common_commands[] ALIGN1 =
                "-family\0""inet\0""inet6\0""link\0"
                "-4\0""-6\0""-0\0""-oneline\0";
        enum {
                "-family\0""inet\0""inet6\0""link\0"
                "-4\0""-6\0""-0\0""-oneline\0";
        enum {
index 8874fdb0a54957313ac03c92061a3f6859dbc383..6a5f2cfbd22a6af7d493c4ed6ff2b8e729801b5f 100644 (file)
@@ -412,7 +412,7 @@ static void ipaddr_reset_filter(int _oneline)
 /* Return value becomes exitcode. It's okay to not return at all */
 int ipaddr_list_or_flush(int argc, char **argv, int flush)
 {
 /* Return value becomes exitcode. It's okay to not return at all */
 int ipaddr_list_or_flush(int argc, char **argv, int flush)
 {
-       static const char option[] = "to\0""scope\0""up\0""label\0""dev\0";
+       static const char option[] ALIGN1 = "to\0""scope\0""up\0""label\0""dev\0";
 
        struct nlmsg_list *linfo = NULL;
        struct nlmsg_list *ainfo = NULL;
 
        struct nlmsg_list *linfo = NULL;
        struct nlmsg_list *ainfo = NULL;
@@ -599,7 +599,7 @@ static int default_scope(inet_prefix *lcl)
 /* Return value becomes exitcode. It's okay to not return at all */
 static int ipaddr_modify(int cmd, int argc, char **argv)
 {
 /* Return value becomes exitcode. It's okay to not return at all */
 static int ipaddr_modify(int cmd, int argc, char **argv)
 {
-       static const char option[] =
+       static const char option[] ALIGN1 =
                "peer\0""remote\0""broadcast\0""brd\0"
                "anycast\0""scope\0""dev\0""label\0""local\0";
        struct rtnl_handle rth;
                "peer\0""remote\0""broadcast\0""brd\0"
                "anycast\0""scope\0""dev\0""label\0""local\0";
        struct rtnl_handle rth;
@@ -768,7 +768,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv)
 /* Return value becomes exitcode. It's okay to not return at all */
 int do_ipaddr(int argc, char **argv)
 {
 /* Return value becomes exitcode. It's okay to not return at all */
 int do_ipaddr(int argc, char **argv)
 {
-       static const char commands[] =
+       static const char commands[] ALIGN1 =
                "add\0""delete\0""list\0""show\0""lst\0""flush\0";
 
        int command_num = 2; /* default command is list */
                "add\0""delete\0""list\0""show\0""lst\0""flush\0";
 
        int command_num = 2; /* default command is list */
index 69ce84e49a1a8bdcaf4f26939ec4c06054737396..e1c9c60433622697da9e2807f958d92773e42532 100644 (file)
@@ -171,7 +171,7 @@ static int do_set(int argc, char **argv)
        struct ifreq ifr0, ifr1;
        char *newname = NULL;
        int htype, halen;
        struct ifreq ifr0, ifr1;
        char *newname = NULL;
        int htype, halen;
-       static const char keywords[] =
+       static const char keywords[] ALIGN1 =
                "up\0""down\0""name\0""mtu\0""multicast\0""arp\0""addr\0""dev\0"
                "on\0""off\0";
        enum { ARG_up = 1, ARG_down, ARG_name, ARG_mtu, ARG_multicast, ARG_arp,
                "up\0""down\0""name\0""mtu\0""multicast\0""arp\0""addr\0""dev\0"
                "on\0""off\0";
        enum { ARG_up = 1, ARG_down, ARG_name, ARG_mtu, ARG_multicast, ARG_arp,
@@ -275,7 +275,7 @@ static int ipaddr_list_link(int argc, char **argv)
 /* Return value becomes exitcode. It's okay to not return at all */
 int do_iplink(int argc, char **argv)
 {
 /* Return value becomes exitcode. It's okay to not return at all */
 int do_iplink(int argc, char **argv)
 {
-       static const char keywords[] =
+       static const char keywords[] ALIGN1 =
                "set\0""show\0""lst\0""list\0";
        smalluint key;
        if (argc <= 0)
                "set\0""show\0""lst\0""list\0";
        smalluint key;
        if (argc <= 0)
index 0d171c785819db6d95eabc6ad2d36139996d3f30..fbc7210496f4948895922f87fb7fc74e0e200e3e 100644 (file)
@@ -294,7 +294,7 @@ static int print_route(struct sockaddr_nl *who ATTRIBUTE_UNUSED,
 /* Return value becomes exitcode. It's okay to not return at all */
 static int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
 {
 /* Return value becomes exitcode. It's okay to not return at all */
 static int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
 {
-       static const char keywords[] =
+       static const char keywords[] ALIGN1 =
                "src\0""via\0""mtu\0""lock\0""protocol\0"USE_FEATURE_IP_RULE("table\0")
                "dev\0""oif\0""to\0";
        enum {
                "src\0""via\0""mtu\0""lock\0""protocol\0"USE_FEATURE_IP_RULE("table\0")
                "dev\0""oif\0""to\0";
        enum {
@@ -489,7 +489,7 @@ static int rtnl_rtcache_request(struct rtnl_handle *rth, int family)
 
 static void iproute_flush_cache(void)
 {
 
 static void iproute_flush_cache(void)
 {
-       static const char fn[] = "/proc/sys/net/ipv4/route/flush";
+       static const char fn[] ALIGN1 = "/proc/sys/net/ipv4/route/flush";
        int flush_fd = open_or_warn(fn, O_WRONLY);
 
        if (flush_fd < 0) {
        int flush_fd = open_or_warn(fn, O_WRONLY);
 
        if (flush_fd < 0) {
@@ -517,7 +517,7 @@ static int iproute_list_or_flush(int argc, char **argv, int flush)
        struct rtnl_handle rth;
        char *id = NULL;
        char *od = NULL;
        struct rtnl_handle rth;
        char *id = NULL;
        char *od = NULL;
-       static const char keywords[] =
+       static const char keywords[] ALIGN1 =
                "protocol\0""all\0""dev\0""oif\0""iif\0""via\0""table\0""cache\0" /*all*/
                "from\0""root\0""match\0""exact\0""to\0"/*root match exact*/;
        enum {
                "protocol\0""all\0""dev\0""oif\0""iif\0""via\0""table\0""cache\0" /*all*/
                "from\0""root\0""match\0""exact\0""to\0"/*root match exact*/;
        enum {
@@ -679,7 +679,7 @@ static int iproute_get(int argc, char **argv)
        char *odev = NULL;
        bool connected = 0;
        bool from_ok = 0;
        char *odev = NULL;
        bool connected = 0;
        bool from_ok = 0;
-       static const char options[] =
+       static const char options[] ALIGN1 =
                "from\0""iif\0""oif\0""dev\0""notify\0""connected\0""to\0";
 
        memset(&req, 0, sizeof(req));
                "from\0""iif\0""oif\0""dev\0""notify\0""connected\0""to\0";
 
        memset(&req, 0, sizeof(req));
@@ -824,7 +824,7 @@ static int iproute_get(int argc, char **argv)
 /* Return value becomes exitcode. It's okay to not return at all */
 int do_iproute(int argc, char **argv)
 {
 /* Return value becomes exitcode. It's okay to not return at all */
 int do_iproute(int argc, char **argv)
 {
-       static const char ip_route_commands[] =
+       static const char ip_route_commands[] ALIGN1 =
        /*0-3*/ "add\0""append\0""change\0""chg\0"
        /*4-7*/ "delete\0""get\0""list\0""show\0"
        /*8..*/ "prepend\0""replace\0""test\0""flush\0";
        /*0-3*/ "add\0""append\0""change\0""chg\0"
        /*4-7*/ "delete\0""get\0""list\0""show\0"
        /*8..*/ "prepend\0""replace\0""test\0""flush\0";
index 8e2a06f4fd24b5531edae61dab509e982c164ed2..18ae6b5efc307cccea74ab4b4a7cabfa3a3204c2 100644 (file)
@@ -187,7 +187,7 @@ static int iprule_list(int argc, char **argv)
 /* Return value becomes exitcode. It's okay to not return at all */
 static int iprule_modify(int cmd, int argc, char **argv)
 {
 /* Return value becomes exitcode. It's okay to not return at all */
 static int iprule_modify(int cmd, int argc, char **argv)
 {
-       static const char keywords[] =
+       static const char keywords[] ALIGN1 =
                "from\0""to\0""preference\0""order\0""priority\0"
                "tos\0""fwmark\0""realms\0""table\0""lookup\0""dev\0"
                "iif\0""nat\0""map-to\0""type\0""help\0";
                "from\0""to\0""preference\0""order\0""priority\0"
                "tos\0""fwmark\0""realms\0""table\0""lookup\0""dev\0"
                "iif\0""nat\0""map-to\0""type\0""help\0";
@@ -313,7 +313,7 @@ static int iprule_modify(int cmd, int argc, char **argv)
 /* Return value becomes exitcode. It's okay to not return at all */
 int do_iprule(int argc, char **argv)
 {
 /* Return value becomes exitcode. It's okay to not return at all */
 int do_iprule(int argc, char **argv)
 {
-       static const char ip_rule_commands[] =
+       static const char ip_rule_commands[] ALIGN1 =
                "add\0""delete\0""list\0""show\0";
        int cmd = 2; /* list */
 
                "add\0""delete\0""list\0""show\0";
        int cmd = 2; /* list */
 
index a2933879c267f2825c2987123709b5601ed1194c..2b171355600960f204d8f2d26bdeef344caedc66 100644 (file)
@@ -128,7 +128,7 @@ static int do_del_ioctl(const char *basedev, struct ip_tunnel_parm *p)
 /* Dies on error */
 static void parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p)
 {
 /* Dies on error */
 static void parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p)
 {
-       static const char keywords[] =
+       static const char keywords[] ALIGN1 =
                "mode\0""ipip\0""ip/ip\0""gre\0""gre/ip\0""sit\0""ipv6/ip\0"
                "key\0""ikey\0""okey\0""seq\0""iseq\0""oseq\0"
                "csum\0""icsum\0""ocsum\0""nopmtudisc\0""pmtudisc\0"
                "mode\0""ipip\0""ip/ip\0""gre\0""gre/ip\0""sit\0""ipv6/ip\0"
                "key\0""ikey\0""okey\0""seq\0""iseq\0""oseq\0"
                "csum\0""icsum\0""ocsum\0""nopmtudisc\0""pmtudisc\0"
@@ -519,7 +519,7 @@ static int do_show(int argc, char **argv)
 /* Return value becomes exitcode. It's okay to not return at all */
 int do_iptunnel(int argc, char **argv)
 {
 /* Return value becomes exitcode. It's okay to not return at all */
 int do_iptunnel(int argc, char **argv)
 {
-       static const char keywords[] =
+       static const char keywords[] ALIGN1 =
                "add\0""change\0""delete\0""show\0""list\0""lst\0";
        enum { ARG_add = 0, ARG_change, ARG_del, ARG_show, ARG_list, ARG_lst };
        int key;
                "add\0""change\0""delete\0""show\0""list\0""lst\0";
        enum { ARG_add = 0, ARG_change, ARG_del, ARG_show, ARG_list, ARG_lst };
        int key;
index e8a8279b0ae8829a1f66f4baf97dc778725b1c73..7b5de92c27d40cb95227a35481a08ed11f868040 100644 (file)
@@ -131,7 +131,7 @@ unsigned ll_index_to_flags(int idx)
        return 0;
 }
 
        return 0;
 }
 
-int xll_name_to_index(const char * const name)
+int xll_name_to_index(const char *const name)
 {
        int ret = 0;
        int sock_fd;
 {
        int ret = 0;
        int sock_fd;
index 2dfc8442299887868def9177cbe87c3a0d6ffd7b..55e2cf3935092386cdeb421967acbec168ac4566 100644 (file)
@@ -4,7 +4,7 @@
 
 int ll_remember_index(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
 int ll_init_map(struct rtnl_handle *rth);
 
 int ll_remember_index(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
 int ll_init_map(struct rtnl_handle *rth);
-int xll_name_to_index(const char * const name);
+int xll_name_to_index(const char *const name);
 const char *ll_index_to_name(int idx);
 const char *ll_idx_n2a(int idx, char *buf);
 /* int ll_index_to_type(int idx); */
 const char *ll_index_to_name(int idx);
 const char *ll_idx_n2a(int idx, char *buf);
 /* int ll_index_to_type(int idx); */
index 96b2d1791bb6be09227ccf17d916981f7f4e2125..ca2f4436ad512225967531ec0f27571d14f764d9 100644 (file)
@@ -51,7 +51,7 @@ const char *rtnl_rtntype_n2a(int id, char *buf, int len)
 
 int rtnl_rtntype_a2n(int *id, char *arg)
 {
 
 int rtnl_rtntype_a2n(int *id, char *arg)
 {
-       static const char keywords[] =
+       static const char keywords[] ALIGN1 =
                "local\0""nat\0""broadcast\0""brd\0""anycast\0"
                "multicast\0""prohibit\0""unreachable\0""blackhole\0"
                "xresolve\0""unicast\0""throw\0";
                "local\0""nat\0""broadcast\0""brd\0""anycast\0"
                "multicast\0""prohibit\0""unreachable\0""blackhole\0"
                "xresolve\0""unicast\0""throw\0";
index 746e25091874d87a41a7729c7fda5380c199bdf2..014e5e25147014cec4cfb3a7c4721001c0021d97 100644 (file)
@@ -47,8 +47,7 @@ enum {
        TCP_CLOSING /* now a valid state */
 };
 
        TCP_CLOSING /* now a valid state */
 };
 
-static const char * const tcp_state[] =
-{
+static const char *const tcp_state[] = {
        "",
        "ESTABLISHED",
        "SYN_SENT",
        "",
        "ESTABLISHED",
        "SYN_SENT",
index 530c51b1017c42aca2aa5656f2f6e7b820cae2ee..bfa58da2a1a66ec64cda4657790d8257ac324870 100644 (file)
@@ -73,7 +73,7 @@
 #define HOST_FLAG 2
 
 /* We remap '-' to '#' to avoid problems with getopt. */
 #define HOST_FLAG 2
 
 /* We remap '-' to '#' to avoid problems with getopt. */
-static const char tbl_hash_net_host[] =
+static const char tbl_hash_net_host[] ALIGN1 =
        "\007\001#net\0"
 /*     "\010\002#host\0" */
        "\007\002#host"                         /* Since last, we can save a byte. */
        "\007\001#net\0"
 /*     "\010\002#host\0" */
        "\007\002#host"                         /* Since last, we can save a byte. */
@@ -96,7 +96,7 @@ static const char tbl_hash_net_host[] =
 #define KW_IPVx_DYN             042
 #define KW_IPVx_REINSTATE       043
 
 #define KW_IPVx_DYN             042
 #define KW_IPVx_REINSTATE       043
 
-static const char tbl_ipvx[] =
+static const char tbl_ipvx[] ALIGN1 =
        /* 020 is the "takes an arg" bit */
 #if HAVE_NEW_ADDRT
        "\011\020metric\0"
        /* 020 is the "takes an arg" bit */
 #if HAVE_NEW_ADDRT
        "\011\020metric\0"
@@ -438,7 +438,7 @@ static void INET6_setroute(int action, char **args)
 }
 #endif
 
 }
 #endif
 
-static const unsigned int flagvals[] = { /* Must agree with flagchars[]. */
+static const unsigned flagvals[] = { /* Must agree with flagchars[]. */
        RTF_GATEWAY,
        RTF_HOST,
        RTF_REINSTATE,
        RTF_GATEWAY,
        RTF_HOST,
        RTF_REINSTATE,
@@ -454,7 +454,8 @@ static const unsigned int flagvals[] = { /* Must agree with flagchars[]. */
 #define IPV4_MASK (RTF_GATEWAY|RTF_HOST|RTF_REINSTATE|RTF_DYNAMIC|RTF_MODIFIED)
 #define IPV6_MASK (RTF_GATEWAY|RTF_HOST|RTF_DEFAULT|RTF_ADDRCONF|RTF_CACHE)
 
 #define IPV4_MASK (RTF_GATEWAY|RTF_HOST|RTF_REINSTATE|RTF_DYNAMIC|RTF_MODIFIED)
 #define IPV6_MASK (RTF_GATEWAY|RTF_HOST|RTF_DEFAULT|RTF_ADDRCONF|RTF_CACHE)
 
-static const char flagchars[] =                /* Must agree with flagvals[]. */
+/* Must agree with flagvals[]. */
+static const char flagchars[] ALIGN1 =
        "GHRDM"
 #if ENABLE_FEATURE_IPV6
        "DAC"
        "GHRDM"
 #if ENABLE_FEATURE_IPV6
        "DAC"
@@ -631,11 +632,12 @@ static void INET6_displayroutes(int noresolve)
 #define ROUTE_OPT_INET6 0x08 /* Not an actual option. See below. */
 
 /* 1st byte is offset to next entry offset.  2nd byte is return value. */
 #define ROUTE_OPT_INET6 0x08 /* Not an actual option. See below. */
 
 /* 1st byte is offset to next entry offset.  2nd byte is return value. */
-static const char tbl_verb[] = /* 2nd byte matches RTACTION_* code */
+/* 2nd byte matches RTACTION_* code */
+static const char tbl_verb[] ALIGN1 =
        "\006\001add\0"
        "\006\002del\0"
 /*     "\011\002delete\0" */
        "\006\001add\0"
        "\006\002del\0"
 /*     "\011\002delete\0" */
-       "\010\002delete"                        /* Since last, we can save a byte. */
+       "\010\002delete"  /* Since it's last, we can save a byte. */
 ;
 
 int route_main(int argc, char **argv);
 ;
 
 int route_main(int argc, char **argv);
index 4bac879d29d8aee2683f118d819d4d0f0614e493..f78c88e89f67e297627a8fd6aa70010d3a603ef8 100644 (file)
@@ -123,7 +123,7 @@ int slattach_main(int argc, char **argv);
 int slattach_main(int argc, char **argv)
 {
        /* Line discipline code table */
 int slattach_main(int argc, char **argv)
 {
        /* Line discipline code table */
-       static const char proto_names[] =
+       static const char proto_names[] ALIGN1 =
                "slip\0"        /* 0 */
                "cslip\0"       /* 1 */
                "slip6\0"       /* 2 */
                "slip\0"        /* 0 */
                "cslip\0"       /* 1 */
                "slip6\0"       /* 2 */
index a634d7a2be05678c98d964dbbf783623a189bdb7..4e8b27ba61b1d8f9c91d8710742955d6b26b8bf5 100644 (file)
@@ -353,7 +353,7 @@ static void putiac_naws(byte c, int x, int y)
 }
 #endif
 
 }
 #endif
 
-static char const escapecharis[] = "\r\nEscape character is ";
+static char const escapecharis[] ALIGN1 = "\r\nEscape character is ";
 
 static void setConMode(void)
 {
 
 static void setConMode(void)
 {
index b20486cc13b854fa422eaaa105a2b01a5e82f0a0..85d1a857f7f88e04d18a28036e3f14b9ba574770 100644 (file)
@@ -278,7 +278,7 @@ static int tftp( USE_GETPUT(const int cmd,)
                                "unknown transfer id",
                                "file already exists",
                                "no such user",
                                "unknown transfer id",
                                "file already exists",
                                "no such user",
-                               "bad option",
+                               "bad option"
                        };
 
                        const char *msg = "";
                        };
 
                        const char *msg = "";
@@ -309,7 +309,7 @@ static int tftp( USE_GETPUT(const int cmd,)
                                                /* htons can be impossible to use in const initializer: */
                                                /*static const uint16_t error_8[2] = { htons(TFTP_ERROR), htons(8) };*/
                                                /* thus we open-code big-endian layout */
                                                /* htons can be impossible to use in const initializer: */
                                                /*static const uint16_t error_8[2] = { htons(TFTP_ERROR), htons(8) };*/
                                                /* thus we open-code big-endian layout */
-                                               static const char error_8[4] = { 0,TFTP_ERROR, 0,8 };
+                                               static const uint8_t error_8[4] = { 0,TFTP_ERROR, 0,8 };
                                                xsendto(socketfd, error_8, 4, &peer_lsa->sa, peer_lsa->len);
                                                bb_error_msg("server proposes bad blksize %d, exiting", blksize);
                                                goto ret;
                                                xsendto(socketfd, error_8, 4, &peer_lsa->sa, peer_lsa->len);
                                                bb_error_msg("server proposes bad blksize %d, exiting", blksize);
                                                goto ret;
index c87f7ffc5a003f16a6d4d2940bf3aba18e2481a3..20f304d53a842586846d79569abcdaa2147897b4 100644 (file)
@@ -700,7 +700,7 @@ send_probe(int seq, int ttl)
 static inline const char *
 pr_type(unsigned char t)
 {
 static inline const char *
 pr_type(unsigned char t)
 {
-       static const char * const ttab[] = {
+       static const char *const ttab[] = {
        "Echo Reply",   "ICMP 1",       "ICMP 2",       "Dest Unreachable",
        "Source Quench", "Redirect",    "ICMP 6",       "ICMP 7",
        "Echo",         "Router Advert", "Router Solicit", "Time Exceeded",
        "Echo Reply",   "ICMP 1",       "ICMP 2",       "Dest Unreachable",
        "Source Quench", "Redirect",    "ICMP 6",       "ICMP 7",
        "Echo",         "Router Advert", "Router Solicit", "Time Exceeded",
index 59c015575dfa3ba21da3bab2803f7663d0102c6a..a47bbafff806040989719c0c291da5e9a519c7a2 100644 (file)
@@ -6,4 +6,6 @@
 
 #include "common.h"
 
 
 #include "common.h"
 
-const uint8_t MAC_BCAST_ADDR[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+const uint8_t MAC_BCAST_ADDR[6] ALIGN2 = {
+       0xff, 0xff, 0xff, 0xff, 0xff, 0xff
+};
index efe208814ce595846ea0b03886d47147755584d4..0e89c3cae20aadebff58b29aaa792eba3fb7106e 100644 (file)
@@ -180,7 +180,7 @@ int udhcpc_main(int argc, char **argv)
                OPT_v = 1 << 17,
        };
 #if ENABLE_GETOPT_LONG
                OPT_v = 1 << 17,
        };
 #if ENABLE_GETOPT_LONG
-       static const char udhcpc_longopts[] =
+       static const char udhcpc_longopts[] ALIGN1 =
                "clientid\0"      Required_argument "c"
                "clientid-none\0" No_argument       "C"
                "vendorclass\0"   Required_argument "V"
                "clientid\0"      Required_argument "c"
                "clientid-none\0" No_argument       "C"
                "vendorclass\0"   Required_argument "V"
index f9f9231245b7dea88a6edbbc81f5974ee9585ff3..a0765be7969dc81a5bee354d8c5f3d7040375ac2 100644 (file)
@@ -24,7 +24,7 @@ int dumpleases_main(int argc, char **argv)
                OPT_f   = 0x4,  // -f
        };
 #if ENABLE_GETOPT_LONG
                OPT_f   = 0x4,  // -f
        };
 #if ENABLE_GETOPT_LONG
-       static const char dumpleases_longopts[] =
+       static const char dumpleases_longopts[] ALIGN1 =
                "absolute\0"  No_argument       "a"
                "remaining\0" No_argument       "r"
                "file\0"      Required_argument "f"
                "absolute\0"  No_argument       "a"
                "remaining\0" No_argument       "r"
                "file\0"      Required_argument "f"
index a58adb9a9db1df146afeb824c5ce259dfc1464e1..3168fc69aa68d9e6d60c306b0831c7190934fc4f 100644 (file)
@@ -52,7 +52,7 @@ const struct dhcp_option dhcp_options[] = {
 };
 
 /* Lengths of the different option types */
 };
 
 /* Lengths of the different option types */
-const unsigned char option_lengths[] = {
+const unsigned char option_lengths[] ALIGN1 = {
        [OPTION_IP] =      4,
        [OPTION_IP_PAIR] = 8,
        [OPTION_BOOLEAN] = 1,
        [OPTION_IP] =      4,
        [OPTION_IP_PAIR] = 8,
        [OPTION_BOOLEAN] = 1,
index 4776e13248b4c8e766fb66210efaf5b0c2476e1c..8bd88701f8c31252a9b58188d844073ac981c0f7 100644 (file)
@@ -63,7 +63,7 @@ static const char *xfind_str(const char *table, const char *str)
        return table - 1;
 }
 
        return table - 1;
 }
 
-static const char cmds[] = {
+static const char cmds[] ALIGN1 = {
        4, ADD_VLAN_CMD, 7,
        'a', 'd', 'd', 0,
        3, DEL_VLAN_CMD, 7,
        4, ADD_VLAN_CMD, 7,
        'a', 'd', 'd', 0,
        3, DEL_VLAN_CMD, 7,
@@ -85,7 +85,7 @@ static const char cmds[] = {
        'm', 'a', 'p', 0,
 };
 
        'm', 'a', 'p', 0,
 };
 
-static const char name_types[] = {
+static const char name_types[] ALIGN1 = {
        VLAN_NAME_TYPE_PLUS_VID, 16,
        'V', 'L', 'A', 'N',
        '_', 'P', 'L', 'U', 'S', '_', 'V', 'I', 'D',
        VLAN_NAME_TYPE_PLUS_VID, 16,
        'V', 'L', 'A', 'N',
        '_', 'P', 'L', 'U', 'S', '_', 'V', 'I', 'D',
@@ -104,7 +104,7 @@ static const char name_types[] = {
        '_', 'N', 'O', '_', 'P', 'A', 'D', 0,
 };
 
        '_', 'N', 'O', '_', 'P', 'A', 'D', 0,
 };
 
-static const char conf_file_name[] = "/proc/net/vlan/config";
+static const char conf_file_name[] ALIGN1 = "/proc/net/vlan/config";
 
 int vconfig_main(int argc, char **argv);
 int vconfig_main(int argc, char **argv)
 
 int vconfig_main(int argc, char **argv);
 int vconfig_main(int argc, char **argv)
index 7b583c7ab0c31f08ed618fc6e573474c78c6dfde..d90368c408b1e549822c16d9499dc32cfbf58445 100644 (file)
@@ -114,7 +114,7 @@ int wget_main(int argc, char **argv)
        bool use_proxy = 1;             /* Use proxies if env vars are set  */
        const char *proxy_flag = "on";  /* Use proxies if env vars are set  */
        const char *user_agent = "Wget";/* "User-Agent" header field        */
        bool use_proxy = 1;             /* Use proxies if env vars are set  */
        const char *proxy_flag = "on";  /* Use proxies if env vars are set  */
        const char *user_agent = "Wget";/* "User-Agent" header field        */
-       static const char keywords[] =
+       static const char keywords[] ALIGN1 =
                "content-length\0""transfer-encoding\0""chunked\0""location\0";
        enum {
                KEY_content_length = 1, KEY_transfer_encoding, KEY_chunked, KEY_location
                "content-length\0""transfer-encoding\0""chunked\0""location\0";
        enum {
                KEY_content_length = 1, KEY_transfer_encoding, KEY_chunked, KEY_location
@@ -131,7 +131,7 @@ int wget_main(int argc, char **argv)
                WGET_OPT_HEADER     = 0x100,
        };
 #if ENABLE_FEATURE_WGET_LONG_OPTIONS
                WGET_OPT_HEADER     = 0x100,
        };
 #if ENABLE_FEATURE_WGET_LONG_OPTIONS
-       static const char wget_longopts[] =
+       static const char wget_longopts[] ALIGN1 =
                /* name, has_arg, val */
                "continue\0"         No_argument       "c"
                "spider\0"           No_argument       "s"
                /* name, has_arg, val */
                "continue\0"         No_argument       "c"
                "spider\0"           No_argument       "s"
@@ -539,7 +539,7 @@ static void parse_url(char *src_url, struct host_info *h)
        p = strchr(h->host, '#'); if (!sp || (p && sp > p)) sp = p;
        if (!sp) {
                /* must be writable because of bb_get_last_path_component() */
        p = strchr(h->host, '#'); if (!sp || (p && sp > p)) sp = p;
        if (!sp) {
                /* must be writable because of bb_get_last_path_component() */
-               static char nullstr[] = "";
+               static char nullstr[] ALIGN1 = "";
                h->path = nullstr;
        } else if (*sp == '/') {
                *sp = '\0';
                h->path = nullstr;
        } else if (*sp == '/') {
                *sp = '\0';
index 4f78a1489bb0de8318b72b26fcc063bc3fd59e1a..127a3d1c132b78ba866e8f3464879da5962cacfd 100644 (file)
@@ -36,7 +36,7 @@ static const char *const proc_name[] = {
        "net/dev",
        "meminfo",
        "diskstats",
        "net/dev",
        "meminfo",
        "diskstats",
-       "sys/fs/file-nr",
+       "sys/fs/file-nr"
 };
 
 struct globals {
 };
 
 struct globals {
@@ -754,7 +754,7 @@ static void collect_info(s_stat *s)
 
 typedef s_stat* init_func(const char *param);
 
 
 typedef s_stat* init_func(const char *param);
 
-static const char options[] = "ncmsfixptbdr";
+static const char options[] ALIGN1 = "ncmsfixptbdr";
 static init_func *const init_functions[] = {
        init_if,
        init_cpu,
 static init_func *const init_functions[] = {
        init_if,
        init_cpu,
@@ -767,7 +767,7 @@ static init_func *const init_functions[] = {
        init_time,
        init_blk,
        init_delay,
        init_time,
        init_blk,
        init_delay,
-       init_cr,
+       init_cr
 };
 
 int nmeter_main(int argc, char **argv);
 };
 
 int nmeter_main(int argc, char **argv);
index 6c5bb0e20eaa12f919a80a337f75e3a6d02e21ea..b2a9ed72e753885ea516bc58a13c42bb8f30babf 100644 (file)
@@ -29,7 +29,7 @@ void BUG_bad_PRIO_USER(void);
 int renice_main(int argc, char **argv);
 int renice_main(int argc, char **argv)
 {
 int renice_main(int argc, char **argv);
 int renice_main(int argc, char **argv)
 {
-       static const char Xetpriority_msg[] = "%cetpriority";
+       static const char Xetpriority_msg[] ALIGN1 = "%cetpriority";
 
        int retval = EXIT_SUCCESS;
        int which = PRIO_PROCESS;       /* Default 'which' value. */
 
        int retval = EXIT_SUCCESS;
        int which = PRIO_PROCESS;       /* Default 'which' value. */
@@ -67,8 +67,9 @@ int renice_main(int argc, char **argv)
        while ((arg = *++argv) != NULL) {
                /* Check for a mode switch. */
                if (arg[0] == '-' && arg[1]) {
        while ((arg = *++argv) != NULL) {
                /* Check for a mode switch. */
                if (arg[0] == '-' && arg[1]) {
-                       static const char opts[]
-                               = { 'p', 'g', 'u', 0, PRIO_PROCESS, PRIO_PGRP, PRIO_USER };
+                       static const char opts[] ALIGN1 = {
+                               'p', 'g', 'u', 0, PRIO_PROCESS, PRIO_PGRP, PRIO_USER
+                       };
                        const char *p = strchr(opts, arg[1]);
                        if (p) {
                                which = p[4];
                        const char *p = strchr(opts, arg[1]);
                        if (p) {
                                which = p[4];
index a0e9e16e5816c14e9e8f5698acc51afabd86cdc5..5100f57e7d8da807a5b80909eec7a6bf0d88dcc6 100644 (file)
@@ -27,24 +27,27 @@ static int sysctl_display_all(const char *path, int output, int show_table);
 /*
  *    Globals...
  */
 /*
  *    Globals...
  */
-static const char PROC_PATH[] = "/proc/sys/";
-static const char DEFAULT_PRELOAD[] = "/etc/sysctl.conf";
+static const char PROC_PATH[] ALIGN1 = "/proc/sys/";
+static const char DEFAULT_PRELOAD[] ALIGN1 = "/etc/sysctl.conf";
 
 /* error messages */
 
 /* error messages */
-static const char ERR_UNKNOWN_PARAMETER[] = "error: Unknown parameter '%s'\n";
-static const char ERR_MALFORMED_SETTING[] = "error: Malformed setting '%s'\n";
-static const char ERR_NO_EQUALS[] =
+static const char ERR_UNKNOWN_PARAMETER[] ALIGN1 =
+       "error: Unknown parameter '%s'\n";
+static const char ERR_MALFORMED_SETTING[] ALIGN1 =
+       "error: Malformed setting '%s'\n";
+static const char ERR_NO_EQUALS[] ALIGN1 =
        "error: '%s' must be of the form name=value\n";
        "error: '%s' must be of the form name=value\n";
-static const char ERR_INVALID_KEY[] = "error: '%s' is an unknown key\n";
-static const char ERR_UNKNOWN_WRITING[] =
+static const char ERR_INVALID_KEY[] ALIGN1 =
+       "error: '%s' is an unknown key\n";
+static const char ERR_UNKNOWN_WRITING[] ALIGN1 =
        "error: unknown error %d setting key '%s'\n";
        "error: unknown error %d setting key '%s'\n";
-static const char ERR_UNKNOWN_READING[] =
+static const char ERR_UNKNOWN_READING[] ALIGN1 =
        "error: unknown error %d reading key '%s'\n";
        "error: unknown error %d reading key '%s'\n";
-static const char ERR_PERMISSION_DENIED[] =
+static const char ERR_PERMISSION_DENIED[] ALIGN1 =
        "error: permission denied on key '%s'\n";
        "error: permission denied on key '%s'\n";
-static const char ERR_PRELOAD_FILE[] =
+static const char ERR_PRELOAD_FILE[] ALIGN1 =
        "error: cannot open preload file '%s'\n";
        "error: cannot open preload file '%s'\n";
-static const char WARN_BAD_LINE[] =
+static const char WARN_BAD_LINE[] ALIGN1 =
        "warning: %s(%d): invalid syntax, continuing...\n";
 
 
        "warning: %s(%d): invalid syntax, continuing...\n";
 
 
index d212ad40822e3e771adba8a1140245bdffb8b2ae..0d1771a365e624b1035f64e1e5b40cacead59c79 100755 (executable)
@@ -44,7 +44,7 @@ echo "\
  * Do not edit.
  *
  */
  * Do not edit.
  *
  */
-static const char * const bbconfig_config ="
+static const char *const bbconfig_config ="
 
 sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}'
 
 
 sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}'
 
index 74acb4cdd1811033e577a470337171c08fd47650..9b67deb49cfd2994de7c79e73ecae51eb8942312 100755 (executable)
@@ -6,7 +6,7 @@ try() {
     added="$1"
     shift
     $debug && echo "Trying: $* $added"
     added="$1"
     shift
     $debug && echo "Trying: $* $added"
-    "$@" $added >busybox.map 2>busybox_ld.err
+    "$@" $added 2>busybox_ld.err
 }
 
 # Sanitize lib list (dups, extra spaces etc)
 }
 
 # Sanitize lib list (dups, extra spaces etc)
@@ -22,14 +22,17 @@ try "-Wl,--start-group $l_list -Wl,--end-group" "$@" \
     cat busybox_ld.err
     exit 1
 }
     cat busybox_ld.err
     exit 1
 }
-# Hack: we are not supposed to know executable name,
-# but this hack cuts down link time
-mv busybox_unstripped busybox_unstripped.tmp
-mv busybox.map        busybox.map.tmp
+
+#### Hack disabled: conflicts with ld --verbose flag in last link phase
+
+##### Hack: we are not supposed to know executable name,
+##### but this hack cuts down link time
+####mv busybox_unstripped busybox_unstripped.tmp
+####mv busybox.map        busybox.map.tmp
 
 # Now try to remove each lib and build without it.
 # Stop when no lib can be removed.
 
 # Now try to remove each lib and build without it.
 # Stop when no lib can be removed.
-ever_discarded=false
+####ever_discarded=false
 while test "$BBOX_LIB_LIST"; do
     $debug && echo "Trying libraries: $BBOX_LIB_LIST"
     all_needed=true
 while test "$BBOX_LIB_LIST"; do
     $debug && echo "Trying libraries: $BBOX_LIB_LIST"
     all_needed=true
@@ -41,7 +44,7 @@ while test "$BBOX_LIB_LIST"; do
                echo "Library $one is not needed"
                BBOX_LIB_LIST="$without_one"
                all_needed=false
                echo "Library $one is not needed"
                BBOX_LIB_LIST="$without_one"
                all_needed=false
-               ever_discarded=true
+####           ever_discarded=true
        else
                echo "Library $one is needed"
        fi
        else
                echo "Library $one is needed"
        fi
@@ -54,13 +57,23 @@ while test "$BBOX_LIB_LIST"; do
     #{ echo "$BBOX_LIB_LIST" | grep -q ' '; } || break
 done
 
     #{ echo "$BBOX_LIB_LIST" | grep -q ' '; } || break
 done
 
-mv busybox_unstripped.tmp busybox_unstripped
-mv busybox.map.tmp        busybox.map
-$ever_discarded && {
+####mv busybox_unstripped.tmp busybox_unstripped
+####mv busybox.map.tmp        busybox.map
+####$ever_discarded && {
     # Make the binary with final, minimal list of libs
     echo "Final link with: $BBOX_LIB_LIST"
     l_list=`echo "$BBOX_LIB_LIST" | sed -e 's/ / -l/g' -e 's/^/-l/'`
     # Make the binary with final, minimal list of libs
     echo "Final link with: $BBOX_LIB_LIST"
     l_list=`echo "$BBOX_LIB_LIST" | sed -e 's/ / -l/g' -e 's/^/-l/'`
-    try "-Wl,--start-group $l_list -Wl,--end-group" "$@" || exit 1
-}
-rm busybox_ld.err
-exit 0  # Ensure "success" exit code
+    # --verbose gives us gobs of info to stdout (e.g. linker script used)
+    try "-Wl,--start-group $l_list -Wl,--end-group -Wl,--verbose" "$@" >busybox_ld.out ####|| exit 1
+    #
+    # Add SORT_BY_ALIGNMENT to linker script (found in busybox_ld.out):
+    #  .rodata         : { *(.rodata SORT_BY_ALIGNMENT(.rodata.*) .gnu.linkonce.r.*) }
+    #  *(.data SORT_BY_ALIGNMENT(.data.*) .gnu.linkonce.d.*)
+    #  *(.bss SORT_BY_ALIGNMENT(.bss.*) .gnu.linkonce.b.*)
+    # This will eliminate most of the data padding. Use linker script
+    # by commenting "try" above and uncommenting this one (tested on i386):
+    #try "-Wl,--start-group $l_list -Wl,--end-group -Wl,--verbose -Wl,-T -Wl,busybox_ldscript" "$@" >busybox_ld.out
+    #
+####}
+####rm busybox_ld.err
+####exit 0  # Ensure "success" exit code
index 6e98c4ab9fc8348f58d736f49caa533c5c0c5105..a9552281d5d1b2db049728daef39ad2406431e2f 100644 (file)
@@ -105,7 +105,7 @@ skip:
 }
 
 #if ENABLE_FEATURE_CHCON_LONG_OPTIONS
 }
 
 #if ENABLE_FEATURE_CHCON_LONG_OPTIONS
-static const char chcon_longopts[] =
+static const char chcon_longopts[] ALIGN1 =
        "recursive\0"      No_argument       "R"
        "changes\0"        No_argument       "c"
        "no-dereference\0" No_argument       "h"
        "recursive\0"      No_argument       "R"
        "changes\0"        No_argument       "c"
        "no-dereference\0" No_argument       "h"
index 5f9e3fd1233e14378ed2a765a5c5b4c17d6f0754..6c3f518fc49d0281404500aae0034693d70f5a6c 100644 (file)
@@ -69,7 +69,7 @@ static context_t runcon_compute_new_context(char *user, char *role, char *type,
 }
 
 #if ENABLE_FEATURE_RUNCON_LONG_OPTIONS
 }
 
 #if ENABLE_FEATURE_RUNCON_LONG_OPTIONS
-static const char runcon_options[] =
+static const char runcon_longopts[] ALIGN1 =
        "user\0"    Required_argument "u"
        "role\0"    Required_argument "r"
        "type\0"    Required_argument "t"
        "user\0"    Required_argument "u"
        "role\0"    Required_argument "r"
        "type\0"    Required_argument "t"
@@ -101,7 +101,7 @@ int runcon_main(int argc, char **argv)
        selinux_or_die();
 
 #if ENABLE_FEATURE_RUNCON_LONG_OPTIONS
        selinux_or_die();
 
 #if ENABLE_FEATURE_RUNCON_LONG_OPTIONS
-       applet_long_options = runcon_options;
+       applet_long_options = runcon_longopts;
 #endif
        opt_complementary = "-1";
        opts = getopt32(argc, argv, "r:t:u:l:ch", &role, &type, &user, &range);
 #endif
        opt_complementary = "-1";
        opts = getopt32(argc, argv, "r:t:u:l:ch", &role, &type, &user, &range);
index df77d60539a8f18ae3cf1e1ee37035828c0de00a..dcc8cbb5f49d935cc926cc99a1df08d6e9f80d31 100644 (file)
@@ -409,7 +409,7 @@ static int apply_spec(const char *file,
 
 static int canoncon(const char *path, unsigned lineno, char **contextp)
 {
 
 static int canoncon(const char *path, unsigned lineno, char **contextp)
 {
-       static const char err_msg[] = "%s: line %u has invalid context %s";
+       static const char err_msg[] ALIGN1 = "%s: line %u has invalid context %s";
 
        char *tmpcon;
        char *context = *contextp;
 
        char *tmpcon;
        char *context = *contextp;
index d34f5207f8d53537ca0fd7a3a9da8571a0e6e9b9..9aec8ee0a4a763a8201719821d37bca6aaa7e13d 100644 (file)
@@ -91,10 +91,10 @@ static const char *const optletters_optnames[] = {
        "a"   "allexport",
        "b"   "notify",
        "u"   "nounset",
        "a"   "allexport",
        "b"   "notify",
        "u"   "nounset",
-       "\0"  "vi",
+       "\0"  "vi"
 #if DEBUG
 #if DEBUG
-       "\0"  "nolog",
-       "\0"  "debug",
+       ,"\0"  "nolog"
+       ,"\0"  "debug"
 #endif
 };
 
 #endif
 };
 
@@ -103,7 +103,7 @@ static const char *const optletters_optnames[] = {
 
 enum { NOPTS = ARRAY_SIZE(optletters_optnames) };
 
 
 enum { NOPTS = ARRAY_SIZE(optletters_optnames) };
 
-static char optlist[NOPTS];
+static char optlist[NOPTS] ALIGN1;
 
 #define eflag optlist[0]
 #define fflag optlist[1]
 
 #define eflag optlist[0]
 #define fflag optlist[1]
@@ -127,12 +127,12 @@ static char optlist[NOPTS];
 
 /* ============ Misc data */
 
 
 /* ============ Misc data */
 
-static char nullstr[1];                /* zero length string */
-static const char homestr[] = "HOME";
-static const char snlfmt[] = "%s\n";
-static const char illnum[] = "Illegal number: %s";
+static char nullstr[1] ALIGN1;  /* zero length string */
+static const char homestr[] ALIGN1 = "HOME";
+static const char snlfmt[] ALIGN1 = "%s\n";
+static const char illnum[] ALIGN1 = "Illegal number: %s";
 
 
-static char *minusc;                   /* argument to -c option */
+static char *minusc;  /* argument to -c option */
 
 /* pid of main shell */
 static int rootpid;
 
 /* pid of main shell */
 static int rootpid;
@@ -447,7 +447,9 @@ out2str(const char *p)
 #define VSTRIMLEFTMAX   0x9             /* ${var##pattern} */
 #define VSLENGTH        0xa             /* ${#var} */
 
 #define VSTRIMLEFTMAX   0x9             /* ${var##pattern} */
 #define VSLENGTH        0xa             /* ${#var} */
 
-static const char dolatstr[] = { CTLVAR, VSNORMAL|VSQUOTE, '@', '=', '\0' };
+static const char dolatstr[] ALIGN1 = {
+       CTLVAR, VSNORMAL|VSQUOTE, '@', '=', '\0'
+};
 
 #define NCMD 0
 #define NPIPE 1
 
 #define NCMD 0
 #define NPIPE 1
@@ -1583,10 +1585,10 @@ static unsigned long rseed;
 #endif
 
 #ifdef IFS_BROKEN
 #endif
 
 #ifdef IFS_BROKEN
-static const char defifsvar[] = "IFS= \t\n";
+static const char defifsvar[] ALIGN1 = "IFS= \t\n";
 #define defifs (defifsvar + 4)
 #else
 #define defifs (defifsvar + 4)
 #else
-static const char defifs[] = " \t\n";
+static const char defifs[] ALIGN1 = " \t\n";
 #endif
 
 struct shparam {
 #endif
 
 struct shparam {
@@ -2548,16 +2550,16 @@ static const char S_I_T[][3] = {
 static int
 SIT(int c, int syntax)
 {
 static int
 SIT(int c, int syntax)
 {
-       static const char spec_symbls[] = "\t\n !\"$&'()*-/:;<=>?[\\]`|}~";
+       static const char spec_symbls[] ALIGN1 = "\t\n !\"$&'()*-/:;<=>?[\\]`|}~";
 #if ENABLE_ASH_ALIAS
 #if ENABLE_ASH_ALIAS
-       static const char syntax_index_table[] = {
+       static const char syntax_index_table[] ALIGN1 = {
                1, 2, 1, 3, 4, 5, 1, 6,         /* "\t\n !\"$&'" */
                7, 8, 3, 3, 3, 3, 1, 1,         /* "()*-/:;<" */
                3, 1, 3, 3, 9, 3, 10, 1,        /* "=>?[\\]`|" */
                11, 3                           /* "}~" */
        };
 #else
                1, 2, 1, 3, 4, 5, 1, 6,         /* "\t\n !\"$&'" */
                7, 8, 3, 3, 3, 3, 1, 1,         /* "()*-/:;<" */
                3, 1, 3, 3, 9, 3, 10, 1,        /* "=>?[\\]`|" */
                11, 3                           /* "}~" */
        };
 #else
-       static const char syntax_index_table[] = {
+       static const char syntax_index_table[] ALIGN1 = {
                0, 1, 0, 2, 3, 4, 0, 5,         /* "\t\n !\"$&'" */
                6, 7, 2, 2, 2, 2, 0, 0,         /* "()*-/:;<" */
                2, 0, 2, 2, 8, 2, 9, 0,         /* "=>?[\\]`|" */
                0, 1, 0, 2, 3, 4, 0, 5,         /* "\t\n !\"$&'" */
                6, 7, 2, 2, 2, 2, 0, 0,         /* "()*-/:;<" */
                2, 0, 2, 2, 8, 2, 9, 0,         /* "=>?[\\]`|" */
@@ -5003,7 +5005,7 @@ esclen(const char *start, const char *p)
 static char *
 _rmescapes(char *str, int flag)
 {
 static char *
 _rmescapes(char *str, int flag)
 {
-       static const char qchars[] = { CTLESC, CTLQUOTEMARK, '\0' };
+       static const char qchars[] ALIGN1 = { CTLESC, CTLQUOTEMARK, '\0' };
 
        char *p, *q, *r;
        unsigned inquotes;
 
        char *p, *q, *r;
        unsigned inquotes;
@@ -5420,7 +5422,7 @@ static char *evalvar(char *p, int flag);
 static void
 argstr(char *p, int flag)
 {
 static void
 argstr(char *p, int flag)
 {
-       static const char spclchars[] = {
+       static const char spclchars[] ALIGN1 = {
                '=',
                ':',
                CTLQUOTEMARK,
                '=',
                ':',
                CTLQUOTEMARK,
@@ -6266,7 +6268,7 @@ expsort(struct strlist *str)
 static void
 expandmeta(struct strlist *str, int flag)
 {
 static void
 expandmeta(struct strlist *str, int flag)
 {
-       static const char metachars[] = {
+       static const char metachars[] ALIGN1 = {
                '*', '?', '[', 0
        };
        /* TODO - EXP_REDIR */
                '*', '?', '[', 0
        };
        /* TODO - EXP_REDIR */
@@ -10200,7 +10202,7 @@ parsesub: {
        int typeloc;
        int flags;
        char *p;
        int typeloc;
        int flags;
        char *p;
-       static const char types[] = "}-+?=";
+       static const char types[] ALIGN1 = "}-+?=";
 
        c = pgetc();
        if (
 
        c = pgetc();
        if (
@@ -10496,13 +10498,15 @@ parsearith: {
 #define NEW_xxreadtoken
 #ifdef NEW_xxreadtoken
 /* singles must be first! */
 #define NEW_xxreadtoken
 #ifdef NEW_xxreadtoken
 /* singles must be first! */
-static const char xxreadtoken_chars[7] = { '\n', '(', ')', '&', '|', ';', 0 };
+static const char xxreadtoken_chars[7] ALIGN1 = {
+       '\n', '(', ')', '&', '|', ';', 0
+};
 
 
-static const char xxreadtoken_tokens[] = {
+static const char xxreadtoken_tokens[] ALIGN1 = {
        TNL, TLP, TRP,          /* only single occurrence allowed */
        TBACKGND, TPIPE, TSEMI, /* if single occurrence */
        TEOF,                   /* corresponds to trailing nul */
        TNL, TLP, TRP,          /* only single occurrence allowed */
        TBACKGND, TPIPE, TSEMI, /* if single occurrence */
        TEOF,                   /* corresponds to trailing nul */
-       TAND, TOR, TENDCASE,    /* if double occurrence */
+       TAND, TOR, TENDCASE     /* if double occurrence */
 };
 
 #define xxreadtoken_doubles \
 };
 
 #define xxreadtoken_doubles \
@@ -11379,7 +11383,7 @@ unsetcmd(int argc, char **argv)
 
 #include <sys/times.h>
 
 
 #include <sys/times.h>
 
-static const unsigned char timescmd_str[] = {
+static const unsigned char timescmd_str[] ALIGN1 = {
        ' ',  offsetof(struct tms, tms_utime),
        '\n', offsetof(struct tms, tms_stime),
        ' ',  offsetof(struct tms, tms_cutime),
        ' ',  offsetof(struct tms, tms_utime),
        '\n', offsetof(struct tms, tms_stime),
        ' ',  offsetof(struct tms, tms_cutime),
@@ -11659,9 +11663,9 @@ readcmd(int argc, char **argv)
 static int
 umaskcmd(int argc, char **argv)
 {
 static int
 umaskcmd(int argc, char **argv)
 {
-       static const char permuser[3] = "ugo";
-       static const char permmode[3] = "rwx";
-       static const short int permmask[] = {
+       static const char permuser[3] ALIGN1 = "ugo";
+       static const char permmode[3] ALIGN1 = "rwx";
+       static const short permmask[] ALIGN2 = {
                S_IRUSR, S_IWUSR, S_IXUSR,
                S_IRGRP, S_IWGRP, S_IXGRP,
                S_IROTH, S_IWOTH, S_IXOTH
                S_IRUSR, S_IWUSR, S_IXUSR,
                S_IRGRP, S_IWGRP, S_IXGRP,
                S_IROTH, S_IWOTH, S_IXOTH
@@ -12318,7 +12322,7 @@ arith_apply(operator op, v_n_t *numstack, v_n_t **numstackptr)
 }
 
 /* longest must be first */
 }
 
 /* longest must be first */
-static const char op_tokens[] = {
+static const char op_tokens[] ALIGN1 = {
        '<','<','=',0, TOK_LSHIFT_ASSIGN,
        '>','>','=',0, TOK_RSHIFT_ASSIGN,
        '<','<',    0, TOK_LSHIFT,
        '<','<','=',0, TOK_LSHIFT_ASSIGN,
        '>','>','=',0, TOK_RSHIFT_ASSIGN,
        '<','<',    0, TOK_LSHIFT,
index 275b69ef379e8aa6119e0d55cc802ef79deb3876..5796f1127799be886226bc37c84cf31d74cba5f4 100644 (file)
@@ -126,7 +126,8 @@ extern char **environ; /* This is in <unistd.h>, but protected with __USE_GNU */
 /* broken, of course, but OK for testing */
 static const char *indenter(int i)
 {
 /* broken, of course, but OK for testing */
 static const char *indenter(int i)
 {
-       static const char blanks[] = "                                    ";
+       static const char blanks[] ALIGN1 =
+               "                                    ";
        return &blanks[sizeof(blanks) - i - 1];
 }
 #define debug_printf_clean(...) fprintf(stderr, __VA_ARGS__)
        return &blanks[sizeof(blanks) - i - 1];
 }
 #define debug_printf_clean(...) fprintf(stderr, __VA_ARGS__)
@@ -3656,7 +3657,7 @@ static void setup_job_control(void)
 int hush_main(int argc, char **argv);
 int hush_main(int argc, char **argv)
 {
 int hush_main(int argc, char **argv);
 int hush_main(int argc, char **argv)
 {
-       static const char version_str[] = "HUSH_VERSION="HUSH_VER_STR;
+       static const char version_str[] ALIGN1 = "HUSH_VERSION="HUSH_VER_STR;
        static const struct variable const_shell_ver = {
                .next = NULL,
                .varstr = (char*)version_str,
        static const struct variable const_shell_ver = {
                .next = NULL,
                .varstr = (char*)version_str,
index e5c7ef670a6b58c6b0552ab74adc213bd1b56d9b..c28a1034a2603ce3735c26647c9294f0be6da715 100644 (file)
@@ -711,7 +711,7 @@ static char * strsep_space(char *string, int * ix)
 
 static int expand_arguments(char *command)
 {
 
 static int expand_arguments(char *command)
 {
-       static const char out_of_space[] = "out of space during expansion";
+       static const char out_of_space[] ALIGN1 = "out of space during expansion";
 
        int total_length = 0, length, i, retval, ix = 0;
        expand_t expand_result;
 
        int total_length = 0, length, i, retval, ix = 0;
        expand_t expand_result;
index effdc0107ec08991122a01ab31036c37f9d742cb..f1b3f05254f8cbc2decc19408052be463a27b2c7 100644 (file)
@@ -280,7 +280,7 @@ struct brkcon {
  * -x: trace
  * -u: unset variables net diagnostic
  */
  * -x: trace
  * -u: unset variables net diagnostic
  */
-static char flags['z' - 'a' + 1];
+static char flags['z' - 'a' + 1] ALIGN1;
 /* this looks weird, but is OK ... we index FLAG with 'a'...'z' */
 #define FLAG (flags - 'a')
 
 /* this looks weird, but is OK ... we index FLAG with 'a'...'z' */
 #define FLAG (flags - 'a')
 
@@ -577,7 +577,7 @@ struct here {
        struct here *h_next;
 };
 
        struct here *h_next;
 };
 
-static const char * const signame[] = {
+static const char *const signame[] = {
        "Signal 0",
        "Hangup",
        NULL,  /* interrupt */
        "Signal 0",
        "Hangup",
        NULL,  /* interrupt */
@@ -593,11 +593,10 @@ static const char * const signame[] = {
        "SIGUSR2",
        NULL,  /* broken pipe */
        "Alarm clock",
        "SIGUSR2",
        NULL,  /* broken pipe */
        "Alarm clock",
-       "Terminated",
+       "Terminated"
 };
 
 
 };
 
 
-
 struct res {
        const char *r_name;
        int r_val;
 struct res {
        const char *r_name;
        int r_val;
@@ -4209,7 +4208,7 @@ static char *unquote(char *as)
 #define        NDENT   ((BLKSIZ+sizeof(struct dirent)-1)/sizeof(struct dirent))
 
 static struct wdblock *cl, *nl;
 #define        NDENT   ((BLKSIZ+sizeof(struct dirent)-1)/sizeof(struct dirent))
 
 static struct wdblock *cl, *nl;
-static char spcl[] = "[?*";
+static const char spcl[] ALIGN1= "[?*";
 
 static struct wdblock *glob(char *cp, struct wdblock *wb)
 {
 
 static struct wdblock *glob(char *cp, struct wdblock *wb)
 {
index 0a8dbe94c837abca98d47772e003056c1418f156..2933db472ab4d250be92e8d4effcafb22b661c65 100644 (file)
@@ -48,12 +48,12 @@ struct hd_geometry {
 
 #define HDIO_GETGEO     0x0301  /* get device geometry */
 
 
 #define HDIO_GETGEO     0x0301  /* get device geometry */
 
-static const char msg_building_new_label[] =
+static const char msg_building_new_label[] ALIGN1 =
 "Building a new %s. Changes will remain in memory only,\n"
 "until you decide to write them. After that the previous content\n"
 "won't be recoverable.\n\n";
 
 "Building a new %s. Changes will remain in memory only,\n"
 "until you decide to write them. After that the previous content\n"
 "won't be recoverable.\n\n";
 
-static const char msg_part_already_defined[] =
+static const char msg_part_already_defined[] ALIGN1 =
 "Partition %d is already defined, delete it before re-adding\n";
 
 
 "Partition %d is already defined, delete it before re-adding\n";
 
 
@@ -82,11 +82,11 @@ struct partition {
        unsigned char size4[4];         /* nr of sectors in partition */
 } ATTRIBUTE_PACKED;
 
        unsigned char size4[4];         /* nr of sectors in partition */
 } ATTRIBUTE_PACKED;
 
-static const char unable_to_open[] = "cannot open %s";
-static const char unable_to_read[] = "cannot read from %s";
-static const char unable_to_seek[] = "cannot seek on %s";
-static const char unable_to_write[] = "cannot write to %s";
-static const char ioctl_error[] = "BLKGETSIZE ioctl failed on %s";
+static const char unable_to_open[] ALIGN1 = "cannot open %s";
+static const char unable_to_read[] ALIGN1 = "cannot read from %s";
+static const char unable_to_seek[] ALIGN1 = "cannot seek on %s";
+static const char unable_to_write[] ALIGN1 = "cannot write to %s";
+static const char ioctl_error[] ALIGN1 = "BLKGETSIZE ioctl failed on %s";
 static void fdisk_fatal(const char *why) ATTRIBUTE_NORETURN;
 
 enum label_type {
 static void fdisk_fatal(const char *why) ATTRIBUTE_NORETURN;
 
 enum label_type {
index 9f0dc7fd3123a59cb4578674659f1e2b7df182a1..f6486d5f94606e422c3329a8c4c85decf4f45c3e 100644 (file)
@@ -149,7 +149,7 @@ struct xbsd_disklabel {
 #define BSD_DSTYPE_DOSPART(s)   ((s) & 3)       /* dos partition number */
 #define BSD_DSTYPE_GEOMETRY     0x10            /* drive params in label */
 
 #define BSD_DSTYPE_DOSPART(s)   ((s) & 3)       /* dos partition number */
 #define BSD_DSTYPE_GEOMETRY     0x10            /* drive params in label */
 
-static const char * const xbsd_dktypenames[] = {
+static const char *const xbsd_dktypenames[] = {
        "unknown",
        "SMD",
        "MSCP",
        "unknown",
        "SMD",
        "MSCP",
index 41299d2c3a5dfa91dd58d82d526521beca2b9074..2460170366930456c09376a86c71362572ced621 100644 (file)
@@ -266,7 +266,7 @@ static void set_shell(const char *new_shell)
  */
 
 #if ENABLE_GETOPT_LONG
  */
 
 #if ENABLE_GETOPT_LONG
-static const char getopt_longopts[] =
+static const char getopt_longopts[] ALIGN1 =
        "options\0"      Required_argument "o"
        "longoptions\0"  Required_argument "l"
        "quiet\0"        No_argument       "q"
        "options\0"      Required_argument "o"
        "longoptions\0"  Required_argument "l"
        "quiet\0"        No_argument       "q"
index 213f6071b69c281ce3c9453616584774cd58dd12..e294f19da4283b4d26765614556863a489fe4063 100644 (file)
@@ -35,7 +35,7 @@ static void bb_dump_addfile(char *name)
        fclose(fp);
 }
 
        fclose(fp);
 }
 
-static const char * const add_strings[] = {
+static const char *const add_strings[] = {
        "\"%07.7_ax \" 16/1 \"%03o \" \"\\n\"",         /* b */
        "\"%07.7_ax \" 16/1 \"%3_c \" \"\\n\"",         /* c */
        "\"%07.7_ax \" 8/2 \"  %05u \" \"\\n\"",        /* d */
        "\"%07.7_ax \" 16/1 \"%03o \" \"\\n\"",         /* b */
        "\"%07.7_ax \" 16/1 \"%3_c \" \"\\n\"",         /* c */
        "\"%07.7_ax \" 8/2 \"  %05u \" \"\\n\"",        /* d */
@@ -43,9 +43,9 @@ static const char * const add_strings[] = {
        "\"%07.7_ax \" 8/2 \"   %04x \" \"\\n\"",       /* x */
 };
 
        "\"%07.7_ax \" 8/2 \"   %04x \" \"\\n\"",       /* x */
 };
 
-static const char add_first[] = "\"%07.7_Ax\n\"";
+static const char add_first[] ALIGN1 = "\"%07.7_Ax\n\"";
 
 
-static const char hexdump_opts[] = "bcdoxCe:f:n:s:v";
+static const char hexdump_opts[] ALIGN1 = "bcdoxCe:f:n:s:v";
 
 static const struct suffix_mult suffixes[] = {
        { "b", 512 },
 
 static const struct suffix_mult suffixes[] = {
        { "b", 512 },
index ede95ecaa2d8eb7fb6552bc9f94f7d235bcaa594..867721482848de8b931c31b0a8f1fd95f171b84b 100644 (file)
@@ -178,7 +178,7 @@ int hwclock_main(int argc, char **argv)
        int utc;
 
 #if ENABLE_FEATURE_HWCLOCK_LONG_OPTIONS
        int utc;
 
 #if ENABLE_FEATURE_HWCLOCK_LONG_OPTIONS
-       static const char hwclock_longopts[] =
+       static const char hwclock_longopts[] ALIGN1 =
                "localtime\0" No_argument "l"
                "utc\0"       No_argument "u"
                "show\0"      No_argument "r"
                "localtime\0" No_argument "l"
                "utc\0"       No_argument "u"
                "show\0"      No_argument "r"
index 17e5e88c63fa71095a9863b6e4c5cd4cc42c853d..33dc5d38f627b4da4c87952f404cc99e3fdc7656 100644 (file)
@@ -233,7 +233,7 @@ static int dirAction(const char *fileName, struct stat *statbuf,
  * - userspace writes "0" (worked) or "-1" (failed) to /sys/$DEVPATH/loading
  * - kernel loads firmware into device
  */
  * - userspace writes "0" (worked) or "-1" (failed) to /sys/$DEVPATH/loading
  * - kernel loads firmware into device
  */
-static inline void load_firmware(const char * const firmware, const char * const sysfs_path)
+static void load_firmware(const char *const firmware, const char *const sysfs_path)
 {
        int cnt;
        int firmware_fd, loading_fd, data_fd;
 {
        int cnt;
        int firmware_fd, loading_fd, data_fd;
index a7b0a98f0298923f9c856c273ffb5bdd24e987ce..c159f41e18522256c01dcb7649d6e980c10f6b48 100644 (file)
@@ -888,7 +888,7 @@ static int nfsmount(struct mntent *mp, int vfsflags, char *filteropts)
        if (filteropts) for (opt = strtok(filteropts, ","); opt; opt = strtok(NULL, ",")) {
                char *opteq = strchr(opt, '=');
                if (opteq) {
        if (filteropts) for (opt = strtok(filteropts, ","); opt; opt = strtok(NULL, ",")) {
                char *opteq = strchr(opt, '=');
                if (opteq) {
-                       static const char options[] =
+                       static const char options[] ALIGN1 =
                                /* 0 */ "rsize\0"
                                /* 1 */ "wsize\0"
                                /* 2 */ "timeo\0"
                                /* 0 */ "rsize\0"
                                /* 1 */ "wsize\0"
                                /* 2 */ "timeo\0"
@@ -991,7 +991,7 @@ static int nfsmount(struct mntent *mp, int vfsflags, char *filteropts)
                        }
                }
                else {
                        }
                }
                else {
-                       static const char options[] =
+                       static const char options[] ALIGN1 =
                                "bg\0"
                                "fg\0"
                                "soft\0"
                                "bg\0"
                                "fg\0"
                                "soft\0"
@@ -1524,7 +1524,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
 // Parse options, if necessary parse fstab/mtab, and call singlemount for
 // each directory to be mounted.
 
 // Parse options, if necessary parse fstab/mtab, and call singlemount for
 // each directory to be mounted.
 
-static const char must_be_root[] = "you must be root";
+static const char must_be_root[] ALIGN1 = "you must be root";
 
 int mount_main(int argc, char **argv);
 int mount_main(int argc, char **argv)
 
 int mount_main(int argc, char **argv);
 int mount_main(int argc, char **argv)
index 02afedcf01edc18c597c92cac1b47ce8741af559..347621c19051a50048bce14bb0932137a33a33ad 100644 (file)
@@ -38,8 +38,8 @@
 #define S_LEN 128
 
 /* These are the defaults */
 #define S_LEN 128
 
 /* These are the defaults */
-static const char defaultmap[] = "/boot/System.map";
-static const char defaultpro[] = "/proc/profile";
+static const char defaultmap[] ALIGN1 = "/boot/System.map";
+static const char defaultpro[] ALIGN1 = "/proc/profile";
 
 int readprofile_main(int argc, char **argv);
 int readprofile_main(int argc, char **argv)
 
 int readprofile_main(int argc, char **argv);
 int readprofile_main(int argc, char **argv)