Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个在 mac osx 或 linux 上运行的代码,我希望它是可移植的,我如何制作一个 #ifndef 语句来切换msg_nosignal到 macosx 下的相关标志?
msg_nosignal
如果你想检查它是否在 OS X 上编译,我认为主要的预处理器指令是
#ifdef __APPLE__ ... #endif