(Can't fully test because I haven't updated the applications which use it and they give a Rosetta failure notice when trying to talk to IOUserClient)
Anyways, I am trying to compile the driver so that it works on version 10.2.8 or later. I've already set up xcode for this thanks to a great TN on the subject. The problem I'm having is dealing with
clock_get_uptime(&at);
absolutetime_to_nanoseconds(at,&tn);
On 10.3 and earlier at is defined as AbosoluteTime equiv to UnsignedWide struct.
On 10.4 this has changed to uint64_t (Not very nice to change it like this, even if uint64_t is a better idea.)
I need a macro which will compensate for the correct OS X version being compile during the universal double compile sequence.
This does not work as MAC_OS_X_VERSION does not appear to be defined.
#if MAC_OS_X_VERSION < MAC_OS_X_VERSION_10_4
AbsoluteTime at;
clock_get_uptime(&at);
absolutetime_to_nanoseconds(at,&tn);
#else
uint64_t at;
clock_get_uptime(&at);
absolutetime_to_nanoseconds(at,&tn);
#endif
Does anyone know the correct macro to use?