]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
AC_USE_SYSTEM_EXTENSIONS: Set _COSMO_SOURCE
authorJack Kelly <jack@jackkelly.name>
Sun, 5 Jan 2025 06:19:09 +0000 (22:19 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 5 Jan 2025 06:20:35 +0000 (22:20 -0800)
This enables extensions when compiling with Cosmopolitan Libc.
https://justine.lol/cosmopolitan/
* lib/autoconf/specific.m4: Define _COSMO_SOURCE.

NEWS
doc/autoconf.texi
lib/autoconf/specific.m4

diff --git a/NEWS b/NEWS
index 870a5d9d8f8fe2fda7bc45217eb413445be0398a..b859fff610827e946a75b8edf530ecd3cea6b73d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,8 @@ GNU Autoconf NEWS - User visible changes.
   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.
index 9d2c2d0d85ea9889fa11507b7541774e18e4bdb4..4b0cf08dafa38ec5ece9b12ae0a23faa57f8c8f7 100644 (file)
@@ -8852,6 +8852,9 @@ Define the following preprocessor macros unconditionally:
 @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.
index acf4ebd56b3d0bd4b4bf39fbb8bcca8efdc1ee5c..ecd6ab5a2ebc01c6f1b575a381bf0697af141057 100644 (file)
@@ -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])