3 dnl Copyright (C) 2019-2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 AC_DEFUN([gl_PTHREAD_TSS],
10 AC_REQUIRE([gl_PTHREAD_H])
11 AC_REQUIRE([AC_CANONICAL_HOST])
13 if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \
14 && test $gl_threads_api = windows; then
15 dnl Choose function names that don't conflict with the mingw-w64 winpthreads
17 REPLACE_PTHREAD_KEY_CREATE=1
18 REPLACE_PTHREAD_SETSPECIFIC=1
19 REPLACE_PTHREAD_GETSPECIFIC=1
20 REPLACE_PTHREAD_KEY_DELETE=1
22 if test $HAVE_PTHREAD_H = 0; then
23 HAVE_PTHREAD_KEY_CREATE=0
24 HAVE_PTHREAD_SETSPECIFIC=0
25 HAVE_PTHREAD_GETSPECIFIC=0
26 HAVE_PTHREAD_KEY_DELETE=0