From c4dfb94e98a25b5d10963922def6043e67807198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Fri, 24 May 2024 11:53:51 +0200 Subject: [PATCH] Use GNUC atomics from GCC 4.9 GCC began to offer full support for the C11 standard starting with version 4.9, including support for the _Atomic keyword. https://gcc.gnu.org/gcc-4.9/changes.html --- freebsd/sys/cdefs.h | 2 +- freebsd/sys/stdatomic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freebsd/sys/cdefs.h b/freebsd/sys/cdefs.h index daf1a4d6e..d185ba1c0 100644 --- a/freebsd/sys/cdefs.h +++ b/freebsd/sys/cdefs.h @@ -264,7 +264,7 @@ #endif #if !defined(__cplusplus) && !__has_extension(c_atomic) && \ - !__has_extension(cxx_atomic) && !__GNUC_PREREQ__(4, 7) + !__has_extension(cxx_atomic) && !__GNUC_PREREQ__(4, 9) /* * No native support for _Atomic(). Place object in structure to prevent * most forms of direct non-atomic access. diff --git a/freebsd/sys/stdatomic.h b/freebsd/sys/stdatomic.h index 614e03293..2b74da0f6 100644 --- a/freebsd/sys/stdatomic.h +++ b/freebsd/sys/stdatomic.h @@ -37,7 +37,7 @@ #if defined(__clang__) && (__has_extension(c_atomic) || __has_extension(cxx_atomic)) #define __CLANG_ATOMICS -#elif __GNUC_PREREQ__(4, 7) +#elif __GNUC_PREREQ__(4, 9) #define __GNUC_ATOMICS #elif defined(__GNUC__) #define __SYNC_ATOMICS