From: Paul Eggert Date: Thu, 7 Feb 2013 06:46:49 +0000 (-0800) Subject: AC_USE_SYSTEM_EXTENSIONS: port to HP-UX, MINUX 3, OS X. X-Git-Tag: v2.69b~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e33646cac3129cce430b55149c31f753d27fcfa;p=thirdparty%2Fautoconf.git 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. --- diff --git a/NEWS b/NEWS index 16de9224..1780cb9a 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 0d173f20..248a7a35 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])