Re: include file conflict

H. Peter Anvin (hpa@transmeta.com)
Sun, 15 Nov 1998 03:10:16 -0800 (PST)


>
> What I mean by sanitized: break headers into two halves, one which
> contains only definitions and -- with appropriate #ifdef's -- can be
> included by userspace, and one which contains static inline code, which
> includes the first half and which should never ever be even looked at by
> userspace. Breaking up fs.h would be the first step towards sanity. It's a
> big job, maybe it's a 2.3 job and 2.1/2.2 should be patched as much as
> possible with #ifdef's, though that will be ugly. We shouldn't have gotten
> here to begin with.
>

That I agree with 100%. For example, the autofs code contains
linux/auto_fs.h and fs/autofs/autofs_i.h which are much that way.

> > Thus, (1) it is a good idea to improve the kernel sources a bit,
>
> Yup, that's all we're asking for. To be _allowed_ to fix it. I'm not
> trying to say it's trivial, there is lots of cruft accumulated over the
> years, and it only got worse in the 2.1 cycle. It can be done however, and
> with the proper maintenance it can even stay more or less sane.
>
> > but (2) you are wasting your time in the sense that a week
> > or a month after you improved the includes something
> > will be changed, and your programs will not compile anymore.
>
> Fine, and the next day after I get a complaint, Linus will get a patch to
> fix the headers. I prefer a "doesn't compile" error report, with a precise
> reference to the place of the error, than a "doesn't work, whats wrong"
> error report.

Agreed.

-hpa

-
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/