Assuming you are are using GCC on Linux then these predefined macros may be useful:
__i386__ You're compiling for a 32-bit Intel
__x86_64__ You're compiling for a 64-bit Intel
__ppc__ You're compiling for a 32-bit PowerPC
__ppc64__ You're compiling for a 64-bit PowerPC
__LP64__ possibly an indicator of 64-bitness
__i386__ You're compiling for a 32-bit Intel
__x86_64__ You're compiling for a 64-bit Intel
__ppc__ You're compiling for a 32-bit PowerPC
__ppc64__ You're compiling for a 64-bit PowerPC
__LP64__ possibly an indicator of 64-bitness
To copy to clipboard, switch view to plain text mode
You can see what your GCC defines with:
cpp -dM -E < /dev/null
cpp -dM -E < /dev/null
To copy to clipboard, switch view to plain text mode
You could also peruse qglobal.h for hints as to how the Qt system does it.
http://predef.sourceforge.net/ is also very useful
Bookmarks