diff options
author | Bruno Haible <bruno@clisp.org> | 2019-06-20 04:02:52 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-06-20 04:02:52 +0200 |
commit | 145e16d89f89e000ff6a4f1892b17e34560f9e96 (patch) | |
tree | 069f90958e8fb245aa28056b5d266a2827042aa6 /modules/pthread | |
parent | 79c2545308000d2120009a76bea4f36f06f16b1b (diff) | |
download | gnulib-145e16d89f89e000ff6a4f1892b17e34560f9e96.tar.gz |
pthread_mutex_timedlock: New module.
* lib/pthread.in.h (pthread_mutex_timedlock): New dummy function and
new declaration.
* lib/pthread_mutex_timedlock.c: New file.
* m4/pthread_mutex_timedlock.m4: New file.
* m4/pthread.m4 (gl_PTHREAD_CHECK): Don't call AC_LIBOBJ here. Test
whether pthread_mutex_timedlock is declared.
(gl_PTHREAD_MODULE_INDICATOR): New macro.
(gl_PTHREAD_DEFAULTS): Initialize GNULIB_PTHREAD_MUTEX_TIMEDLOCK,
HAVE_PTHREAD_MUTEX_TIMEDLOCK.
* modules/pthread (configure.ac): Call AC_LIBOBJ here.
(Makefile.am): Substitute GNULIB_PTHREAD_MUTEX_TIMEDLOCK,
HAVE_PTHREAD_MUTEX_TIMEDLOCK.
* modules/pthread_mutex_timedlock: New file.
* doc/posix-functions/pthread_mutex_timedlock.texi: Mention the new
module.
Diffstat (limited to 'modules/pthread')
-rw-r--r-- | modules/pthread | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/pthread b/modules/pthread index 3fb39208ab..81e2aad384 100644 --- a/modules/pthread +++ b/modules/pthread @@ -18,6 +18,9 @@ AC_DEFINE([_THREAD_SAFE], 1, [For thread-safety on AIX, FreeBSD.]) configure.ac: gl_PTHREAD_CHECK +if test $HAVE_PTHREAD_H = 0 || test $HAVE_PTHREAD_T = 0 || test $HAVE_PTHREAD_SPINLOCK_T = 0; then + AC_LIBOBJ([pthread]) +fi gl_MODULE_INDICATOR([pthread]) Makefile.am: @@ -35,8 +38,10 @@ pthread.h: pthread.in.h $(top_builddir)/config.status -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_PTHREAD_H''@|$(NEXT_PTHREAD_H)|g' \ + -e 's/@''GNULIB_PTHREAD_MUTEX_TIMEDLOCK''@/$(GNULIB_PTHREAD_MUTEX_TIMEDLOCK)/g' \ -e 's|@''HAVE_PTHREAD_T''@|$(HAVE_PTHREAD_T)|g' \ -e 's|@''HAVE_PTHREAD_SPINLOCK_T''@|$(HAVE_PTHREAD_SPINLOCK_T)|g' \ + -e 's|@''HAVE_PTHREAD_MUTEX_TIMEDLOCK''@|$(HAVE_PTHREAD_MUTEX_TIMEDLOCK)|g' \ < $(srcdir)/pthread.in.h; \ } > $@-t && \ mv $@-t $@ |