The following predefined macros are provided to facilitate porting applications between platforms.
Predefined macro name | Description |
---|---|
__BASE_FILE__ | Defined to the fully qualified file name of the primary source file. |
_BIG_ENDIAN | Defined to 1. |
__BIG_ENDIAN__ | Defined to 1. |
_CALL_SYSV | Defined to 1. |
__CHAR_UNSIGNED__ | Defined to 1 if the option -qchars=unsigned or #pragma chars(unsigned) is in effect. This macro is undefined if the option -qchars=signed or #pragma chars(signed) is in effect. |
__ELF__ | Defined to 1 on this platform to indicate the ELF object model is in effect. |
![]() |
Defined to 1 if the -qeh option is in effect. Otherwise it is not defined. |
__GXX_WEAK__ | Undefined for C. For C++, this macro is defined to 0 for gcc V3.3 or 1 for g++ V3.5. |
__HOS_LINUX__ | Defined to 1 if the host operating system is Linux. Otherwise it is not defined. |
__linux | Defined to 1. |
__linux__ | Defined to 1. |
__OPTIMIZE__ | Defined to 2 for optimization level -O or -O2, or to 3 for optimization level -O3 or higher. |
__OPTIMIZE_SIZE__ | Defined to 1 if the options -qcompact and -O are set. Otherwise it is not defined. |
__powerpc | Defined to 1. |
__powerpc__ | Defined to 1. |
__powerpc64__ | Defined to 1 when compiling in 64-bit mode. Otherwise it is not defined. |
__PPC | Defined to 1. |
__PPC__ | Defined to 1. |
__PPC64__ | Defined to 1 when compiling in 64-bit mode. Otherwise it is not defined. |
__SIZE_TYPE__ | Defined to the underlying type of size_t on this platform. On Linux, in 32-bit mode, the macro is defined as unsigned int. In 64-bit mode, the macro is defined as unsigned long. |
__TOS_LINUX__ | Defined to 1 if the target operating system is Linux. Otherwise it is not defined. |
__unix | Defined to 1 on all UNIX-like platforms. Otherwise it is not defined. |
__unix__ | Defined to 1 on all UNIX-like platforms. Otherwise it is not defined. |