Re: problem with swap.h

mummert&partner_meskesm@WestLB.de
Mon, 28 Sep 1998 15:33:35 +0100


>On Mon, 28 Sep 1998 mummert&partner_meskesm@WestLB.de wrote:
>
>> It seems to me that there is a problem with swap.h in the latest
>> development source trees. My watchdog source includes it (via
sys/swap.h)
>> and then moans about the missing definition of PAGE_SIZE. Shouldn't
swap.h
>> include this?
>
>Why? Page size is an architecture dependant thing, swap.h is
>not arch-dependant and, as such, shouldn't include things like
>page size or MMU innards.
Okay that makes sense. But how about sys/swap.h then. Okay, this isnīt
exactly a kernel problem, but a libc one then.
>> I would like to not include something like asm/page.h from my
>> application as I think kernel headers shouldn't be included directly
>> by applications.
>
>Then why do you include swap.h? It's at least as much a
>kernel header as <asm/page.h> and arguably even more so
>(since page.h provides info on the machine you're using
>while swap.h provides info on kernel stuff).
I do not include swap.h from the kernel source tree, but sys/swap.h. This
includes the kernel swap.h. It is my understanding that applications
shouldn't directly include the kernel headers but get there info through
the libc header file. Isn't that the way it is supposed to be?
Michael
--
Dr. Michael Meskes      | Th.-Heuss-Str. 61, D-41812 Erkelenz | Go SF49ers!
Senior-Consultant       | business: Michael.Meskes@mummert.de | Go Rhein
Fire!
Mummert+Partner         | private: Michael.Meskes@usa.net     | Use Debian
Unternehmensberatung AG |          Michael.Meskes@gmx.net     | GNU/Linux!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/