bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: --enable-tiny option


From: Robert Millan
Subject: Re: --enable-tiny option
Date: Fri, 31 Oct 2003 18:05:41 +0100
User-agent: Mutt/1.5.4i

On Fri, Oct 31, 2003 at 08:48:51AM +0100, Jim Meyering wrote:
> 
> Are the existing packages somehow inadequate?
> I've heard of busybox.

Actualy, I came to you after spending a while hacking on busybox sources.

I was trying to port them to GNU/{Hurd,KFreeBSD,anything} and when I was
almost finishing I eventualy gave up really tired of it.

In short, busybox is one of the most unportable programs I ever seen. It's
dessigned with unportability in mind with its tendency of using Linux
interfaces directly instead of standard Glibc/POSIX ones. It makes liberal
use of syscall(), sysconf() and other unportable stuff just for the sake of
saving executable file space.

And most of the code is actualy borrowed from coreutils. Busybox is basicaly
a ripped-down version of coreutils with lots of Linux-specific hacks that make
it more tiny. Its purpose is to work on Linux-based systems only, and I don't
want to bring it into a different direction.

> I fear that any such effort would induce significant
> additions of `#if' directives or -- worse -- duplicate code.
> I don't want changes that make the code less readable/maintainable.

I don't think the #if directives would add much clutter. I don't know coreutils
sources myself, but I believe that most of the code in them are GNU extensions.
(could you give a more accurate estimation on that?)

If my assumption is correct, the #if directive addition would mostly look like:

#ifndef TINY
[ bulk of code for extra features ]
#endif
[ code for common code to comply with POSIX ]

> But I'll try to keep an open mind :-)

Thanks. :)

-- 
Robert Millan

"[..] but the delight and pride of Aule is in the deed of making, and in the
thing made, and neither in possession nor in his own mastery; wherefore he
gives and hoards not, and is free from care, passing ever on to some new work."

 -- J.R.R.T, Ainulindale (Silmarillion)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]