I'm working with some C/C++ code that runs on Win32 and also VxWorks. It uses #ifdef WIN32
to switch to platform specific implementations.
I've been using the code on the iPhone and I want to update it and keep it as portable as possible, but I'm not sure what's the best practice. So far I've been using #ifdef __APPLE__
blocks.
What should I be using to target Apple iPhone and Mac OS X?
- Is
#ifdef __APPLE__
the best approach? - Are there any gotchas to be aware of?