[linux-dvb] [PATCH] Make v4l-dvb compile under kernels < 2.6.16

Mauro Carvalho Chehab mchehab at infradead.org
Mon Apr 10 13:08:28 CEST 2006


Em Dom, 2006-04-09 às 18:50 -0700, Trent Piepho escreveu:
> On Sun, 9 Apr 2006, Mauro Carvalho Chehab wrote:
> > Em Dom, 2006-04-09 s 16:51 -0700, Trent Piepho escreveu:
> > > Michael suggested that I try add the define to rename the struct in compat.h,
> > > as this will remove a lot of compat code from all the drivers.  What do you
> > > say?  All that #if stuff can build up to make quite a mess.
> > Hmmm... #define mutex semaphore seems to be too dangerous, since it
> > might change some non-struct names and might generate some naming
> > conflicts. It would be nice if there were some way to change "struct
> > mutex" into "struct semaphore", but I dunno any ways of doing this with
> > gpp.
> 
> I can make the change so that everything works and there are no conficts with
> non-struct names.  It will remove a lot of #if stuff.  There will be no
> problems or potential problems with the existing code.
> 
> The only problem would be if someone later tried to create an identifier named
> just 'mutex', and also created one named 'semaphore' which shared scope with
> the 'mutex' one.  Then they'd have to compile that on a pre-mutex kernel.  Not
> that dangerous I think.
This is what I'm afraid. That's why I've decided to change that part at
the drivers. Well, at that time, there were some semaphores left. I
think situation now changed, since it seems that Ingo had applied
mutex->semaphore change to all our stuff. Hmm... no. pwc is still using
semaphore. Ok, go ahead.

Cheers, 
Mauro.




More information about the linux-dvb mailing list