This enables extensions when compiling with Cosmopolitan Libc.
https://justine.lol/cosmopolitan/
* lib/autoconf/specific.m4: Define _COSMO_SOURCE.
The autom4te, autoscan and ifnames programs now recognize the two
preprocessor directives, which were introduced in C23 and C++23.
+*** AC_USE_SYSTEM_EXTENSIONS now defines _COSMO_SOURCE for Cosmopolitan Libc.
+
** Notable bug fixes
*** AC_FUNC_STRNLEN now detects Android 5.0's broken strnlen.
@item _ALL_SOURCE
@cvindex _ALL_SOURCE
Enable extensions on AIX and z/OS.
+@item _COSMO_SOURCE
+@cvindex _COSMO_SOURCE
+Enable extensions on Cosmopolitan Libc.
@item _DARWIN_C_SOURCE
@cvindex _DARWIN_C_SOURCE
Enable extensions on macOS.
#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
[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])