Feature test macros that control C99 interfaces in XL C++ applications
The following C99 headers are not available to C++ applications:
- <tgmath.h>
- <complex.h> — If <complex.h> is included, the USL Complex Class Library version of this header file will be used.
- <stdbool.h>
To expose C99 interfaces, C++ applications can define the appropriate feature test macros before including the identified header:
- _ISOC99_SOURCE
- Used to control exposure to new C99 interfaces that do not require a C99-compliant compiler. The application programmer defines this feature test macro to inform the compile time library that new C99 interfaces are desired. This feature test macro must be defined prior to inclusion of the first header in order to expose the new C99 interfaces that do not require a C99-compliant compiler. This feature test macro requires a minimum of the z/OS® V1R2 C/C++ compiler and TARGET(zOSV1R5) in order to expose the new C99 interfaces.
- __STDC_LIMIT_MACROS
- Required by C++ applications wishing to expose limits of fixed-width integer types and limits of other integer types as documented in <stdint.h>. The _ISOC99_SOURCE feature test macro must be defined before this feature test macro.
- __STDC_CONSTANT_MACROS
- Required by C++ applications wishing to expose macros for integer constants as documented in <stdint.h>. The _ISOC99_SOURCE feature test macro must be defined before this feature test macro.
- __STDC_FORMAT_MACROS
- Required by C++ applications wishing to expose macros for format specifiers as documented in <inttypes.h>. The _ISOC99_SOURCE feature test macro must be defined before this feature test macro.
- _TR1_C99
- Used to control exposure to the C++ TR1 C99 name space as described in Chapter 8 of ISO/IEC DTR 19768: Draft Technical Report on C++ Library Extensions.