Re: include file conflict

Guest section DW (dwguest@win.tue.nl)
Tue, 17 Nov 1998 00:34:50 +0100 (MET)


From tytso@athena.mit.edu Mon Nov 16 20:27:33 1998

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

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.

I've been thinking about this for a while myself, and it would be
interesting to put something like a major version number and datestamp
into the beginning of the interface header file:

/*
* linux/ext2fs.h
*
* INTERFACE_VERSION=1, DATECODE=981012
*/

Then I'd include a copy of ext2fs.h in e2fsprogs, and have an autoconf
macro which parses out the INTERFACE_VERSION and DATECODE and then
either uses the version in the linux source tree or the one bundled in
with e2fsprogs, whichever has the newer DATECODE.

This has a couple of nice properties.

But as I have been pointing out, auto-taking the most recent kernel version
has at least two disadvantages: (1) it doesnt compile, (2) if it compiles,
you find that your program suddenly is broken.

But if you do not leave the job to autoconf and take more recent definitions
yourself, you see what has been changed, and have the opportunity to think
about whether and how these changes affect your program.

Andries

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