https://github.com/libsdl-org/autoconf/commit/237519e6e759d176651be226e39522ca3dcbf289
From b693e208691c54fbe07cdf49b9a98358baadcfe2 Mon Sep 17 00:00:00 2001
From: Zack Weinberg <[EMAIL REDACTED]>
Date: Tue, 8 Dec 2020 21:47:13 -0500
Subject: [PATCH 1/6] maint: add outline for future NEWS (release branch).
---
NEWS | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index 2a4db5f6..56ad10f2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,8 @@
GNU Autoconf NEWS - User visible changes.
-* Noteworthy changes in release ?.? (????-??-??) [?]
+* Noteworthy changes in release 2.70.1 (????-??-??) [?]
+** Bug fixes.
* Noteworthy changes in release 2.70 (2020-12-08) [stable]
From efc940dc82763b7b2d6e65f04d15d5972d829c0a Mon Sep 17 00:00:00 2001
From: Zack Weinberg <zackw@panix.com>
Date: Tue, 8 Dec 2020 21:35:45 -0500
Subject: [PATCH 2/6] _AC_PROG_CC_C99: fix typo (#110396)
_AC_PROG_CC_C99 was using the wrong test program.
Fixes #110396, reported anonymously.
* lib/autoconf/c.m4 (_AC_PROG_CC_C99): Use the C99 test program, not
the C89 test program.
---
lib/autoconf/c.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index fe217cad..601c2df4 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -1559,7 +1559,7 @@ dnl SVR4 -Xc -D__EXTENSIONS__
# option to output variable CC to make it so.
AC_DEFUN([_AC_PROG_CC_C99],
[AC_REQUIRE([_AC_C_C99_TEST_PROGRAM])]dnl
-[_AC_C_STD_TRY([c99], [ac_c_conftest_c89_program],
+[_AC_C_STD_TRY([c99], [ac_c_conftest_c99_program],
dnl Try
dnl GCC -std=gnu99 (unused restrictive modes: -std=c99 -std=iso9899:1999)
dnl IBM XL C -qlanglvl=extc1x (V12.1; does not pass C11 test)
From 8f19de6df0cfab5eff9e62e3c8ec8443558476d1 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 11 Dec 2020 15:15:28 -0800
Subject: [PATCH 3/6] Improve port of AC_C_RESTRICT to Oracle C++
Problem reported by Christian Biesinger in:
https://lists.gnu.org/r/bug-gnulib/2019-12/msg00159.html
* lib/autoconf/c.m4 (AC_C_RESTRICT): Port better to
Oracle Developer Studio C++ 12.5 or later.
This patch is adapted from Gnulib.
---
lib/autoconf/c.m4 | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index 601c2df4..14240460 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -2031,12 +2031,13 @@ AC_DEFUN([AC_C_RESTRICT],
nothing if this is not supported. Do not define if restrict is
supported only directly. */
#undef restrict
-/* Work around a bug in Sun C++ 5.13: it does not support _Restrict or
- __restrict__, even though the corresponding Sun C compiler ends up with
- "#define restrict _Restrict" or "#define restrict __restrict__".
- Perhaps some future version of Sun C++ will work with restrict;
- if so, hopefully it defines __RESTRICT like Sun C does. */
-#if defined __SUNPRO_CC && !defined __RESTRICT
+/* Work around a bug in older versions of Sun C++, which did not
+ #define __restrict__ or support _Restrict or __restrict__
+ even though the corresponding Sun C compiler ended up with
+ "#define restrict _Restrict" or "#define restrict __restrict__"
+ in the previous line. This workaround can be removed once
+ we assume Oracle Developer Studio 12.5 (2016) or later. */
+#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
# define _Restrict
# define __restrict__
#endif])
From 2f3f782cdd8d5105dc15ef18e2d11aac40d7c462 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 11 Dec 2020 15:18:41 -0800
Subject: [PATCH 4/6] Port minor AC_FUNC_ALLOCA fixes from Gnulib
* lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_ALLOCA):
Use ' not ` in generated comments, as per current GNU coding style.
(_AC_LIBOBJ_ALLOCA): Use plain # instead of unnecessary quadrigraph.
This patch is adapted from Gnulib.
---
lib/autoconf/functions.m4 | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4
index 49aa5c58..12f60b99 100644
--- a/lib/autoconf/functions.m4
+++ b/lib/autoconf/functions.m4
@@ -358,8 +358,8 @@ AN_FUNCTION([getwd], [warn: getwd is deprecated, use getcwd instead])
# _AC_LIBOBJ_ALLOCA
# -----------------
-# Set up the LIBOBJ replacement of `alloca'. Well, not exactly
-# AC_LIBOBJ since we actually set the output variable `ALLOCA'.
+# Set up the LIBOBJ replacement of 'alloca'. Well, not exactly
+# AC_LIBOBJ since we actually set the output variable 'ALLOCA'.
# Nevertheless, for Automake, AC_LIBSOURCES it.
m4_define([_AC_LIBOBJ_ALLOCA],
[# The SVR3 libPW and SVR4 libucb both contain incompatible functions
@@ -368,7 +368,7 @@ m4_define([_AC_LIBOBJ_ALLOCA],
# use ar to extract alloca.o from them instead of compiling alloca.c.
AC_LIBSOURCES(alloca.c)
AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
-AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using `alloca.c'.])
+AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.])
AC_CACHE_CHECK([stack direction for C alloca],
[ac_cv_c_stack_direction],
@@ -400,7 +400,7 @@ AH_VERBATIM([STACK_DIRECTION],
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
-@%:@undef STACK_DIRECTION])dnl
+#undef STACK_DIRECTION])dnl
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
])# _AC_LIBOBJ_ALLOCA
@@ -453,7 +453,7 @@ fi
if test $ac_cv_func_alloca_works = yes; then
AC_DEFINE(HAVE_ALLOCA, 1,
- [Define to 1 if you have `alloca', as a function or macro.])
+ [Define to 1 if you have 'alloca', as a function or macro.])
else
_AC_LIBOBJ_ALLOCA
fi
From 5c2bcf10c0b0bf5b463f6086b9548da84fe20cc7 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 11 Dec 2020 15:22:02 -0800
Subject: [PATCH 5/6] Port minor AC_HEADER_MAJOR fixes from Gnulib
* lib/autoconf/headers.m4 (AC_HEADER_MAJOR):
Improve m4 quoting.
---
lib/autoconf/headers.m4 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4
index bc70e0b6..802eec2f 100644
--- a/lib/autoconf/headers.m4
+++ b/lib/autoconf/headers.m4
@@ -499,13 +499,13 @@ AN_FUNCTION([minor], [AC_HEADER_MAJOR])
AN_HEADER([sys/mkdev.h], [AC_HEADER_MAJOR])
AC_DEFUN([AC_HEADER_MAJOR],
[AC_CHECK_HEADERS_ONCE([sys/types.h])
-AC_CHECK_HEADER(sys/mkdev.h,
- [AC_DEFINE(MAJOR_IN_MKDEV, 1,
+AC_CHECK_HEADER([sys/mkdev.h],
+ [AC_DEFINE([MAJOR_IN_MKDEV], [1],
[Define to 1 if `major', `minor', and `makedev' are
declared in <mkdev.h>.])])
if test $ac_cv_header_sys_mkdev_h = no; then
- AC_CHECK_HEADER(sys/sysmacros.h,
- [AC_DEFINE(MAJOR_IN_SYSMACROS, 1,
+ AC_CHECK_HEADER([sys/sysmacros.h],
+ [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
[Define to 1 if `major', `minor', and `makedev'
are declared in <sysmacros.h>.])])
fi
From 8118c2adc4dc0a7ee4f9616197d0e3db42f9a788 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 11 Dec 2020 15:23:53 -0800
Subject: [PATCH 6/6] Improve AC_USE_SYSTEM_EXTENSIONS port to HP-UX 11.11
* lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS):
Define _HPUX_ALT_XOPEN_SOCKET_API, for HP-UX 11.11.
This patch is adapted from Gnulib.
---
lib/autoconf/specific.m4 | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4
index 275938ca..853276bb 100644
--- a/lib/autoconf/specific.m4
+++ b/lib/autoconf/specific.m4
@@ -389,6 +389,11 @@ AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
+/* Enable X/Open compliant socket functions that do not require linking
+ with -lxnet on HP-UX 11.11. */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
/* Identify the host operating system as Minix.
This macro does not affect the system headers' behavior.
A future release of Autoconf may stop defining this macro. */
@@ -496,6 +501,7 @@ dnl it should only be defined when necessary.
AC_DEFINE([_ALL_SOURCE])
AC_DEFINE([_DARWIN_C_SOURCE])
AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([_HPUX_ALT_XOPEN_SOCKET_API])
AC_DEFINE([_NETBSD_SOURCE])
AC_DEFINE([_OPENBSD_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])