Include file problems

Duston Hal (tmp00009@kcpl.com)
Mon, 25 Jan 1999 12:55:23 -0600


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/