Hello everyone...

I'm trying to conditionally build a C++ project depending on the target 
platform. In short, I am looking for a macro in g++ that will tell me if 
I am compiling for *nix or Windows. I can use macros to check which 
compiler is being used, that is easy. The problem is finding out what 
operating system the compiler is compiling for. I can't (and don't want 
to) use autoconf, so please don't tell me to use that.

On Windows, using DJGPP, the __unix__ macro is predefined in g++ for 
some reason, so I can't accurately use that. I can however check for 
MSVC to make sure it is being compiled on Windows, but that's it.

Any help is appreciated,
Thanks.

Reply via email to