portability touch-up (and ~15k size-savings)
Rich Felker
dalias at aerifal.cx
Thu May 25 19:40:33 UTC 2006
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)..
:)))))
I like this direction. Is your combined portability diff based on lots
of the patches I've sent, or other things you've found?
BTW about getopt_long... it might be worth dropping getopt entirely
and making a lightweight libbb function for handling options (both
short and long). The bloated GNU permutation thing is only needed if
the calling app wants to use the standard getopt loop idiom for
command line parsing; without that requirement the code could probably
be much smaller and still duplicate the commandline semantics.
Rich
More information about the busybox
mailing list