Re: Detecting Red Hat builds ?

2001-05-10 Thread Keith Owens

On Thu, 10 May 2001 17:25:29 +0100 (BST), 
[EMAIL PROTECTED] wrote:
>The problem is I have a driver that includes syncppp.h which in the releases
>from kernel.org is in linux/drivers/net/wan/ up to and including 2.4.2 after
>which it moves to linux/include/net/.

Do it in the Makefile.  Untested:

ifneq ($(wildcard $(TOPDIR)/include/net/syncppp.h),)
  CFLAGS_driver_name.o += -I $(TOPDIR)/include/net
else
  CFLAGS_driver_name.o += -I $(TOPDIR)/drivers/net/wan
endif

and the driver does #include "syncppp.h".

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



RE: Detecting Red Hat builds ?

2001-05-10 Thread Khachaturov, Vassilii

For a RH7.x, at least, there is the /boot/kernel.h file generated on bootup,
and the RH kernel headers include it somewhere.
You can see if the corresponding symbols (coming from it) are defined, and
assume redhat than.
You might consider using passing -dM down to the preprocessor with the
standard driver includes preamble,
and look in the preprocessed output for a good clue - it may well be that
there is some other redhat-specific string somewhere defined.
I guess you will find smth if you egrep -i (rh|redhat).

HTH,
Vassilii

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 12:25 PM
To: [EMAIL PROTECTED]
Subject: Detecting Red Hat builds ?


Hi,

How can I determine if the build my device driver is being compiled under is
a standard kernel.org one or a Red Hat one ?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Detecting Red Hat builds ?

2001-05-10 Thread rjd

Hi,

How can I determine if the build my device driver is being compiled under is
a standard kernel.org one or a Red Hat one ?

The problem is I have a driver that includes syncppp.h which in the releases
from kernel.org is in linux/drivers/net/wan/ up to and including 2.4.2 after
which it moves to linux/include/net/. Can cope with this easily enough with
a "#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,2)" but unfortunatly the
kernel source supplied with Red Hat 7.1 reports itself as 2.4.2 but already
has the syncppp changes from 2.4.3.

I was shown a trick to solve a similar problem under 2.2.x but the symbol
defined as a side effect of including one of the standard system headers
is no longer present :-(


-- 
Bob Dunlop  FarSite Communications
[EMAIL PROTECTED]   [EMAIL PROTECTED]
www.xyzzy.clara.co.uk   www.farsite.co.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/