portability touch-up (and ~15k size-savings)

Bernhard Fischer rep.nop at aon.at
Thu May 25 20:22:12 UTC 2006


On Thu, May 25, 2006 at 10:13:33PM +0200, Bernhard Fischer wrote:
>On Thu, May 25, 2006 at 03:40:33PM -0400, Rich Felker wrote:
>>On Thu, May 25, 2006 at 06:26:35PM +0200, Bernhard Fischer wrote:
>>> Hi,
>>> 
>>> I have introduced one central knob to turn off long options..
>>> 
>>>    text	   data	    bss	    dec	    hex	filename
>>>  881507	  11420	 646244	1539171	 177c63	busybox_old
>>>  866387	  11196	 645732	1523315	 173e73	busybox.no_getopt_long
>>> 
>>> This patch is part of my ongoing effort to make busybox a little more
>>> portable (resp. less linux-centric).
>>> Unfortunately the portability diff is getting relatively big
>>> (69962 bytes)..
>>
>>:)))))

Just for the jazz..
$ bzcat bb.portability.09c.diff.bz2 | diffstat
 Config.in                                 |   13 ++
 Makefile                                  |   34 ++++-
 Rules.mak                                 |  171 ++++++++++++++++++++----------
 TODO                                      |    3 
 archival/Config.in                        |    2 
 archival/libunarchive/decompress_unlzma.c |    2 
 archival/libunarchive/rangecoder.h        |   43 +------
 archival/tar.c                            |    4 
 console-tools/Config.in                   |    7 +
 console-tools/setconsole.c                |    4 
 coreutils/Config.in                       |   30 +++++
 coreutils/date.c                          |    2 
 coreutils/df.c                            |    3 
 coreutils/dos2unix.c                      |    1 
 coreutils/env.c                           |    5 
 coreutils/install.c                       |    4 
 coreutils/md5_sha1_sum.c                  |    1 
 coreutils/mkdir.c                         |    4 
 coreutils/mv.c                            |    4 
 coreutils/stat.c                          |    1 
 debianutils/Config.in                     |   14 ++
 debianutils/run_parts.c                   |   50 ++------
 debianutils/start_stop_daemon.c           |    5 
 e2fsprogs/e2fsck.h                        |    2 
 e2fsprogs/mke2fs.c                        |    2 
 include/busybox.h                         |   11 -
 include/grp_.h                            |    1 
 include/inet_common.h                     |    1 
 include/libbb.h                           |   12 +-
 include/platform.h                        |  105 +++++++++++++++++-
 include/pwd_.h                            |    1 
 init/halt.c                               |   14 ++
 init/init_shared.c                        |    3 
 libbb/Makefile.in                         |    5 
 libbb/find_mount_point.c                  |    2 
 libbb/getopt_ulflags.c                    |   11 +
 libbb/md5.c                               |    1 
 libbb/messages.c                          |   14 ++
 libbb/mtab.c                              |    3 
 libbb/sha1.c                              |    1 
 libpwdgrp/pwd_grp.c                       |    1 
 libpwdgrp/pwd_grp_internal.c              |    1 
 loginutils/getty.c                        |    6 -
 loginutils/login.c                        |   10 -
 miscutils/Config.in                       |    2 
 miscutils/adjtimex.c                      |   14 ++
 miscutils/eject.c                         |    3 
 miscutils/hdparm.c                        |    1 
 miscutils/last.c                          |    8 +
 networking/Config.in                      |   14 ++
 networking/ftpgetput.c                    |    4 
 networking/ipcalc.c                       |    2 
 networking/libiproute/ipaddress.c         |    3 
 networking/libiproute/iplink.c            |    4 
 networking/libiproute/iproute.c           |    2 
 networking/libiproute/iptunnel.c          |    2 
 networking/libiproute/ll_addr.c           |    2 
 networking/libiproute/ll_proto.c          |    1 
 networking/libiproute/ll_types.c          |    1 
 networking/libiproute/rt_names.c          |    2 
 networking/libiproute/rt_names.h          |    2 
 networking/libiproute/rtm_map.c           |    1 
 networking/nslookup.c                     |    1 
 scripts/bb_mkdep.c                        |   22 +++
 scripts/config/bool.h                     |   23 ++++
 scripts/config/confdata.c                 |   10 +
 scripts/config/expr.h                     |   10 +
 scripts/config/lkc.h                      |   15 ++
 scripts/config/zconf.tab.c_shipped        |    8 +
 scripts/config/zconf.y                    |    8 +
 scripts/usage_compressed                  |    5 
 shell/ash.c                               |    1 
 shell/msh.c                               |    2 
 util-linux/Config.in                      |    4 
 util-linux/fbset.c                        |    1 
 util-linux/fdisk.c                        |    2 
 util-linux/fsck_minix.c                   |    3 
 util-linux/hwclock.c                      |    4 
 util-linux/mkfs_minix.c                   |    4 
 util-linux/mount.c                        |    3 
 util-linux/swaponoff.c                    |    3 
 util-linux/umount.c                       |    3 
 82 files changed, 595 insertions(+), 219 deletions(-)

Needs splitting, i know. I'll try to do it in smallish steps. Bad idea
to do too much in one tree, even if it is due to the same goal :-/
Still it's only 3 or 4 related patches and not too interwoven, so
shouldn't cause too much pain to separate. Anyway.



More information about the busybox mailing list