]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
AC_USE_SYSTEM_EXTENSIONS: port to HP-UX, MINUX 3, OS X.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 7 Feb 2013 06:46:49 +0000 (22:46 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 7 Feb 2013 06:47:17 +0000 (22:47 -0800)
* NEWS: Mention this.
* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
Define _NETBSD_HOST on MINUX, for MINUX 3.
Define _DARWIN_C_SOURCE, for OS X.
On HP-UX, define _XOPEN_SOURCE.

NEWS
lib/autoconf/specific.m4

diff --git a/NEWS b/NEWS
index 16de9224ba3418d0f8ced6e567a52670b91867f7..1780cb9ad3c7fc4d6d09b0980737f16b2c751f05 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,9 @@ GNU Autoconf NEWS - User visible changes.
 - AC_PROG_CC_STDC, AC_PROG_CC_C89, AC_PROG_CC_C99 have been marked as obsolete.
   Applications should use AC_PROG_CC.
 
+- AC_USE_SYSTEM_EXTENSIONS now enables more system extensions on HP-UX,
+  MINIX 3, and OS X.
+
 - AC_FUNC_VFORK now checks for the signal-handling bug in Solaris 2.4 'vfork'.
   Formerly, it ignored this bug, so that Emacs could use some tricky
   code on that platform.  Solaris 2.4 has not been supported since
index 0d173f20661c0dbaa94571e61dbea6f2e8cbc007..248a7a353f2bfe76f8522045af6a70ed0e1de068 100644 (file)
@@ -369,13 +369,15 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
   AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
   if test "$MINIX" = yes; then
     AC_DEFINE([_POSIX_SOURCE], [1],
-      [Define to 1 if you need to in order for `stat' and other
+      [Define to 1 if you need to in order for 'stat' and other
        things to work.])
     AC_DEFINE([_POSIX_1_SOURCE], [2],
       [Define to 2 if the system does not provide POSIX.1 features
        except with this defined.])
     AC_DEFINE([_MINIX], [1],
       [Define to 1 if on MINIX.])
+    AC_DEFINE([_NETBSD_SOURCE], [1],
+      [Define to 1 to make NetBSD features available.  MINIX 3 needs this.])
   fi
 
 dnl Use a different key than __EXTENSIONS__, as that name broke existing
@@ -385,10 +387,19 @@ dnl configure.ac when using autoheader 2.62.
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
+/* Enable general extensions on OS X.  */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
+/* HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
+   regardless of whether compiling with -Ae or -D_HPUX_SOURCE=1.  */
+#ifdef __hpux
+# define _XOPEN_SOURCE 500
+#endif
 /* Enable threading extensions on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
@@ -413,6 +424,7 @@ dnl configure.ac when using autoheader 2.62.
   test $ac_cv_safe_to_define___extensions__ = yes &&
     AC_DEFINE([__EXTENSIONS__])
   AC_DEFINE([_ALL_SOURCE])
+  AC_DEFINE([_DARWIN_C_SOURCE])
   AC_DEFINE([_GNU_SOURCE])
   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
   AC_DEFINE([_TANDEM_SOURCE])