Which macro to wrap Mac OS X specific code in C/C++

后端 未结 6 1798
悲哀的现实
悲哀的现实 2020-12-13 03:32

While reading various C and C++ sources, I have encountered two macros __APPLE__ and __OSX__. I found plenty of use of __OSX__ in vari

6条回答
  •  悲哀的现实
    2020-12-13 04:22

    I normally use __MACH__ for this. It's been defined since the earliest version of OS X (and even before, presumably).

提交回复
热议问题