| ... |
... |
@@ -7,7 +7,7 @@ AC_DEFUN([FP_CC_SUPPORTS__ATOMICS], |
|
7
|
7
|
AC_MSG_CHECKING([whether C compiler supports C11 atomics])
|
|
8
|
8
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
|
9
|
9
|
[[#include <stdatomic.h>
|
|
10
|
|
- int x;]],
|
|
|
10
|
+ _Atomic int x;]],
|
|
11
|
11
|
[[atomic_load(&x); return x;]])],
|
|
12
|
12
|
[
|
|
13
|
13
|
AC_MSG_RESULT(yes)
|
| ... |
... |
@@ -16,7 +16,7 @@ AC_DEFUN([FP_CC_SUPPORTS__ATOMICS], |
|
16
|
16
|
AC_MSG_CHECKING(whether -latomic is needed for sub-word-sized atomic operations)
|
|
17
|
17
|
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
|
18
|
18
|
[[#include <stdatomic.h>
|
|
19
|
|
- unsigned char a;]],
|
|
|
19
|
+ _Atomic unsigned char a;]],
|
|
20
|
20
|
[[atomic_fetch_or_explicit(&a, 1, memory_order_relaxed);]])],
|
|
21
|
21
|
[
|
|
22
|
22
|
AC_MSG_RESULT(no)
|
| ... |
... |
@@ -26,7 +26,7 @@ AC_DEFUN([FP_CC_SUPPORTS__ATOMICS], |
|
26
|
26
|
LIBS="-latomic"
|
|
27
|
27
|
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
|
28
|
28
|
[[#include <stdatomic.h>
|
|
29
|
|
- unsigned char a;]],
|
|
|
29
|
+ _Atomic unsigned char a;]],
|
|
30
|
30
|
[[atomic_fetch_or_explicit(&a, 1, memory_order_relaxed);]])],
|
|
31
|
31
|
[
|
|
32
|
32
|
AC_MSG_RESULT(yes)
|
| ... |
... |
@@ -43,7 +43,7 @@ AC_DEFUN([FP_CC_SUPPORTS__ATOMICS], |
|
43
|
43
|
[[
|
|
44
|
44
|
#include <inttypes.h>
|
|
45
|
45
|
#include <stdatomic.h>
|
|
46
|
|
- uint64_t a;
|
|
|
46
|
+ _Atomic uint64_t a;
|
|
47
|
47
|
]], [[atomic_fetch_or_explicit(&a, 1, memory_order_relaxed);]])],
|
|
48
|
48
|
[
|
|
49
|
49
|
AC_MSG_RESULT(no)
|
| ... |
... |
@@ -55,7 +55,7 @@ AC_DEFUN([FP_CC_SUPPORTS__ATOMICS], |
|
55
|
55
|
[[
|
|
56
|
56
|
#include <inttypes.h>
|
|
57
|
57
|
#include <stdatomic.h>
|
|
58
|
|
- uint64_t a;
|
|
|
58
|
+ _Atomic uint64_t a;
|
|
59
|
59
|
]], [[atomic_fetch_or_explicit(&a, 1, memory_order_relaxed);]])],
|
|
60
|
60
|
[
|
|
61
|
61
|
AC_MSG_RESULT(yes)
|