Re: [RFC v3 1/2] v4l: Do not use enums in IOCTL structs

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

 



Em 02-05-2012 21:42, Andy Walls escreveu:
> On Wed, 2012-05-02 at 19:17 -0300, Mauro Carvalho Chehab wrote:
> 
>> We can speed-up the conversions, with something like:
>>
>> enum foo {
>> 	BAR
>> };
>>
>> if (sizeof(foo) != sizeof(u32))
>> 	call_compat_logic().
>>
>> I suspect that sizeof() won't work inside a macro. 
> 
> sizeof() is evaluated at compile time, after preprocessing. 
> It should work inside of a macro.

According with Dennis Ritchie, testing for sizeof on a macro never worked:
	http://groups.google.com/group/comp.std.c/msg/4852afc61a060d89?dmode=source&pli=1

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux