[linux-dvb] Re: [linuxtv-cvs] dvb-kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



C.Y.M wrote:
> C.Y.M wrote:
> 
>>Michael Krufky via CVS wrote:
>>
>>
>>>CVSROOT:	/cvs/linuxtv
>>>Module name:	dvb-kernel
>>>Changes by:	mkrufky	20051001 19:01:45
>>>
>>>Modified files:
>>>	linux/drivers/media/common: saa7146_i2c.c 
>>>	linux/drivers/media/dvb/bt8xx: dvb-bt8xx.c 
>>>Added files:
>>>	build-2.6      : compat.h 
>>>
>>>Log message:
>>>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"
> #endif

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.

Cheers,

Michael Krufky


[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux