Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix stdatomic.h header check for ICC compiler: the ICC implementation lacks
atomic_uintptr_t type which is needed by Python.
7 changes: 5 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -16849,9 +16849,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext


#include <stdatomic.h>
atomic_int value = ATOMIC_VAR_INIT(1);
atomic_int int_var;
atomic_uintptr_t uintptr_var;
int main() {
int loaded_value = atomic_load(&value);
atomic_store_explicit(&int_var, 5, memory_order_relaxed);
atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
return 0;
}

Expand Down
9 changes: 6 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5492,9 +5492,12 @@ AC_LINK_IFELSE(
[
AC_LANG_SOURCE([[
#include <stdatomic.h>
atomic_int value = ATOMIC_VAR_INIT(1);
atomic_int int_var;
atomic_uintptr_t uintptr_var;
int main() {
int loaded_value = atomic_load(&value);
atomic_store_explicit(&int_var, 5, memory_order_relaxed);
atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
return 0;
}
]])
Expand All @@ -5504,7 +5507,7 @@ AC_MSG_RESULT($have_stdatomic_h)

if test "$have_stdatomic_h" = yes; then
AC_DEFINE(HAVE_STD_ATOMIC, 1,
[Has stdatomic.h with atomic_int])
[Has stdatomic.h with atomic_int and atomic_uintptr_t])
fi

# Check for GCC >= 4.7 __atomic builtins
Expand Down
2 changes: 1 addition & 1 deletion pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H

/* Has stdatomic.h with atomic_int */
/* Has stdatomic.h with atomic_int and atomic_uintptr_t */
#undef HAVE_STD_ATOMIC

/* Define to 1 if you have the `strdup' function. */
Expand Down