Mailing List Archive

Include file problems
Still no responses... (even telling me to go away.)
2.2.0-pre[1-9] breaks libc-5.4.46 compiles
When compiling the kernel...
mm.h includes sched.h
sched.h includes binfmts.h
binfmts.h includes fs.h
#if defined __KERNEL__
fs.h includes affs_fs_i.h
affs_fs_i.h includes time.h
time.h defines struct timeval
and...
sched.h includes timex.h /* Starting with 2.2.0-pre1 */
timex.h uses struct timeval /* OK because in the kernel */
/* time.h was included */
so everything is fine...
When compiling libc-5.4.46...
__fpathconf.c includes sched.h
sched.h includes binfmts.h
binfmts.h includes fs.h
and...
sched.h includes timex.h /* Starting with 2.2.0-pre1 */
timex.h uses struct timeval /* Not OK because in libc */
/* time.h is not included */
Basically timex.h will not compile unless time.h has already
been included.
Should the kernel headers be idempotent?
i.e. should I be able to write
========================= xxq.c begin
#include <linux/some-arbitrary-header.h>
========================= xxq.c end
and compile it?
Hal Duston
hald@sound.net
-
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/
Re: Include file problems [ In reply to ]
From: Duston Hal <tmp00009@kcpl.com>
Still no responses... (even telling me to go away.)
2.2.0-pre[1-9] breaks libc-5.4.46 compiles
It is a well-known topic.
Including kernel includes is Evil, a Bad Thing.
Why?
Because we all hope our code will not continue changing
as frequently as the kernel.
Now libc5 does use kernel includes. This means that any
given libc5 version can only work correctly with a certain
range of kernels. If you want to use libc5 then you must
use kernel includes that work together with libc5.
Note that the kernel you actually run may well be different
from the kernel of which you use the include files.
-
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/
RE: Include file problems [ In reply to ]
> From: dwguest@win.tue.nl
> > From: Duston Hal <tmp00009@kcpl.com>
> >
> > Still no responses... (even telling me to go away.)
> >
> > 2.2.0-pre[1-9] breaks libc-5.4.46 compiles
> >
> It is a well-known topic.
> Including kernel includes is Evil, a Bad Thing.
> Why?
Yes, I am aware of this.
> Because we all hope our code will not continue changing
> as frequently as the kernel.
>
> Now libc5 does use kernel includes. This means that any
> given libc5 version can only work correctly with a certain
> range of kernels. If you want to use libc5 then you must
> use kernel includes that work together with libc5.
The Changes file tells me to get libc-5.4.46 to work with
linux-2.2.-pre[1-9]
I believe that linux-2.1.132 include files would permit libc to
compile.
>
> Note that the kernel you actually run may well be different
> from the kernel of which you use the include files.
My actual question is wether the include files should be idempotent.
Should an include file itself include all the files it needs.
Hal Duston
hald@sound.net
tmp00009@kcpl.com
-
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/