Re: identifying useless sanitized header files

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

 



On Sun, 8 Apr 2007, Adrian Bunk wrote:

> On Sun, Apr 08, 2007 at 04:56:07PM -0400, Robert P. J. Day wrote:

> >   (in fact, if you take a quick look at all of the
> > include/asm-*/auxvec.h headers, most of them are empty.  what's
> > the point?)

> The point is that an "#include <linuc/auxvec.h>" compiles.

i've been thinking about this, and this approach just grates on me,
but i don't have an immediate solution for it.

as it stands, there's a generic, arch-independent header file
linux/auxvec.h.  ok, that's reasonable.  so anyone who needs auxvec.h
content does:

  #include <linux/auxvec.h>

but there are *some* architectures (as i read them, only 5 out of 23)
which need additional content in their auxvec.h files.  and to solve
that, linux/auxvec.h is augmented to include asm/auxvec.h, which means
that every *other* architecture (the remaining 18 out of 23) is now
required to implement an empty auxvec.h header file, for the sake of a
correct compilation.

that strikes me as an absurd approach for two reasons:

1) it doesn't scale well.  in the extreme case, you might someday have
a single architecture that requires something in the way of extra
content in a header file, at which point you'll have to add n-1 dummy
header files to all of the other architectures.

2) more importantly, the definition of an architecture's header files
is being dictated by a *totally different architecture*.  that's just
grotesque.

there *has* to be a cleaner solution.  what the above is doing is just
ugly.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux