diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-05 23:44:24 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-06 00:44:20 -0700 |
commit | cf74a3953bedd79cd53057aa00f1c90019c10102 (patch) | |
tree | 8b9dde6addbefd249f81d67eb78582456ba39e45 /m4/pthread_sigmask.m4 | |
parent | 623de7351499ed8225783a69e441520a15a65a52 (diff) | |
download | gnulib-cf74a3953bedd79cd53057aa00f1c90019c10102.tar.gz |
pthread_sigmask: new module
* MODULES.html.sh (Support for systems lacking POSIX:2008): Add it.
* doc/posix-functions/pthread_sigmask.texi: Document new module.
* lib/signal.in.h (pthread_sigmask): Arrange for replacement.
This is done only as a macro; I don't know how well that'll
work for C++. Move <sys/types.h> include before the include_next,
to avoid mishap on Solaris.
* m4/signal_h.m4 (gl_SIGNAL_H, gl_SIGNAL_H_DEFAULTS): Check for it.
* modules/signal (Makefile.am): Substitute the check's results.
* modules/pthread_sigmask, m4/pthread_sigmask.m4: New files.
Diffstat (limited to 'm4/pthread_sigmask.m4')
-rw-r--r-- | m4/pthread_sigmask.m4 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4 new file mode 100644 index 0000000000..22485bd356 --- /dev/null +++ b/m4/pthread_sigmask.m4 @@ -0,0 +1,24 @@ +# pthread_sigmask.m4 serial 1 +dnl Copyright (C) 2011 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_SIGMASK], +[ + m4_ifdef([gl_THREADLIB], [ + AC_REQUIRE([gl_THREADLIB]) + if test "$gl_threads_api" = posix; then + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBMULTITHREAD" + AC_CHECK_FUNCS([pthread_sigmask]) + LIBS="$gl_save_LIBS" + fi + ], [ + AC_CHECK_FUNCS_ONCE([pthread_sigmask]) + ]) + + if test $ac_cv_func_pthread_sigmask = no; then + REPLACE_PTHREAD_SIGMASK=0 + fi +]) |