I see a lot of varying solutions here, which makes me uncomfortable... What if they work on Linux but not Windows or on Windows but not Linux? What if they only work on some compilers? Etc.
So I found this link, which I like: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system
It looks like these are best (using #ifdef, #endif, etc.):
_WIN32 for Windows 32 bit
_WIN64 for Windows 64 bit
__unix__ for Unix