summaryrefslogtreecommitdiffstats
path: root/gl/m4/stdalign.m4
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-12-28 12:13:40 +0100
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-12-28 12:13:40 +0100
commitb0afb8fe0ff1d87165af9df61501197a06240dda (patch)
tree274ac6a96c53ef4c19ab4974ce24a06a233128c5 /gl/m4/stdalign.m4
parent68fc05381ee5fa0aee1413118fbb3d81ca888b09 (diff)
downloadmonitoring-plugins-b0afb8fe0ff1d87165af9df61501197a06240dda.tar.gz
Sync with Gnulib stable-202507 code (a8ac9f9ce5)
Diffstat (limited to 'gl/m4/stdalign.m4')
-rw-r--r--gl/m4/stdalign.m418
1 files changed, 11 insertions, 7 deletions
diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4
index 2b4762f3..885feafd 100644
--- a/gl/m4/stdalign.m4
+++ b/gl/m4/stdalign.m4
@@ -1,9 +1,10 @@
1# stdalign.m4 1# stdalign.m4
2# serial 1 2# serial 3
3dnl Copyright 2011-2024 Free Software Foundation, Inc. 3dnl Copyright 2011-2025 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
7dnl This file is offered as-is, without any warranty.
7 8
8# Check for alignas and alignof that conform to C23. 9# Check for alignas and alignof that conform to C23.
9 10
@@ -81,10 +82,10 @@ AC_DEFUN([gl_ALIGNASOF],
81 82
82 References: 83 References:
83 ISO C23 (latest free draft 84 ISO C23 (latest free draft
84 <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf>) 85 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf>)
85 sections 6.5.3.4, 6.7.5, 7.15. 86 sections 6.5.3.4, 6.7.5, 7.15.
86 C++11 (latest free draft 87 C++11 (latest free draft
87 <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>) 88 <https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
88 section 18.10. */ 89 section 18.10. */
89 90
90/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment 91/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
@@ -103,11 +104,13 @@ AC_DEFUN([gl_ALIGNASOF],
103 104
104/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 105/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
105 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. 106 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
106 clang versions < 8.0.0 have the same bug. */ 107 clang versions < 8.0.0 have the same bug.
108 IBM XL C V16.1.0 cc (non-clang) has the same bug. */
107# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ 109# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
108 || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ 110 || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
109 && !defined __clang__) \ 111 && !defined __clang__) \
110 || (defined __clang__ && __clang_major__ < 8)) 112 || (defined __clang__ && __clang_major__ < 8) \
113 || defined __xlC__)
111# undef/**/_Alignof 114# undef/**/_Alignof
112# ifdef __cplusplus 115# ifdef __cplusplus
113# if (201103 <= __cplusplus || defined _MSC_VER) 116# if (201103 <= __cplusplus || defined _MSC_VER)
@@ -178,7 +181,8 @@ AC_DEFUN([gl_ALIGNASOF],
178# if ((defined _Alignas \ 181# if ((defined _Alignas \
179 && !(defined __cplusplus \ 182 && !(defined __cplusplus \
180 && (201103 <= __cplusplus || defined _MSC_VER))) \ 183 && (201103 <= __cplusplus || defined _MSC_VER))) \
181 || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) 184 || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__ \
185 && !defined __xlC__))
182# define alignas _Alignas 186# define alignas _Alignas
183# endif 187# endif
184# endif 188# endif