summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-02-05 20:55:21 +0800
committerPo Lu <luangruo@yahoo.com>2023-02-05 20:55:21 +0800
commit0ee01457a84e031d490553949a2deacd4865a5bb (patch)
tree9c22d8dce03d3055b6d321b77f70eec2e0af5aea /m4
parent87cdbbeb8a229926277578a9f5f958438e8679b6 (diff)
parentd27d9a43d4d1b3f8a213cb739f4d27793158a050 (diff)
downloademacs-0ee01457a84e031d490553949a2deacd4865a5bb.tar.gz
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'm4')
-rw-r--r--m4/gnulib-common.m429
-rw-r--r--m4/gnulib-comp.m48
2 files changed, 32 insertions, 5 deletions
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 0f1a6ac1ead..adcdd70b6c5 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,8 @@
+<<<<<<< HEAD
# gnulib-common.m4 serial 78
+=======
+# gnulib-common.m4 serial 80
+>>>>>>> origin/master
dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -351,9 +355,21 @@ AC_DEFUN([gl_COMMON_BODY], [
in C++ also: class. */
/* In C++ and C23, this is spelled [[__maybe_unused__]].
GCC's syntax is __attribute__ ((__unused__)).
+<<<<<<< HEAD
clang supports both syntaxes. */
#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
# ifdef __has_c_attribute
+=======
+ clang supports both syntaxes. Except that with clang ≥ 6, < 10, in C++ mode,
+ __has_c_attribute (__maybe_unused__) yields true but the use of
+ [[__maybe_unused__]] nevertheless produces a warning. */
+#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
+# if defined __clang__ && defined __cplusplus
+# if __clang_major__ >= 10
+# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+# endif
+# elif defined __has_c_attribute
+>>>>>>> origin/master
# if __has_c_attribute (__maybe_unused__)
# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
# endif
@@ -373,7 +389,20 @@ AC_DEFUN([gl_COMMON_BODY], [
the return value, unless the caller uses something like ignore_value. */
/* Applies to: function, enumeration, class. */
#ifndef _GL_ATTRIBUTE_NODISCARD
+<<<<<<< HEAD
# ifdef __has_c_attribute
+=======
+# if defined __clang__ && defined __cplusplus
+ /* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]] produces
+ a warning.
+ The 1000 below means a yet unknown threshold. When clang++ version X
+ starts supporting [[__nodiscard__]] without warning about it, you can
+ replace the 1000 with X. */
+# if __clang_major__ >= 1000
+# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+# endif
+# elif defined __has_c_attribute
+>>>>>>> origin/master
# if __has_c_attribute (__nodiscard__)
# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
# endif
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 0d292d1c2f6..7f0af5965cb 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -188,7 +188,6 @@ AC_DEFUN([gl_EARLY],
# Code from module ssize_t:
# Code from module stat-time:
# Code from module std-gnu11:
- # Code from module stdalign:
# Code from module stdbool:
# Code from module stdckdint:
# Code from module stddef:
@@ -564,9 +563,6 @@ AC_DEFUN([gl_INIT],
gt_TYPE_SSIZE_T
gl_STAT_TIME
gl_STAT_BIRTHTIME
- gl_STDALIGN_H
- gl_CONDITIONAL_HEADER([stdalign.h])
- AC_PROG_MKDIR_P
gl_C_BOOL
AC_CHECK_HEADERS_ONCE([stdckdint.h])
if test $ac_cv_header_stdckdint_h = yes; then
@@ -1127,9 +1123,12 @@ AC_DEFUN([gl_INIT],
if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
func_gl_gnulib_m4code_utimens
fi
+<<<<<<< HEAD
if test $REPLACE_GETLINE = 1; then
func_gl_gnulib_m4code_getdelim
fi
+=======
+>>>>>>> origin/master
if case $host_os in mingw*) false;; *) test $HAVE_GETLOADAVG = 0 || test $REPLACE_GETLOADAVG = 1;; esac; then
func_gl_gnulib_m4code_open
fi
@@ -1582,7 +1581,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/size_max.h
lib/stat-time.c
lib/stat-time.h
- lib/stdalign.in.h
lib/stdckdint.in.h
lib/stddef.in.h
lib/stdint.in.h