From 6ac1823898c0ec5a5711ce0af5a1bfe4edd44ad4 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 29 Jan 2024 18:26:41 +0100 Subject: [PATCH] Port FALLTHROUGH to Mac OS X 10.9. Report and fix by Ryan Carsten Schmidt at . * m4/gnulib-common.m4 (gl_COMMON_BODY): For _GL_HAS_ATTRIBUTE, don't use __has_attribute for Apple clang versions < 7000000. * lib/cdefs.h (__glibc_has_attribute): Don't use __has_attribute for Apple clang versions < 7000000. --- ChangeLog | 10 ++++++++++ lib/cdefs.h | 2 +- m4/gnulib-common.m4 | 6 +++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a27785a8fa..bc885ab8de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2024-01-29 Bruno Haible + + Port FALLTHROUGH to Mac OS X 10.9. + Report and fix by Ryan Carsten Schmidt + at . + * m4/gnulib-common.m4 (gl_COMMON_BODY): For _GL_HAS_ATTRIBUTE, don't use + __has_attribute for Apple clang versions < 7000000. + * lib/cdefs.h (__glibc_has_attribute): Don't use __has_attribute for + Apple clang versions < 7000000. + 2024-01-28 Bruno Haible host-cpu-c-abi: Let gl_HOST_CPU_C_ABI_32BIT never return 'unknown'. diff --git a/lib/cdefs.h b/lib/cdefs.h index 412f036ce3..6c58720067 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h @@ -42,7 +42,7 @@ #if (defined __has_attribute \ && (!defined __clang_minor__ \ || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ + ? 7000000 <= __apple_build_version__ \ : 3 < __clang_major__ + (5 <= __clang_minor__)))) # define __glibc_has_attribute(attr) __has_attribute (attr) #else diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index c372316135..e6044b8128 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,5 +1,5 @@ -# gnulib-common.m4 serial 88 -dnl Copyright (C) 2007-2023 Free Software Foundation, Inc. +# gnulib-common.m4 serial 88.1 +dnl Copyright (C) 2007-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -79,7 +79,7 @@ AC_DEFUN([gl_COMMON_BODY], [ #if (defined __has_attribute \ && (!defined __clang_minor__ \ || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ + ? 7000000 <= __apple_build_version__ \ : 5 <= __clang_major__))) # define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) #else -- 2.39.5