Re: 2.70 release branch created; trunk open for development

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When merging Autoconf 2.70-and-later into Gnulib (which tries to work with older Autoconf releases) I found some minor discrepancies where Gnulib was better. These were small issues involving less-common porting targets like Oracle Developer Studio or HP-UX, or fixing some minor quoting bugs, and they seemed safe for 2.70.1 so I installed them in Autoconf branch-2.70. See attached.

Should I also install these into master, or merge them into master, or wait for a mass merge later? In other words, what procedure do you prefer for patches that should be installed into both branches?
From 9a9b87681e9eef9614bc8505cd778c32901f7ed9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@xxxxxxxxxxx>
Date: Fri, 11 Dec 2020 15:15:28 -0800
Subject: [PATCH 1/4] 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])
-- 
2.28.0

From cb1b332b41898ea63e99db028e16255847a94fea Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@xxxxxxxxxxx>
Date: Fri, 11 Dec 2020 15:18:41 -0800
Subject: [PATCH 2/4] 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
-- 
2.28.0

From 17b495aae099c70ff826cf80480b0e45a20bf2e6 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@xxxxxxxxxxx>
Date: Fri, 11 Dec 2020 15:22:02 -0800
Subject: [PATCH 3/4] 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
-- 
2.28.0

From b5eacb08aba5d9de79c81091d336aa30f75cfc29 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@xxxxxxxxxxx>
Date: Fri, 11 Dec 2020 15:23:53 -0800
Subject: [PATCH 4/4] 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])
-- 
2.28.0


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux