@@ -82,17 +82,17 @@ config.set('CYSIGNALS_USE_SIGSETJMP', (setjmp_saves_mask or gnulibc) ? 1 : 0)
82
82
83
83
# Check for atomic operations
84
84
# for _Atomic in C code
85
- config.set(' CYSIGNALS_C_ATOMIC' , cc.links(' static _Atomic int x;' ) ? 1 : 0 )
85
+ config.set(' CYSIGNALS_C_ATOMIC' , cc.links(' int main(void) { static _Atomic int x; return 0; } ' ) ? 1 : 0 )
86
86
# for _Atomic with OpenMP in C code
87
- config.set(' CYSIGNALS_C_ATOMIC_WITH_OPENMP' , cc.links(' static _Atomic int x;' , args : [' -fopenmp' ]) ? 1 : 0 )
87
+ config.set(' CYSIGNALS_C_ATOMIC_WITH_OPENMP' , cc.links(' int main(void) { static _Atomic int x; return 0; } ' , args : [' -fopenmp' ]) ? 1 : 0 )
88
88
# for _Atomic in C++ code
89
- config.set(' CYSIGNALS_CXX_ATOMIC' , cxx.links(' static _Atomic int x;' ) ? 1 : 0 )
89
+ config.set(' CYSIGNALS_CXX_ATOMIC' , cxx.links(' int main() { static _Atomic int x; return 0; } ' ) ? 1 : 0 )
90
90
# for _Atomic with OpenMP in C++ code
91
- config.set(' CYSIGNALS_CXX_ATOMIC_WITH_OPENMP' , cxx.links(' static _Atomic int x;' , args : [' -fopenmp' ]) ? 1 : 0 )
91
+ config.set(' CYSIGNALS_CXX_ATOMIC_WITH_OPENMP' , cxx.links(' int main() { static _Atomic int x; return 0; } ' , args : [' -fopenmp' ]) ? 1 : 0 )
92
92
# for std::atomic in C++ code
93
- config.set(' CYSIGNALS_STD_ATOMIC' , cxx.links(' #include <atomic>\n static std::atomic<int> x;' ) ? 1 : 0 )
93
+ config.set(' CYSIGNALS_STD_ATOMIC' , cxx.links(' #include <atomic>\n int main() { static std::atomic<int> x; return 0; } ' ) ? 1 : 0 )
94
94
# for std::atomic with OpenMP in C++ code
95
- config.set(' CYSIGNALS_STD_ATOMIC_WITH_OPENMP' , cxx.links(' #include <atomic>\n static std::atomic<int> x;' , args : [' -fopenmp' ]) ? 1 : 0 )
95
+ config.set(' CYSIGNALS_STD_ATOMIC_WITH_OPENMP' , cxx.links(' #include <atomic>\n int main() { static std::atomic<int> x; return 0; } ' , args : [' -fopenmp' ]) ? 1 : 0 )
96
96
97
97
if is_windows
98
98
threads_dep = []
0 commit comments