awkward placement of some BB header files

Rob Landley rob at landley.net
Thu May 18 20:54:39 UTC 2006


On Wednesday 17 May 2006 3:06 pm, Robert P. J. Day wrote:
>   i'm just a touch frustrated with the location of some of the header
> files in busybox.  as a concrete example (one of several), let me pick
> on inet_common.h.
>
>   currently, it's located in the top-level include/ directory, as if
> it has a great deal of significance to various parts of BB.  but it
> doesn't.  it's included by files in exactly two directories: libbb/
> and networking/.  and the corresponding source file,
> libbb/inet_common.c, contains all of four functions, all related to
> resolver routines.
>
>   this suggests that, first of all, the source file should more
> properly be called something like "libbb/resolve.c" or something like
> that since there's nothing "common" about its contents.  in addition,
> because that source file is part of libbb, then the function
> prototypes belong properly in "libbb.h", just like everything else in
> libbb.  despite the fact that the stuff in inet_common.c is related to
> networking, if it's part of libbb, it should be treated no differently
> from the rest of libbb.

Sounds like a good cleanup.

If you can figure out how to get svn to move files without deleting their 
#*%&(# change history (which is something it's _advertised_ as being able to 
do_), I'd be very very happy and would try to figure out how to email you 
baked goods.

>   the same argument can be made for top-level include files like
> pwd_.h, shadow_.h,

Those two are going away in my passwd.c rewrite, but I just didn't get it 
finished this cycle and it's too intrusive to go in this close to the freeze 
even if I had the time, which I don't.  But those are doomed.

> unarchive.h, etc.  they *properly* belong in their 
> respective related directories and, if someone needs to include them,
> that should be done through a pre-processor include path, rather than
> arbitrarily tossing those include files up to the top level include
> directory for no compelling reason.
>
>   thoughts?

Cleanups yay.

> rday

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list