Include file problems with 2.2.0-pre

hald@echo.sound.net
22 Jan 1999 21:18:37 -0000


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/