[PATCH] remove "#if 0" directives from coreutils/ dir

Rob Landley rob at landley.net
Mon Mar 27 09:00:59 PST 2006


On Sunday 26 March 2006 7:25 pm, Manuel Novoa III wrote:
> On Sat, Mar 25, 2006 at 05:31:25PM -0500, Robert P. J. Day wrote:
> > diff -pru busybox.orig/coreutils/cmp.c busybox/coreutils/cmp.c
> > --- busybox.orig/coreutils/cmp.c	2006-03-25 17:07:07.000000000 -0500
> > +++ busybox/coreutils/cmp.c	2006-03-25 17:29:47.000000000 -0500
> > @@ -52,12 +52,7 @@ static FILE *cmp_xfopen_input(const char
> >
> >  static const char fmt_eof[] = "cmp: EOF on %s\n";
> >  static const char fmt_differ[] = "%s %s differ: char %d, line %d\n";
> > -#if 0
> > -static const char fmt_l_opt[] = "%.0s%.0s%d %o %o\n";	/* SUSv3 format */
> > -#else
> >  static const char fmt_l_opt[] = "%.0s%.0s%d %3o %3o\n";	/* nicer gnu
> > format */ -#endif
> > -
> >  static const char opt_chars[] = "sl";
> >
> >  enum {
> >
> >
> > Signed off by:  Robert P. J. Day <rpjday at mindspring.com>
>
> The above documents a gnu vs SUSv3 behavioral difference and makes
> it easy to switch if we ever decided we wanted SUSv3 behavior.  So
> I really don't consider it dead code.
>
> Manuel

Good point.

For now I'm going to turn it into a comment, but we might want to revisit this 
as part of the portability work.  (For example, platform.h might want to set 
some kind of CONFIG_NO_GNUISMS or some such, although that potentially has 
two meanings.  Busybox isn't to use any from the environment, or busybox 
isn't to provide any...)

Rob
-- 
Never bet against the cheap plastic solution.


More information about the busybox mailing list