[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch AC_USE_SYSTEM_EXTENSIONS for Minix3
From: |
Paul Eggert |
Subject: |
Re: Patch AC_USE_SYSTEM_EXTENSIONS for Minix3 |
Date: |
Wed, 06 Feb 2013 22:48:28 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 |
Thanks, I installed the following patch, which is a bit
more general as it merges recent gnulib changes in.
>From 773f366de4e8db4b2b40cde047c87a175eaa20a5 Mon Sep 17 00:00:00 2001
From: Paul Eggert <address@hidden>
Date: Wed, 6 Feb 2013 22:46:49 -0800
Subject: [PATCH] AC_USE_SYSTEM_EXTENSIONS: port to HP-UX, MINUX 3, OS X.
* 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 | 3 +++
lib/autoconf/specific.m4 | 14 +++++++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index 16de922..1780cb9 100644
--- 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
diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4
index 0d173f2..248a7a3 100644
--- a/lib/autoconf/specific.m4
+++ b/lib/autoconf/specific.m4
@@ -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])
--
1.7.11.7