[BusyBox] wget arbitrary header suppor

Larry Doolittle ldoolitt at recycle.lbl.gov
Tue May 15 14:43:41 UTC 2001


> > The style guide says "Do not use the getopt_long library function".
> > The only other applets that violate this rule are tar and getopt.
> 
> The problem here is that the real wget uses --header for this,
> so to be command line commpatible we have to as well.  [ chop ]
> Which is the lesser evil?   I'm still undecided...

Give a short-option alternative (-h in this case, I guess), and
make the long-option implementation, with its compatibility benefit,
conditional on BB_FEATURE_USE_LONG_GETOPT_AS_NEEDED_FOR_COMPATIBILITY.

busybox.h could even do some of the conditional work for you with
#ifndef BB_FEATURE_USE_LONG_GETOPT_AS_NEEDED_FOR_COMPATIBILITY
#define getopt_long(a,b,c,d,e) getopt(a,b,c)
#endif

      - Larry





More information about the busybox mailing list