1. 程式人生 > >各個系統的巨集定義

各個系統的巨集定義

#ifdef _WIN32 // note the underscore: without it, it's not msdn official! 
    // Windows (x64 and x86) 
#elif __unix__ // all unices 
    // Unix 
#elif __posix__ 
    // POSIX 
#elif __linux__ 
    // linux 
#elif __APPLE__ 
    // Mac OS, not sure if this is covered by __posix__ and/or __unix__ though... 
#endif