This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ioctls improvement


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

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]