From 2411648c46c9375c844522a1708fa730203d6b03 Mon Sep 17 00:00:00 2001 From: ChuanGang Jiang Date: Mon, 13 Feb 2023 13:35:43 +0100 Subject: [PATCH] hamt: Detect GCC version correctly. * lib/hamt.h:Use __GNUC_MINOR__, not __GNUC_MINOR. --- ChangeLog | 5 +++++ lib/hamt.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1e28b4ae97..fe1b99629f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2023-02-13 ChuanGang Jiang (tiny change) + + hamt: Detect GCC version correctly. + * lib/hamt.h:Use __GNUC_MINOR__, not __GNUC_MINOR. + 2023-02-11 Bruno Haible terminfo, termcap: Avoid wrong configure result with clang ≥ 15. diff --git a/lib/hamt.h b/lib/hamt.h index d685bb6ee7..7a85e2ef6d 100644 --- a/lib/hamt.h +++ b/lib/hamt.h @@ -1,5 +1,5 @@ /* (Persistent) hash array mapped tries. - Copyright (C) 2021-2022 Free Software Foundation, Inc. + Copyright (C) 2021-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -60,7 +60,7 @@ _GL_INLINE_HEADER_BEGIN We can define it only when the compiler supports _Atomic. For GCC, it is supported starting with GCC 4.9. */ -#if (__GNUC__ + (__GNUC_MINOR >= 9) > 4) \ +#if (__GNUC__ + (__GNUC_MINOR__ >= 9) > 4) \ && __STDC_VERSION__ >= 201112L && !defined __STD_NO_ATOMICS__ \ && !defined __cplusplus # define GL_HAMT_THREAD_SAFE 1 -- 2.39.5