[linux-dvb] Re: [linuxtv-cvs] dvb-kernel
mkrufky at linuxtv.org
Sun Oct 2 03:38:01 CEST 2005
> C.Y.M wrote:
>>Michael Krufky via CVS wrote:
>>>Module name: dvb-kernel
>>>Changes by: mkrufky 20051001 19:01:45
>>> linux/drivers/media/common: saa7146_i2c.c
>>> linux/drivers/media/dvb/bt8xx: dvb-bt8xx.c
>>> build-2.6 : compat.h
>>>Add compat.h for backwards compatability
>>Should compat.h be added to build-2.6? If we use the ./makelinks build method,
>>then compat.h would not be found.
> How about including the header with ifdefs? That way it stays out unless needed?
> #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,13))
> #include "compat.h"
Your suggestion defeats the entire purpose of compat.h... The point is
that all the version specific code is in compat.h and only compat.h ...
Johannes asked me to do this in a way that makes the least amount of
change to the actual source code. Including compat.h where it isn't
needed in certain kernel versions doesn't cost anything.
Also, your suggestion would also require the inclusion of
linux/version.h, which is a no-no.
If you take a look at compat.h, you'll see that I am STILL not using
anything kernel version specific. Instead, I am testing for whether or
not a constant is defined. As time goes by, more files will need to
include compat.h ... We can throw all compatability checks inside
compat.h, and this will not affect the upstream patching process.
Thank you for the suggestion.
More information about the linux-dvb