To distinguish the OS: you can use the preprocessor: __linux__ and _WIN32 , thay sare known to the compiler.
The source code example is:
#ifdef __linux__
// Linux Includes Here
#endif
#ifdef _WIN32 || _WIN64
// Windows Includes Here
#endif
The function:
bool probe() {
#ifdef TARGET_OS_MAC
return pro_macosx();
#elif defined __linux__
return pro_linux();
#elif defined _WIN32 || defined _WIN64
return pro_win();
#else
#error "unknown platform"
#endif
}