diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2022-02-25 15:30:42 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2022-02-25 15:31:05 -0800 |
commit | d125d4f6d1a5d9845824aaf1d1c9dc69699bf2f1 (patch) | |
tree | 0a4b507e4fa343e2a43dace61b97db6ad32b11d8 /m4 | |
parent | 2510ffcdcdad4e5cd20455b4891de4f5e128072a (diff) | |
download | gnulib-d125d4f6d1a5d9845824aaf1d1c9dc69699bf2f1.tar.gz |
Port __has_attribute to Apple’s Clang renumbering
Problem reported by Kirill A. Korinsky in:
https://lists.gnu.org/r/bug-gnulib/2022-02/msg00034.html
* config/srclist.txt: Comment out sys/cdefs.h for now.
* lib/cdefs.h (__glibc_has_attribute):
* m4/gnulib-common.m4 (gl_COMMON_BODY):
Port to Apple’s renumbering of Clang versions.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/gnulib-common.m4 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index dbc4079614..c5ced04f18 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -69,7 +69,9 @@ AC_DEFUN([gl_COMMON_BODY], [ [/* Attributes. */ #if (defined __has_attribute \ && (!defined __clang_minor__ \ - || 3 < __clang_major__ + (5 <= __clang_minor__))) + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))) # define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) #else # define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr |