Re: share COMPATIBLE_IOCTL()s across architectures

Andi Kleen
2003-03-19T23:57:31Z

Pavel Machek <pavel@suse.cz> writes:

> --- linux-test/include/linux/compat_ioctl.h 2003-03-20 00:08:12.000000000 +0100
> +++ linux/include/linux/compat_ioctl.h 2003-03-19 23:36:24.000000000 +0100
> @@ -0,0 +1,641 @@
> +/* List here explicitly which ioctl's are known to have
> + * compatible types passed or none at all...
> + */
> +/* Big T */
> +COMPATIBLE_IOCTL(TCGETA)

Shouldn't you put the include files needed for all that in there too?

Otherwise you have another ugly list to duplicate. The includes
cannot be put inside the ioctl list, because in some extreme
case they can generate code (e.g. when gcc decides to ignore inline
again and emits functions for includes)

It could be done with a special symbol like:

#ifdef DO_INCLUDES
#include foo1
#include foo2
#else
COMPATIBLE_IOCTL(...)
#endif

-Andi