Re: [PATCH] use size_t for the broken ioctl numbers
From: Ingo Oeser
Date: Mon Sep 08 2003 - 10:39:32 EST
On Sunday 07 September 2003 19:34, Andreas Schwab wrote:
> Linus Torvalds <torvalds@xxxxxxxx> writes:
> > ({ x __dummy; sizeof(__dummy); })
> >
> > which should work with all compiler versions.
>
> This won't work with array types, eg. in <linux/random.h>:
>
> #define RNDGETPOOL _IOR( 'R', 0x02, int [2] )
It would, if you did this
#define RNDGETPOOL _IOR('R', 0x02, struct { int x[2];})
I would vote for simply forbidding arrays in this situation (which the compile
error will handle as well ;-)). Just another case of "Doctor it hurts!"
Regards
Ingo Oeser
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/