except that we still have to work when there is no mtab.
Oh, and while we're at it, take advantage of the fact that modern processors
avoid branches via conditional assignment where possible. ("x = a ? b : c;"
turns into "x = c; if (a) x = b;" because that way there's no branch to
potentially mispredict and thus never a bubble in the pipeline. The if(a)
turns into an assembly test followed by a conditional assignment (rather
than a conditional jump).) So since the compiler is going to do that _anyway_,
we might as well take advantage of it to produce a slightly smaller binary.
So there.
few new (unfinished) config options, which I intend to make hidden (but
enabled) when CONFIG_NITPICK is disabled. Getting the .config infrastructure
to do that is non-obvious, it seems...
teach scripts/individual new tricks. And while I'm at it, teach
scripts/individual other new tricks. Now builds 198 applets, some of which
I should teach it to hardlink together because they're really the same app...
http://busybox.net/lists/busybox/2005-September/015766.html
I renamed it "individual" to not confuse it with the standalone shell. (Which
it isn't compatible with for obvious reasons.) Configure busybox (I did
make defconfig), then run scripts/individual and it'll build an individual
version of each applet in the "build" subdirectory.
Currently it builds 146 and fails to build 104 applets out of "make defconfig".
I haven't taught it about multi-file applets yet (like tar), or the ones where
two applets get built from the same source (for example, zcat is a trivial
variant of gunzip so there is no zcat.c). But here's a start.
O_CREAT. Two users are still doing it (and thus getting permissions 777),
I'm not sure what permissions they should be using but here they are
changed to xopen3(). This costs us a dozen or so bytes, but removing the
777 from xopen() should get some of that back.
were using "1" as one of the arguments anyway, and as for the rest a multiply
and a push isn't noticeably bigger than pushing two arguments on the stack.
a failed mount. And while I'm at it, legacy mdev removal was only being done
in the _failure_ case? That can't be right. Plus minor header cleanups
and an option parsing tweak.
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
2) The check_cc macros should probably all have the same number of arguments.
3) Move the -Werror into the gcc 4.0 on i386 test, because gcc 4.1 is broken
and produces warnings for things that provably aren't incorrect.
In other news it would be nice if our check_ld macro actually did something,
and why does or makefile do all the check_cc calls, then call itself as if
it's building out of tree, then do all the check_cc calls again?
Make autodocifier suck less. It still doesn't handle nested USE( USE() ) case
(the inner USE() winds up in the output), but making it recursive involves
getting perl to accept a "for" loop and it's telling me that "break" is an
unrecognized bareword and I hate perl. This is at least an improvement.