File: autoconf.info, Node: C and Posix Variants, Next: Erlang Libraries, Prev: System Services, Up: Existing Tests 5.12 C and Posix Variants ========================= The following macro makes it possible to use C language and library extensions defined by the C standards committee, features of Posix that are extensions to C, and platform extensions not defined by Posix. -- Macro: AC_USE_SYSTEM_EXTENSIONS If possible, enable extensions to C or Posix on hosts that normally disable the extensions, typically due to standards-conformance namespace issues. This should be called before any macros that run the C compiler. Also, when using this macro in concert with ‘AC_CONFIG_HEADERS’, be sure that ‘config.h’ is included before any system header. The following preprocessor macros are defined unconditionally: ‘_ALL_SOURCE’ Enable extensions on AIX 3 and Interix. ‘_DARWIN_C_SOURCE’ Enable extensions on macOS. ‘_GNU_SOURCE’ Enable extensions on GNU systems. ‘_NETBSD_SOURCE’ Enable general extensions on NetBSD. Enable NetBSD compatibility extensions on Minix. ‘_OPENBSD_SOURCE’ Enable OpenBSD compatibility extensions on NetBSD. Oddly enough, this does nothing on OpenBSD. ‘_POSIX_PTHREAD_SEMANTICS’ Enable Posix-compatible threading on Solaris. ‘__STDC_WANT_IEC_60559_ATTRIBS_EXT__’ Enable extensions specified by ISO/IEC TS 18661-5:2014. ‘__STDC_WANT_IEC_60559_BFP_EXT__’ Enable extensions specified by ISO/IEC TS 18661-1:2014. ‘__STDC_WANT_IEC_60559_DFP_EXT__’ Enable extensions specified by ISO/IEC TS 18661-2:2015. ‘__STDC_WANT_IEC_60559_EXT__’ Enable extensions specified by C23 Annex F. ‘__STDC_WANT_IEC_60559_FUNCS_EXT__’ Enable extensions specified by ISO/IEC TS 18661-4:2015. ‘__STDC_WANT_IEC_60559_TYPES_EXT__’ Enable extensions specified by C23 Annex H and by ISO/IEC TS 18661-3:2015. ‘__STDC_WANT_LIB_EXT2__’ Enable extensions specified by ISO/IEC TR 24731-2:2010. ‘__STDC_WANT_MATH_SPEC_FUNCS__’ Enable extensions specified by ISO/IEC 24747:2009. ‘_TANDEM_SOURCE’ Enable extensions on HP NonStop systems. The following preprocessor macros are defined only when necessary; they enable access to extensions on some operating systems but _disable_ extensions on other operating systems. ‘__EXTENSIONS__’ Enable general extensions on Solaris. This macro is defined only if the headers included by ‘AC_INCLUDES_DEFAULT’ (*note Default Includes::) work correctly with it defined. ‘_MINIX’ ‘_POSIX_SOURCE’ ‘_POSIX_1_SOURCE’ Defined only on MINIX. ‘_POSIX_SOURCE’ and ‘_POSIX_1_SOURCE’ are needed to enable a number of POSIX features on this OS. ‘_MINIX’ does not affect the system headers' behavior; future versions of Autoconf may stop defining it. Programs that need to recognize Minix should use ‘AC_CANONICAL_HOST’. ‘_XOPEN_SOURCE’ Defined (with value 500) only if needed to make ‘wchar.h’ declare ‘mbstate_t’. This is known to be necessary on some versions of HP/UX. The C preprocessor macro ‘__STDC_WANT_DEC_FP__’ is not defined. ISO/IEC TR 24732:2009 was superseded by ISO/IEC TS 18661-2:2015. The C preprocessor macro ‘__STDC_WANT_LIB_EXT1__’ is not defined, as the C standard's Annex K is problematic. See: O'Donell C, Sebor M. Field Experience With Annex K--Bounds Checking Interfaces (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htm). The Autoconf macro ‘AC_USE_SYSTEM_EXTENSIONS’ was introduced in Autoconf 2.60.