__GNUC__
__APPLE_CC__
Hello, World!
以下のコードで確認.
#include <iostream>
int main(int argc, const char * argv[])
{
#if defined(__GNUC__)
printf(“__GNUC__\n”) ;
#endif
#if defined(__APPLE_CPP__)
printf(“__APPLE_CPP__\n”) ;
#endif
#if defined(__APPLE_CC__)
printf(“__APPLE_CC__\n”) ;
#endif
#if defined(__MACOS_CLASSIC__)
printf(“__MACOS_CLASSIC__\n”) ;
#endif
// insert code here…
std::cout << “Hello, World!\n”;
return 0;
}
???/MacOSX.platform/Developer/SDKs/MaxOSX10.7.sdk/usr/include/TargetConditionals.h より
cpp -dM /dev/null