svn 15196 and 15197...

Rob Landley rob at landley.net
Sat May 27 21:52:51 UTC 2006


I'd like to propose a general rule.  If Linux doesn't need a header, please 
put it in either platform.h, libbb.h, or busybox.h.  Don't add it to 
individual applets, because I occasionally go through and _remove_ all the 
headers that aren't needed to build allyesconfig on any platform I test (I.E. 
Linux).  I will _happily_ break support for a Cray 1 if it makes the code 
simpler and nobody ever documented why that was there in the first place.

In fact, I'm going to start moving header files one by one into libbb.h, 
starting with the currently added one (sys/time.h).  Playing whack-a-mole 
with this sort of thing gives me hives, and in theory ccache can do good 
things with a "one big include" approach.  I'm doing it one at a time so that 
if anything stops building for somebody (because they have a local function 
called time() or some such), we have a reasonable chance of finding it.

As for the two specific checkins in the subjectL

svn 15196 belongs in platform.h.  Please don't pollute the main C code with 
#ifdefs for non-linux platforms.  I'll move it myself.  (Might have been nice 
if you added a comment mentioning _which_ non-linux platform this was for, 
but the code itself is generic enough...)

svn 15197 belongs in platform.h.  #define them as 0 if necessary, but putting 
#ifdefs in a local variable initialization list is too ugly for words.

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list