Re: toplevel Makefile bug and simple fix

tytso@mit.edu
Mon, 8 Nov 1999 12:32:50 -0500


Date: Mon, 8 Nov 1999 15:21:30 +0000 (GMT)
From: Alan Cox <alan@lxorguk.ukuu.org.uk>

> > I'm not convinced /usr/include/linux is sufficient. Perhaps we need
> > a more explicit naming ?
>
> You are too brief - sufficient for what?

For kernel modules you want
<linux-versionnumber/foo.h>

Why would you ever want that?

This is a disaster if you want a kernel module to support a wide range
of kernels, from 2.0.* to 2.3.*. Especially if version number inludes
the patchlevel.

#if (LINUX_VERSION_CODE == 0x020201)
#include <linux-2.2.1/foo.h>
#elif (LINUX_VERSION_CODE == 0x020202)
#include <linux-2.2.2/foo.h>
#elif (LINUX_VERSION_CODE == 0x020203)
#include <linux-2.2.3/foo.h>
#elif (LINUX_VERSION_CODE == 0x020204)
#include <linux-2.2.4/foo.h>
#elif (LINUX_VERSION_CODE == 0x020205)
#include <linux-2.2.5/foo.h>
#elif (LINUX_VERSION_CODE == 0x020206)
#include <linux-2.2.6/foo.h>
....
#endif

I hope I'm misunderstanding your idea.... (!)

- Ted

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