On Feb 20, 2016, at 8:26 AM, Andrew Eikum aeikum@codeweavers.com wrote:
Does Apple provide inttypes-style (e.g. PRIu64) macros for these types?
They do. I've checked back to the 10.5 SDK.
I'm not sure they help, though. For example, AudioDeviceID is typedef'd as AudioObjectID, which is in turn typedef'd as UInt32. UInt32 is typedef'd as either unsigned long (in 32-bit) or unsigned int (64-bit). The best fit for that would be PRIu32, but that's "u" for both architectures. That's fine for uint32_t, which is it's purpose, but doesn't help for UInt32. It's the right size in both cases, but doesn't eliminate the warning from using %u with an unsigned long on 32-bit.
There's no macro which is %lu for 32-bit and %u for 64-bit, which is what we would need. We could define our own, of course.
Can we use them in Wine?
No idea. This is a file that's only compiled on the Mac, so some of the rules may be relaxed.
I'm not sure that such macros are less ugly than casting. I guess that's up to you and Alexandre.
-Ken