Skip to content

Commit 9435604

Browse files
committed
.
1 parent e5bb578 commit 9435604

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

configure

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,10 +2412,18 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24122412
/* end confdefs.h. */
24132413
24142414
#include <atomic>
2415-
std::atomic<int> x{0};
2415+
#include <cstdint>
2416+
std::atomic<std::uint64_t> x1{0};
2417+
std::atomic<std::uint8_t> x2{0};
2418+
std::atomic<char*> x3{nullptr};
2419+
std::atomic<bool> x4{false};
24162420
int main() {
2417-
x.fetch_add(1);
2418-
return 0;
2421+
x1.fetch_add(1);
2422+
x2.fetch_add(1);
2423+
char temp = 'a';
2424+
x3.store(&temp);
2425+
x4.store(true);
2426+
return 0;
24192427
}
24202428
24212429
_ACEOF

configure.ac

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,18 @@ echo $(($MAJOR*100000+$MINOR*100+$RELEASE))
6363
# Check if simple C++ program using atomic header can compile using AC_COMPILE_IFELSE
6464
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
6565
#include <atomic>
66-
std::atomic<int> x{0};
66+
#include <cstdint>
67+
std::atomic<std::uint64_t> x1{0};
68+
std::atomic<std::uint8_t> x2{0};
69+
std::atomic<char*> x3{nullptr};
70+
std::atomic<bool> x4{false};
6771
int main() {
68-
x.fetch_add(1);
69-
return 0;
72+
x1.fetch_add(1);
73+
x2.fetch_add(1);
74+
char temp = 'a';
75+
x3.store(&temp);
76+
x4.store(true);
77+
return 0;
7078
}
7179
]])], [NEED_LIBATOMIC="no"], [NEED_LIBATOMIC="yes"])
7280

0 commit comments

Comments
 (0)