Feature test macros
protectedby a feature test macro. These
protectedsymbols are invisible to the application unless the user defines the feature test macro with
#define
, using either of the following methods:
- In the source code before including any header files.
- On the compilation command.
- _LARGE_FILES
- _LARGE_MEM
- __LIBASCII
- _OE_SOCKETS
Table 1 summarizes the relationships between the feature test macros and the standards. ‘Yes’ indicates that a feature test macro makes visible the symbols related to a standard.
Feature test macros that do not apply to POSIX standards are not listed in this table.
Feature Test Macro | POSIX.1 | POSIX.1a | POSIX.2 | POSIX.4a | XPG4.2 | XPG4.2 Ext | SUSv3 |
---|---|---|---|---|---|---|---|
_ALL_SOURCE | Yes | Yes | Yes | Yes | Yes | Yes | |
_ALL_SOURCE_NO_THREADS | Yes | Yes | Yes | Yes | Yes | ||
_OE_SOCKETS | Yes | Yes | |||||
_OPEN_DEFAULT | Yes | Yes | Yes | ||||
_OPEN_SOURCE 1 | Yes | Yes | Yes | Yes | |||
_OPEN_SOURCE 2 | Yes | Yes | Yes | Yes | Yes | Yes | |
_OPEN_SOURCE 3 | Yes | Yes | Yes | Yes | Yes | Yes | |
_OPEN_SYS | Yes | Yes | Yes | Yes | |||
_OPEN_SYS_IPC_EXTENSIONS | Yes | Yes | Yes | ||||
_OPEN_SYS_PTY_EXTENSIONS | Yes | Yes | Yes | Yes | |||
_OPEN_SYS_SOCK_EXT | Yes | Yes | Yes | Yes | |||
_OPEN_THREADS | Yes | Yes | Yes | ||||
_POSIX1_SOURCE 1 | Yes | ||||||
_POSIX1_SOURCE 2 | Yes | Yes | |||||
_POSIX_C_SOURCE 1 | Yes | ||||||
_POSIX_C_SOURCE 2 | Yes | Yes | |||||
_POSIX_C_SOURCE 200112L | Yes | Yes | Yes | Yes | |||
_POSIX_SOURCE | Yes | ||||||
_XOPEN_SOURCE | Yes | Yes | Yes | ||||
_XOPEN_SOURCE_EXTENDED 1 | Yes | Yes | Yes | Yes | |||
_XOPEN_SOURCE 500 | Yes | Yes | Yes | Yes | |||
_XOPEN_SOURCE 600 | Yes | Yes | Yes | Yes | Yes | Yes |
The following feature test macros are supported:
_ALL_SOURCE
-
This feature test macro exposes the following namespaces: POSIX.1, POSIX.1a, POSIX.2, POSIX.4a draft 6, XPG4, and XPG4.2, as well as additions to z/OS® UNIX drawn from Single UNIX Specification, Version 2.
In addition, defining _ALL_SOURCE makes visible a number of symbols which are not permitted under ANSI, POSIX or XPG4, but which are provided as an aid to porting C-language applications to z/OS UNIX System Services. Extensions made visible with the following feature test macros are implicit in _ALL_SOURCE:
- _OPEN_SYS_DIR_EXT
- _OPEN_SYS_EXT
- _OPEN_SYS_IPC_EXTENSIONS
- _OPEN_SYS_MAP_EXTENTION
- _OPEN_SYS_PTY_EXTENSIONS
- _OPEN_SYS_SOCK_EXT
- _OPEN_SYS_SOCK_EXT2
- _OPEN_SYS_SOCK_IPV6
If _OPEN_THREADS is not explicitly defined in the application, _ALL_SOURCE will define _OPEN_THREADS 1 except when any of the following are present:
- _ALL_SOURCE_NO_THREADS
- _UNIX03_THREADS
- _XOPEN_SOURCE 600
_ALL_SOURCE does not expose functionality first introduced in Single UNIX Specification, Version 3 under macro definitions _XOPEN_SOURCE 600 or _POSIX_C_SOURCE 200112L, although it does tolerate interfaces made visible by defining _OPEN_THREADS to 2 or 3.
In order to stabilize the namespace, no future extensions, whether POSIX, XOPEN, or MVS™, will expand the definition of _ALL_SOURCE. Any future enhancement will require new, explicit feature test macros to add symbols to this namespace.
_ALL_SOURCE_NO_THREADS
-
This feature test macro provides the same function as
_ALL_SOURCE
, except it does not expose threading services (_OPEN_THREADS
). _IEEEV1_COMPATIBILITY
-
In 1999, the C/C++ Runtime Library provided IEEE754 floating-point arithmetic support in support of the IBM Java group. The Java™ language had a bit-wise requirement for its math library, meaning that all platforms needed to produce the same results as Sun Microsystems’ fdlibm (Freely Distributed LIBM) library. Therefore, Sun Microsystems’ fdlibm code was ported to the C/C++ Runtime Library to provide IEEE754 floating-point arithmetic support. Subsequent to the C/C++ Runtime Library’s 1999 release of IEEE754 floating-point math support, IBM’s Java group provided their own support of IEEE754 floating point arithmetic and no longer use the C/C++ Runtime Library for this support.
Beginning in z/OS V1R9, a subset of the original fdlibm functions are being replaced by new versions that are designed to provide improved performance and accuracy. The new versions of these functions are replaced at the existing entry points. However, as a migration aid, IBM has provided new entry points for the original fdlibm versions. Applications that take no action will automatically use the updated functions. There are two methods for accessing the original functions.
This feature test macro provides an environment for the following C/C++ functions:
- do not include <math.h>
- include <math.h> and define the _FP_MODE_VARIABLE feature test macro
Either of the above will cause the application to be running in what is called "variable" mode with respect to floating-point math functions called within the compile unit. See z/OS XL C/C++ Programming Guide for more details on the environment variable.
The second method is through a feature test macro, described here, that can be used by applications that do include <math.h> and do not define the _FP_MODE_VARIABLE feature test macro.
If the application conforms to the rules of the second method, then the feature test macro can be used to access the original fdlibm versions of the following functions:acos(), acosh(), asin(), asinh(), atan(), atanh(), atan2(), cbrt(), cos(), cosh(), erf(), erfc(), exp(), expm1(), gamma(), hypot(), lgamma(), log(), log1p(), log10(), pow(), rint(), sin(), sinh(), tan(), tanh()
A recompile and relink of the application is required to access the original fdlibm versions.
_ISOC99_SOURCE
-
This feature test macro makes available all interfaces associated with ISO/IEC 9899:1999 except for interfaces requiring a compiler that is designed to support C99. This feature test macro also exposes the namespace normally exposed by the _MSE_PROTOS feature test macro, unless _NOISOC99_SOURCE is defined. The _ISOC99_SOURCE feature test macro is not required when a compiler that is designed to support C99 is used.
Note: If both _NOISOC99_SOURCE and _ISOC99_SOURCE are defined before inclusion of the first header, new C99 interfaces will not be exposed. _LARGE_FILES
-
The _LARGE_FILES feature test macro enables certain functions to operate on MVS data sets and z/OS UNIX files that are larger than 2 GB in size and VSAM extended addressability data sets larger than 4 GB in size. When this feature test macro is selected it must be used in conjunction with the compiler option LANGLVL(LONGLONG) to activate the
long long
data type.The following functions are enabled to operate on z/OS UNIX files of all sizes by expanding appropriate offset and file size values to a 64-bit value:creat(), fcntl(), fgetpos(), fopen(), freopen(), fseek(), fseeko(), fsetpos(), fstat(), ftell(), ftello(), ftruncate(), getrlimit(), lockf(), lseek(), lstat(), mmap(), open(), read(), setrlimit(), stat(), truncate(), write()
The _LARGE_FILES feature test macro also enables the fseeko() and ftello() functions to operate on MVS data sets larger than 2 GB and VSAM data sets larger than 4 GB by expanding the parameter and return type width to 64 bits. The fgetpos(), fopen(), freopen(), and fsetpos() functions implicitly support operations on these sized data sets and therefore do not require the _LARGE_FILES feature test macro to be defined.
Note: Using AMODE 64 obsoletes this feature test macro. Large files are automatically supported in the LP64 programming model, therefore automatically included for AMODE 64 C/C++ applications. The c99 compiler defines thelong long
data type as a standard type by default.Restriction: This feature test macro is incompatible with the __LIBASCII feature test macro. _LARGE_MEM
-
This feature test macro is provided for AMODE 31 applications that need access to AMODE 64 values. Use of large memory support requires LANGLVL(LONGLONG).
Note: This feature test macro is obsolete in AMODE 64. Large memory support is automatic in the LP64 programming model, therefore all behaviors with respect to large memory are automatically included for AMODE 64 C/C++ applications. _LARGE_TIME_API
-
This feature test macro exposes new typedefs, structures, and functions so that an application can work with constructed calendar times up to and including the artificial limit of 23:59:59 on December 31, 9999 UTC.
__LIBASCII
- This feature test macro provides an ASCII-like environment for the following C/C++ functions:
access(), asctime(), atof(), atoi(), atol(), chdir(), chmod(), chown(), creat(), ctime(), dllload(), dllqueryfn(), dynalloc() ecvt(), execv(), execve(), execvp(), fcvt(), fdopen(), fopen(), freopen(), ftok(), gcvt(), getcwd(), getenv(), getgrnam(), gethostbyaddr(), gethostbyname(), gethostname(), getlogin(), getopt(), getpass(), getpwnam(), getpwuid(), getservbyname(), getwd(), inetaddr(), inet_ntoa(),isalnum(), isalpha(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit(), link(), localeconv(), mbstowcs(), mbtowc(), mkdir(), mknod(), mktemp(), nl_langinfo(), open(), opendir(), perror(), popen(), ptsname(), putenv(), readdir(), regcomp(), remove(), rename(), rexec(), rmdir(), scanf(), setenv(), setkey(), setlocale(), setvbuf(), sprintf(), sscanf(), stat(), statvfs(), strcasecmp(), strerror(), strncasecmp(), strtod(), strtol(), strtoul(), system(), tempnam(), tmpnam(), toascii(), tolower(), toupper(), uname(), unlink(), utime(), utimes()
For each application program using one or more of these functions, where the input/output is ASCII, add the following feature test macro:- #define __LIBASCII
- Recompile using the CONV(ISO8859-1) option to cause the compiler to generate all strings defined in the source program in ASCII rather than EBCDIC format.
Note:- This feature test macro is not supported in AMODE 64.
- Enhanced ASCII and __LIBASCII are independent, and should not be used together. Using Enhanced ASCII and __LIBASCII together is not supported.
- The libascii functions are as thread-safe as the runtime library with the exception of the getopt() function. The libascii getopt() function is not thread-safe. The second argument is changed for a short period of time from EBCDIC to ASCII and then back to EBCDIC. This feature test macro is incompatible with the _LARGE_FILES feature test macro.
_LONGMAP
-
Programs compiled with the LONGNAME compiler option and which use POSIX functions must define _LONGMAP when using the Prelinker outside of a z/OS UNIX shell environment.
_MSE_PROTOS
-
The
_MSE_PROTOS
feature test macro does the following:- Selects behavior for a multibyte extension support (MSE) function declared in wchar.h as specified by ISO/IEC 9899:1990/Amendment 1:1994 instead of behavior for the function as defined by CAE Specification, System Interfaces and Headers, Issue 4, July 1992 (XPG4), and
- Exposes declaration of an MSE function declared in wchar.h which is specified by ISO/IEC 9899:1990/Amendment 1:1994 but not by XPG4.
Note: Defining _ISOC99_SOURCE or using a compiler that is designed to support C99 also exposes this namespace provided that _NOISOC99_SOURCE is not also defined. _NOISOC99_SOURCE
-
This feature test macro prevents exposure of new interfaces that are part of the C99 standard. This feature test macro must be defined before inclusion of the first header in order to prevent new C99 interfaces from being exposed.
Note: If both _NOISOC99_SOURCE and _ISOC99_SOURCE are defined before inclusion of the first header, new C99 interfaces will not be exposed. _OE_SOCKETS
-
This feature test macro defines a BSD-like socket interface for the function prototypes and structures involved. This can be used with
_XOPEN_SOURCE_EXTENDED 1
and the XPG4.2 socket interfaces will be replaced with the BSD-like interfaces.Restriction: This feature test macro is not supported in AMODE 64. _OPEN_DEFAULT
-
When defined to 0, and if no other feature test macro is defined, then all symbols will be visible. If in addition to _OPEN_DEFAULT only POSIX and/or XPG4 feature test macros are defined, then only the symbols so requested will be visible. Otherwise, additional symbols (for example, those visible when the LANGLVL(EXTENDED) compiler option is specified), may be exposed.
When defined to 1, this provides the base level of z/OS UNIX functionality, which is POSIX.1, POSIX.1a and POSIX.2.
_OPEN_MSGQ_EXT
-
This feature test macro defines an interface which enables use of select(), selectex() and poll() to monitor message and file descriptors.
_OPEN_SOURCE
-
When defined to 1, this defines all of the functionality that was available on MVS 5.1. This macro is equivalent to specifying
_OPEN_SYS
.When defined to 2, this defines all of the functionality that is available on MVS 5.2.2, including XPG4, XPG4.2, and all of the z/OS UNIX extensions.
When defined to 3, this macro is equivalent to specifying _ALL_SOURCE.
If _OPEN_THREADS is not explicitly defined in the application, _OPEN_SOURCE will define _OPEN_THREADS 1 except when any of the following are present:
- _ALL_SOURCE_NO_THREADS
- _UNIX03_THREADS
- _XOPEN_SOURCE 600
_OPEN_SYS
-
When defined to
1
, this indicates that symbols required byPOSIX.1
,POSIX.1a
,POSIX.2
are made visible. Any symbols defined by the_OPEN_THREADS
macro are allowed.If _OPEN_THREADS is not explicitly defined in the application, _OPEN_SYS will define _OPEN_THREADS 1 except when any of the following are present:
- _ALL_SOURCE_NO_THREADS
- _UNIX03_THREADS
- _XOPEN_SOURCE 600
Additional symbols can be made visible if any of the exposed standards explicitly allows the symbol to appear in the header in question or if the symbol is defined as a z/OS UNIX System Services extension.
_OPEN_SYS_DIR_EXT
-
This feature test macro defines the interface and function prototypes for __opendir2() and __readdir2().
_OPEN_SYS_FILE_EXT
-
When defined to any value with
#define
, _OPEN_SYS_FILE_EXT indicates that symbols required for file conversion, file tagging, and file attributes manipulation functionality are made visible. _OPEN_SYS_IF_EXT
-
When defined to 1, this feature test macro exposes BSD-like socket definitions found in <net/if.h> and <sys/ioctl.h> that are needed to manipulate network interfaces. This feature test macro is made available beginning with z/OS V1R9.
_OPEN_SYS_IPC_EXTENSIONS
-
This feature test macro defines z/OS UNIX extensions to the X/Open InterProcess Communications functions. When _OPEN_SYS_IPC_EXTENSIONS is defined, the POSIX.1, POSIX.1a, and the XPG4 symbols are visible. This macro should be used in conjunction with _XOPEN_SOURCE.
_OPEN_SYS_MUTEX_EXT
-
This feature test macro allows pthread condition variables and mutexes in shared memory. When this feature is defined, pthread_mutex_t and pthread_cond_t will grow significantly in size.
When either _XOPEN_SOURCE 600 or _UNIX03_THREADS are defined, the namespace includes all elements made visible by the _OPEN_SYS_MUTEX_EXT macro. In this case, _OPEN_SYS_MUTEX_EXT is redundant and does not need to be defined by the application.
_OPEN_SYS_PTY_EXTENSIONS
-
This feature test macro defines z/OS UNIX extensions to the X/Open Pseudo TTY functions. When _OPEN_SYS_PTY_EXTENSIONS is defined, the POSIX.1, POSIX.1a, XPG4, and XPG4.2 symbols are visible. This macro should be used in conjunction with _XOPEN_SOURCE_EXTENDED 1.
_OPEN_SYS_SOCK_EXT
-
This feature test macro defines the interface for function prototypes and structures for the extended sockets and bulk mode support.
_OPEN_SYS_SOCK_EXT2
-
This feature test macro defines the function prototype and interfaces for accept_and_recv().
_OPEN_SYS_SOCK_EXT3
-
This feature test macro defines the function prototypes and interfaces for multicast source filtering.
_OPEN_SYS_SOCK_EXT4
-
This feature test macro defines interfaces in netinet/in.h used for sending UDP reply packets on the same inbound interface as the request arrived.
_OPEN_SYS_SOCK_IPV6
-
When defined, indicates that symbols related to Internet Protocol Version 6 (IPv6) are made visible.
Defining _XOPEN_SOURCE to 600 will expose the IPv6 symbols required in Single Unix Specification, Version 3. However, these symbols only comprise a subset of the complete namespace associated with _OPEN_SYS_SOCK_IPV6. Although an application is allowed to define both macros, such an application may not be strictly conforming to Single UNIX Specification, Version 3.
_OPEN_THREADS
-
When defined to
1
, this indicates that symbols required byPOSIX.1
,POSIX.1a
, andPOSIX.4a(draft 6)
are made visible.When defined to
2
, additional pthread functions introduced in z/OS V1R07 from Single UNIX Specification, Version 3 are made visible, along with those made visible when this is defined to1
. The following symbols are added to the namespace when _OPEN_THREADS is defined to2
:Interfaces Constants pthread_getconcurrency() PTHREAD_CANCEL_ENABLE pthread_setconcurrency() PTHREAD_CANCEL_DISABLE pthread_setcancelstate() PTHREAD_CANCEL_DEFERRED pthread_setcanceltype() PTHREAD_CANCEL_ASYNCHRONOUS pthread_sigmask() pthread_testcancel() pthread_key_delete() When defined to 3, all pthread functions required for the Threads option of Single UNIX Specification, Version 3 are exposed, although behavior and function signatures are still based on the POSIX.4a draft 6 specification. In addition to the symbols exposed by _OPEN_THREADS 2, _OPEN_THREADS 3 adds the following symbols to the namespace:
Interfaces Constants pthread_atfork() PTHREAD_CANCEL_CANCELED pthread_attr_getguardsize() PTHREAD_COND_INITIALIZER pthread_attr_getschedparam() PTHREAD_CREATE_DETACHED pthread_attr_getstack() PTHREAD_CREATE_JOINABLE pthread_attr_getstackaddr() PTHREAD_EXPLICIT_SCHED pthread_attr_setguardsize() pthread_attr_setschedparam() pthread_attr_setstack() pthread_attr_setstackaddr() Thread interfaces listed above and first exposed by _OPEN_THREADS 2 or 3 are fully compliant with Single UNIX Specification, Version 3. However, the other threading interfaces in the library will not exhibit the new behavior or use function signatures changed in the new standard. Applications that define _UNIX03_THREADS or _XOPEN_SOURCE 600 will obtain threads support that complies fully with Single UNIX Specification, Version 3.
If _OPEN_THREADS is defined with _XOPEN_SOURCE 600, _OPEN_THREADS takes precedence and overrides the default threads behavior of _XOPEN_SOURCE 600. However, _OPEN_THREADS and _UNIX03_THREADS are mutually exclusive.
Note: Feature test macros _OPEN_SYS, _OPEN_SOURCE, and _ALL_SOURCE incorporate _OPEN_THREADS 1 by default, if _OPEN_THREADS has not been explicitly defined in the application, except when any of the following are present:- _ALL_SOURCE_NO_THREADS
- _UNIX03_THREADS
- _XOPEN_SOURCE 600
_POSIX1_SOURCE
-
- When defined to
1
, it has the same meaning as_POSIX_SOURCE
. - When defined to
2
, both the POSIX.1a symbols and the POSIX.1 symbols are made visible. Additional symbols can be made visible ifPOSIX.1a
explicitly allows the symbol to appear in the header in question.
- When defined to
_POSIX_C_SOURCE
-
- When defined to
1
, it indicates that symbols required byPOSIX.1
are made visible. Additional symbols can be made visible ifPOSIX.1
explicitly allows the symbol to appear in the header in question. - When defined to
2
, both thePOSIX.1
andPOSIX.2
symbols are made visible. - When defined to 200112L, the Single UNIX Specification, Version 3 symbols are made visible, including POSIX.1 and POSIX.2. Since Version 3 is aligned with the ISO C standard (ISO/IEC 9899:1999), this definition of the feature test macro also exposes the C99 namespace.
- The _POSIX_C_SOURCE 200112L definition is available beginning with z/OS V1R9. Targeting earlier releases will result in an error during compile-time.
- Additional symbols can be made visible if
POSIX.2
explicitly allows the symbol to appear in the header in question.
- When defined to
_POSIX_SOURCE
-
When defined to any value with
#define
, it indicates that symbols required byPOSIX.1
are made visible. Additional symbols can be made visible ifPOSIX.1
explicitly allows the symbol to appear in the header in question. _SHARE_EXT_VARS
-
This feature test macro provides access to POSIX and XPG4 external variables of an application from a dynamically loaded module such as a DLL. For those external variables that have a function to access a thread-specific value, it provides access to the thread-specific value of the external variable without having to explicitly invoke the function.
Individual variables can be externalized by using the feature test macros prefixed with _SHR_ and the feature test macros that are shown as follows. The entire set can be accessed by defining _SHARE_EXT_VARS.
Note: When an application is compiled with the XPLINK or LP64 option:- The POSIX and XPG4 external variables will be resolved through the C runtime library side-deck in the SCEELIB data set and will be accessible from all dynamically loaded modules. See z/OS XL C/C++ Programming Guide for more details.
- The _SHARE_EXT_VARS feature test macro, and the following feature test macros with the _SHR_ prefix, are only necessary for accessing the thread-specific values without having to explicitly invoke the function.
_SHR_DAYLIGHT
-
To share access to the daylight external variable from a dynamically loaded module such as a DLL, define the _SHR_DAYLIGHT feature test macro and include time.h in your program source.
_SHR_ENVIRON
-
If you have declared char **environ in your program and want to access the environment variable array from a dynamically loaded module such as a DLL, define the _SHR_ENVIRON feature test macro and include stdlib.h in the program source.
_SHR_H_ERRNO
-
To share access to the h_errno external variable from a dynamically loaded module such as a DLL, define the _SHR_H_ERRNO feature test macro and include netdb.h in your program source.
_SHR__LOC1
-
To share access to the __loc1 external variable from a dynamically loaded module such as a DLL, define _SHR__LOC1 feature test macro and include libgen.h in your program source.
_SHR_LOC1
-
To share access to the loc1 external variable from a dynamically loaded module such as a DLL, define _SHR_LOC1 feature test macro and include regexp.h in your program source.
_SHR_LOC2
-
To share access to the loc2 external variable from a dynamically loaded module such as a DLL, define _SHR_LOC2 feature test macro and include regexp.h in your program source.
_SHR_LOCS
-
To share access to the locs external variable from a dynamically loaded module such as a DLL, define _SHR_LOCS feature test macro and include regexp.h in your program source.
_SHR_OPTARG
-
To share access to the optarg external variable from a dynamically loaded module such as a DLL, define the _SHR_OPTARG feature test macro and include unistd.h or stdio.h in your program source.
_SHR_OPTERR
-
To share access to the opterr external variable from a dynamically loaded module such as a DLL, define the _SHR_OPTERR feature test macro and include unistd.h or stdio.h in your program source.
_SHR_OPTIND
-
To share access to the optind external variable from a dynamically loaded module such as a DLL, define _SHR_OPTIND feature test macro and include unistd.h or stdio.h in your program source.
_SHR_OPTOPT
-
To share access to the optopt external variable from a dynamically loaded module such as a DLL, define the _SHR_OPTOPT feature test macro and include unistd.h or stdio.h in your program source.
_SHR_SIGNGAM
-
To share access to the signgam external variable from a dynamically loaded module such as a DLL, define the _SHR_SIGNGAM feature test macro and include math.h in your program source.
_SHR_T_ERRNO
-
To share access to the t_errno external variable from a dynamically loaded module such as a DLL, define the _SHR_T_ERRNO feature test macro and include xti.h in your program source.
_SHR_TIMEZONE
-
To share access to the timezone external variable from a dynamically loaded module such as a DLL, define the _SHR_TIMEZONE feature test macro and include time.h in your program source. To avoid name space pollution when _SHR_TIMEZONE is defined, the timezone variable must be referred to as _timezone.
_SHR_TZNAME
-
To share access to the tzname external variable from dynamically loaded module such as a DLL, define the _SHR_TZNAME feature test macro and include time.h in your program source.
__STDC_CONSTANT_MACROS
-
This feature test macro is required by C++ applications wishing to expose macros for integer constants as documented in <stdint.h>.
__STDC_FORMAT_MACROS
-
This feature test macro is required by C++ applications wishing to expose macros for format specifiers as documented in <inttypes.h>.
__STDC_WANT_DEC_FP__
-
This MACRO will be added to the C99 DFP specification (for C and C++). The user will define this MACRO when DFP support is wanted. It will cause all DFP-oriented definitions in <math.h> and other headers to be exposed if __IBM_DFP is defined.
__STDC_LIMIT_MACROS
-
This feature test macro is required by C++ applications wishing to expose limits of specified-width integer types and limits of other integer types as documented in <stdint.h>.
_TR1_C99
-
This feature test macro exposes the C++ TR1 C99 name space as described in Chapter 8 of ISO/IEC DTR 19768: Draft Technical Report on C++ Library Extensions.
When both the _TR1_C99 and _AIX_COMPATIBILITY Feature Test Macros are defined, the _AIX_COMPATIBILITY takes precedence. This affects the copysign(), scalbn(), and the floating point classification functions.
When both the _TR1_C99 and _FP_MODE_VARIABLE feature test macros are defined, float overloads are not supported for the following functions:
atan2(), copysign(), fdim(), fma(), fmax(), fmin(), fmod(), frexp(), hypot(), ldexp(), modf(), nextafter(), nexttoward(), pow(), remainder(), remquo(), scalbln(), and scalbn()
Also, when both the _TR1_C99 and _FP_MODE_VARIABLE feature test macros are set, the long double overloads are not supported for frexp() and ldexp().
This feature test macro requires the use of the z/OS V1.10 z/OS XL C++ compiler or later.
_UNIX03_SOURCE
-
This feature test macro exposes new Single UNIX Specification, Version 3 interfaces. It does not change the behavior of existing APIs, nor expose interfaces controlled by feature test macros such as _XOPEN_SOURCE_EXTENDED. Functions and behavior exposed by _UNIX03_SOURCE are a subset and not the complete implementation of the Single UNIX Specification, Version 3. To expose the full Single UNIX Specification, Version 3 implementation available in the C/C++ Runtime, see _XOPEN_SOURCE or _POSIX_C_SOURCE.
Release Interfaces Exposed with _UNIX03_SOURCE z/OS V1R6 dlclose(), dlerror(), dlopen(), dlsym() z/OS V1R7 sched_yield(), strerror_r(), unsetenv() z/OS V1R8 flockfile(), ftrylockfile(), funlockfile(), getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked() z/OS V1R9 posix_openpt(), pselect(), sockatmark() Note: This feature test macro does not expose any new pthread interfaces. See _OPEN_THREADS and _UNIX03_THREADS to expose pthread interfaces. _UNIX03_THREADS
-
This feature test exposes all pthread functions, function signatures, and behaviors required for the Threads option of Single UNIX Specification, Version 3. The macro is available for compiles targeting z/OS V1R9 or later.
Defining _UNIX03_THREADS exposes the content covered by feature test macro _OPEN_SYS_MUTEX_EXT, so that the latter is redundant and need not be defined with _UNIX03_THREADS.
It is not necessary to define this feature test macro, if _XOPEN_SOURCE is defined to 600. Unless _OPEN_THREADS is defined, _XOPEN_SOURCE 600 will make available the same interfaces and behaviors as _UNIX03_THREADS.
_UNIX03_THREADS and _OPEN_THREADS are mutually exclusive.
_UNIX03_WITHDRAWN
-
Defining this feature test macro exposes any language elements, previously in the Legacy Feature Group or marked obsolescent, that have been removed from Single Unix Specification, Version 3. These elements would not otherwise be visible in the namespace exposed by compiling with _XOPEN_SOURCE 600 or POSIX_C_SOURCE 200112L.
The following withdrawn symbols are exposed when _UNIX03_WITHDRAWN is defined:
Functions Constants brk() CLOCK_TICKS chroot() IUCLC cuserid() L_cuserid gamma() NOSTR getdtablesize() OLCUC getpagesize() PASS_MAX getpass() _SC_2_ C_VERSION getw() _SC_PASS_MAX putw() _SC_XOPEN_XCU_VERSION regcmp() TMP_MAX regex() XCASE sbrk() YESSTR sigstack() ttyslot() valloc() External Variable wait3() __loc1 _VARARG_EXT_
-
This feature test macro allows users of the va_arg, va_end, and va_start macros to define the va_list type differently.
_XOPEN_SOURCE
-
This feature test macro defines the functionality defined in the XPG4 standard dated July 1992.
When defined to 500, this feature test macro makes available certain key functions that are associated with Single UNIX Specification, Version 2.
When defined to 600, this feature test macro exposes the complete implementation of the Single UNIX Specification, Version 3, including the namespace defined by _POSIX_C_SOURCE 200112L as well as namespaces associated with the X/Open System Interface (XSI) extension and these options and option groups:
- File synchronization
- Memory mapped files
- Memory protection
- Realtime signals extension
- Thread stack address attribute
- Thread stack size attribute
- Thread process-shared synchronization
- Thread-safe functions
- Threads
- Encryption option group
- Legacy option group
- XSI streams option group
The use of _XOPEN_SOURCE 600 exposes namespaces covered by several other feature test macros, and as such, makes those macros redundant. The following need not be defined when _XOPEN_SOURCE 600 is defined:
_ISOC99_SOURCE _POSIX_C_SOURCE _UNIX03_THREADS _OPEN_SYS_MUTEX_EXT _UNIX03_SOURCE _POSIX_SOURCE _XOPEN_SOURCE_EXTENDED If _OPEN_THREADS is defined with _XOPEN_SOURCE 600, _OPEN_THREADS takes precedence and overrides Single UNIX Specification, Version 3 threads behavior. Whenever _OPEN_THREADS is in effect, the _OPEN_SYS_MUTEX_EXT extensions are also dropped, unless the application explicitly defines this macro.
The _XOPEN_SOURCE 600 definition is available beginning with z/OS V1R9. Targeting earlier releases will result in an error during compile-time.
Full support of Single UNIX Specification, Version 3 requires use of a C99 compliant compiler. Most of the namespace is available to older compilers, but some elements of Version 3 ( such as . <complex.h> or <tgmath.h> ) will not be visible.
_XOPEN_SOURCE_EXTENDED
-
When defined to 1, this defines the functionality defined in the XPG4 standard plus the set of “Common APIs for UNIX-based Operating Systems”, April, 1994, draft.