diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-12-13 06:28:45 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-14 19:25:05 +0800 |
commit | 1a41fc44daa03346b7bae5bd12a281116275d836 (patch) | |
tree | e51fd90a34d8eefa15f747d7ad3908cff4d2d0e3 | |
parent | 9856784b6ab9d8bbb1c2aecf3eeb21a5ddf2c2e9 (diff) | |
download | glibc-1a41fc44daa03346b7bae5bd12a281116275d836.zip glibc-1a41fc44daa03346b7bae5bd12a281116275d836.tar.gz glibc-1a41fc44daa03346b7bae5bd12a281116275d836.tar.bz2 |
tst-minsigstksz-1.c: Return EXIT_UNSUPPORTED for GCC 4.9 or older
Since ATOMIC_INT_LOCK_FREE in GCC 4.9 is defined as
#define ATOMIC_INT_LOCK_FREE \
__atomic_type_lock_free (atomic_int)
GCC 4.9 fails to compile tst-minsigstksz-1.c:
tst-minsigstksz-1.c:45:6: error: missing binary operator before token "("
# if ATOMIC_INT_LOCK_FREE != 2
^
Change tst-minsigstksz-1.c to define TEST_ATOMIC_OPS to 0 for GCC 4.9 or
older.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
-rw-r--r-- | signal/tst-minsigstksz-1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/signal/tst-minsigstksz-1.c b/signal/tst-minsigstksz-1.c index edd165a..0e068e3 100644 --- a/signal/tst-minsigstksz-1.c +++ b/signal/tst-minsigstksz-1.c @@ -38,7 +38,7 @@ /* We do not try to test atomic operations exhaustively, only a simple atomic counter increment. This is only safe if atomic_[u]int is unconditionally lock-free. */ -#ifdef __STDC_NO_ATOMICS__ +#if defined __STDC_NO_ATOMICS__ || !__GNUC_PREREQ (5, 0) # define TEST_ATOMIC_OPS 0 #else # include <stdatomic.h> |