This enables extensions when compiling with Cosmopolitan Libc. https://justine.lol/cosmopolitan/
* lib/autoconf/specific.m4: Define _COSMO_SOURCE. * doc/autoconf.texi: Document that we now set _COSMO_SOURCE. --- NEWS | 3 +++ doc/autoconf.texi | 2 ++ lib/autoconf/specific.m4 | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/NEWS b/NEWS index 9e68534f..42af6d54 100644 --- a/NEWS +++ b/NEWS @@ -165,6 +165,9 @@ GNU Autoconf NEWS - User visible changes. *** AC_USE_SYSTEM_EXTENSIONS now enables C23 Annex F extensions by defining __STDC_WANT_IEC_60559_EXT__. +*** AC_USE_SYSTEM_EXTENSIONS now supports Cosmopolitan Libc + by defining _COSMO_SOURCE. + ** Obsolete features and new warnings *** Autoconf now quotes 'like this' instead of `like this'. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index f202ea00..bbf2a117 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -8914,6 +8914,8 @@ The following preprocessor macros are defined unconditionally: @item _ALL_SOURCE @cvindex _ALL_SOURCE Enable extensions on AIX 3 and Interix. +@item _COSMO_SOURCE +Enable extensions on Cosmopolitan Libc. @item _DARWIN_C_SOURCE @cvindex _DARWIN_C_SOURCE Enable extensions on macOS. diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index b758c7d1..efdf20ac 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -551,6 +551,10 @@ AH_VERBATIM([USE_SYSTEM_EXTENSIONS], #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif +/* Enable extensions on Cosmopolitan Libc. */ +#ifndef _COSMO_SOURCE +# undef _COSMO_SOURCE +#endif /* Enable general extensions on macOS. */ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE @@ -677,6 +681,7 @@ dnl it should only be defined when necessary. [ac_cv_should_define__xopen_source=yes])])])]) AC_DEFINE([_ALL_SOURCE]) + AC_DEFINE([_COSMO_SOURCE]) AC_DEFINE([_DARWIN_C_SOURCE]) AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_HPUX_ALT_XOPEN_SOCKET_API]) -- 2.44.1