In an application I maintain, we\'ve encountered a problem with file descriptor limitations affecting the stdlib. This problem only affects the 32-bit version of the standar
I would test it indirectly, via the maximum pointer value constant:
#include
#if UINTPTR_MAX == 0xffFFffFF
// 32-bit platform
#elif UINTPTR_MAX == 0xffFFffFFffFFffFF
// 64-bit platform
#else
#error Unknown platform - does not look either like 32-bit or 64-bit
#endif
This way you don't rely on any platform-specific define for architecture, but on the direct consequence of having a specific architecture - the pointer size.