diff options
author | Jim Huang <jserv@biilabs.io> | 2021-04-19 01:02:13 +0800 |
---|---|---|
committer | Jim Huang <jserv@biilabs.io> | 2021-04-21 15:24:02 +0800 |
commit | 3402c6cc3f439e8be04ff99afea2c810f27af035 (patch) | |
tree | c5dec5f056f9d21e8e7e54b90d8b7415341f47f3 /docs/group__cpp.js | |
parent | b19da8e362acae8944c60a40cf5c40c8f5ebeb44 (diff) |
Revise the use of macOS predefined macro
Quoted from "Porting UNIX/Linux Applications to OS X,"[1]
* macro __MACH__ is defined if Mach system calls are supported;
* macro __APPLE__ is defined in any Apple computer.
__MACH__ is not specific to macOS since GNU/Hurd runs on a Mach-based
microkernel (gnumach) [2]. __MACH__ is defined by the compiler,
leading to potential confusions. The solution is just changing the
checked identifier (i.e. __APPLE__), so it is really used only on
macOS.
[1] https://developer.apple.com/library/archive/documentation/Porting/Conceptual/PortingUnix/compiling/compiling.html
[2] https://www.gnu.org/software/hurd/microkernel/mach/gnumach.html
Diffstat (limited to 'docs/group__cpp.js')
0 files changed, 0 insertions, 0 deletions