diff options
author | Bruno Haible <bruno@clisp.org> | 2019-07-15 02:41:00 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-07-15 02:41:00 +0200 |
commit | 672c3be2f4c01f3b446ac3588bfde2eb6fd6ccea (patch) | |
tree | 84f62f62eec57eeb4236d6f1ab6313dda0ea2fb9 /m4 | |
parent | e08989ca11a13c8a09cb0c34f797af5a40753379 (diff) | |
download | gnulib-672c3be2f4c01f3b446ac3588bfde2eb6fd6ccea.tar.gz |
pthread-tss: New module.
* lib/pthread-tss.c: New file.
* m4/pthread-tss.m4: New file.
* modules/pthread-tss: New file.
* doc/posix-functions/pthread_key_create.texi: Mention the new module.
* doc/posix-functions/pthread_setspecific.texi: Likewise.
* doc/posix-functions/pthread_getspecific.texi: Likewise.
* doc/posix-functions/pthread_key_delete.texi: Likewise.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/pthread-tss.m4 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/m4/pthread-tss.m4 b/m4/pthread-tss.m4 new file mode 100644 index 0000000000..6ab5247f4a --- /dev/null +++ b/m4/pthread-tss.m4 @@ -0,0 +1,28 @@ +# pthread-tss.m4 serial 1 +dnl Copyright (C) 2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_PTHREAD_TSS], +[ + AC_REQUIRE([gl_PTHREAD_H]) + AC_REQUIRE([AC_CANONICAL_HOST]) + + if { case "$host_os" in mingw*) true;; *) false;; esac; } \ + && test $gl_threads_api = windows; then + dnl Choose function names that don't conflict with the mingw-w64 winpthreads + dnl library. + REPLACE_PTHREAD_KEY_CREATE=1 + REPLACE_PTHREAD_SETSPECIFIC=1 + REPLACE_PTHREAD_GETSPECIFIC=1 + REPLACE_PTHREAD_KEY_DELETE=1 + else + if test $HAVE_PTHREAD_H = 0; then + HAVE_PTHREAD_KEY_CREATE=0 + HAVE_PTHREAD_SETSPECIFIC=0 + HAVE_PTHREAD_GETSPECIFIC=0 + HAVE_PTHREAD_KEY_DELETE=0 + fi + fi +]) |