[Mono-osx] Interop 32/64 bit check
crmckinnon at shaw.ca
Mon Mar 31 22:13:37 UTC 2014
I’m writing interop code for Core Foundation on Mac OS X. I’m curious if anyone has suggestions on how to determine when you are running 32/64 bit in Mono. I’d like to write my interop code so that it can handle both cases or at least can be compiled for each case.
Here’s an example, in CFBase.c:
typedef signed long long CFIndex; // CFIndex is 64 bits.
typedef signed long CFIndex; // CFIndex is 32 bits.
If I want to handle this in C#, say for a CFRange which has two CFIndex values, like so:
#if (CF_IS_64_BIT) // <— are there any defined constants for this?
Is there a defined value in Mono to determine if the system is 32 bit versus 64 bit? Are there better ways to handle this? I wanted to avoid IntPrs as the code would get messy quick.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx