ioctls improvement
Guillaume Libersat
glibersat@linux62.org
Tue Feb 14 22:51:00 GMT 2006
Hello,
We've experienced a problem trying to build an ioctl.
When you try to build an iotcl with an "unsigned int" for example,
you get a wrong output.
For example, if your macro is :
#define BIOCGBLEN _IOR('g',1, unsigned int)
it will not work, because you have to use only _one_ word.
As a workaround, you can typedef, but this is not practical.
We saw that there was a macro to fix this problem for structs :
#define _IOTBASE_struct
As we can safely assume that the size of an unsigned type is the same as
the signed type, why not defining a macro for unsigned types too ?
Something like
#define _IOTBASE_unsigned
should fix the problem of unsigned types.
Is it correct ?
Thank you,
Guillaume Libersat & Richard Braun
PS: Please CC me, I'm not on list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20060214/4c6b75af/attachment.sig>
More information about the Libc-alpha
mailing list