long in IDL files?

Rob Shearman robertshearman at gmail.com
Sun Jan 4 11:08:37 CST 2009


2009/1/4 Michael Stefaniuc <mstefani at redhat.com>:
> Hello guys,
>
> i guess that we need to change long to LONG in IDL files too, right?
> Or would that be something that widl could/should do automatically?

long/unsigned long are explicitly defined by the DCE/RPC standard to
be 32-bit types. In an ideal world, I would change widl to generate
int16_t/uint16_t for short/unsigned short, int32_t/uint32_t for
long/unsigned long and int64_t/uint64_t for hyper/unsigned hyper
types, but the lack of stdint.h in the Windows world prevents this.

Therefore, the best solution that I see at the moment is to change the
"long" type in widl to output "int". This will allow the generated
code to work correctly on both 32-bit and 64-bit Linux and Windows
platforms (but not 16-bit platforms and possibly other platforms).

-- 
Rob Shearman



More information about the wine-devel mailing list