I need a constant that clang on mac os x recognizes. I would have though that one of the following would work, but none do.
int main()
{
#ifdef DARWIN
printf(" I am DARWIN\n");
#endif
#ifdef darwin
printf(" I am darwin\n");
#endif
#ifdef MAC
printf(" I am MAC\n");
#endif
#ifdef mac
printf(" I am mac\n");
#endif
#ifdef MACOS
printf(" I am MACOS\n");
#endif
#ifdef macos
printf(" I am macos\n");
#endif
#ifdef MACOSX
printf(" I am MACOSX/n");
#endif
#ifdef macosx
printf(" I am macosx/n");
#endif
}
There must be something that does. This is important for writing portable C programs that work on multiple OS's.