diff options
author | Masayuki Yamamoto <ma3yuki.8mamo10@gmail.com> | 2017-10-06 10:41:34 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2017-10-06 10:41:34 (GMT) |
commit | 731e18901484c75b60167a06a0ba0719a6d4827d (patch) | |
tree | fc9b8afc6eb8453729c130a146b838228ab103c6 /configure.ac | |
parent | b8ab9d3fc816f85f4d6dbef12b7414e6dc10e4dd (diff) | |
download | cpython-731e18901484c75b60167a06a0ba0719a6d4827d.zip cpython-731e18901484c75b60167a06a0ba0719a6d4827d.tar.gz cpython-731e18901484c75b60167a06a0ba0719a6d4827d.tar.bz2 |
bpo-25658: Implement PEP 539 for Thread Specific Storage (TSS) API (GH-1362)
See PEP 539 for details.
Highlights of changes:
- Add Thread Specific Storage (TSS) API
- Document the Thread Local Storage (TLS) API as deprecated
- Update code that used TLS API to use TSS API
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b562fe4..a3114be 100644 --- a/configure.ac +++ b/configure.ac @@ -2263,6 +2263,25 @@ if test "$have_pthread_t" = yes ; then #endif ]) fi + +# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int. +# This checking will be unnecessary after removing deprecated TLS API. +AC_CHECK_SIZEOF(pthread_key_t, [], [[#include <pthread.h>]]) +AC_MSG_CHECKING(whether pthread_key_t is compatible with int) +if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include <pthread.h>]], [[pthread_key_t k; k * 1;]])], + [ac_pthread_key_t_is_arithmetic_type=yes], + [ac_pthread_key_t_is_arithmetic_type=no] + ) + AC_MSG_RESULT($ac_pthread_key_t_is_arithmetic_type) + if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then + AC_DEFINE(PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT, 1, + [Define if pthread_key_t is compatible with int.]) + fi +else + AC_MSG_RESULT(no) +fi CC="$ac_save_cc" AC_SUBST(OTHER_LIBTOOL_OPT) |