__APPLE__
This macro is defined in any Apple computer.
__APPLE_CC__
This macro is set to an integer that represents the version number of
the compiler. This lets you distinguish, for example, between compilers
based on the same version of GCC, but with different bug fixes or features.
Larger values denote later compilers.
__OSX__
Presumabley the OS is a particular variant of OS X
__APPLE__
This macro is defined in any Apple computer.
__APPLE_CC__
This macro is set to an integer that represents the version number of
the compiler. This lets you distinguish, for example, between compilers
based on the same version of GCC, but with different bug fixes or features.
Larger values denote later compilers.
__OSX__
Presumabley the OS is a particular variant of OS X
Predefined Macros
The following macros are predefined in OS X:
-
This macro is defined when your code is being compiled by the Objective-C compiler. By default, this occurs when compiling a
.m
file or any header included by a.m
file. You can force the Objective-C compiler to be used for a.c
or.h
file by passing the-ObjC
or-ObjC++
flags. -
This macro is defined when your code is being compiled by the C++ compiler (either explicitly or by passing the
-ObjC++
flag). -
This macro is defined when compiling
.s
files. -
This macro is defined on systems that use natural alignment. When using natural alignment, an
int
is aligned onsizeof(int)
boundary, a short int is aligned onsizeof(short)
boundary, and so on. It is defined by default when you're compiling code for PowerPC architecutres. It is not defined when you use the-malign-mac68k
compiler switch, nor is it defined on Intel architectures. -
This macro is defined if Mach system calls are supported.
-
This macro is defined in any Apple computer.
-
This macro is set to an integer that represents the version number of the compiler. This lets you distinguish, for example, between compilers based on the same version of GCC, but with different bug fixes or features. Larger values denote later compilers.
-
These macros tell whether the current architecture uses little endian or big endian byte ordering. For more information, see “Compiling for Multiple CPU Architectures.”
__OBJC__
__cplusplus
__ASSEMBLER__
__NATURAL_ALIGNMENT__
__MACH__
__APPLE__
__APPLE_CC__
__BIG_ENDIAN__
and
__LITTLE_ENDIAN__