summaryrefslogtreecommitdiff
path: root/m4/pthread_sigmask.m4
Commit message (Collapse)AuthorAgeFilesLines
* pthread_sigmask: Rename LIB_PTHREAD_SIGMASK to PTHREAD_SIGMASK_LIB.Bruno Haible2023-01-071-6/+9
| | | | | | | * m4/pthread_sigmask.m4: Rename LIB_PTHREAD_SIGMASK to PTHREAD_SIGMASK_LIB. All uses changed. * NEWS: Mention the change.
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* Prefer "kill -INT" to killing with a numberPaul Eggert2022-11-261-2/+5
| | | | | | | | | * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): * tests/test-login_tty.c (main): * tests/test-pthread_sigmask1.c (main): * tests/test-sigprocmask.c (main): Prefer "kill -INT" to "kill -N" where N is SIGINT’s value. Don’t assume pid_t fits in int.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* doc: Update for FreeBSD 11.0, 12.0, 13.0.Bruno Haible2021-04-171-2/+2
| | | | | | | | | * doc/posix-headers/*.texi: Update. * doc/glibc-headers/*.texi: Update. * doc/posix-functions/*.texi: Likewise. * doc/pastposix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise. * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Update cross-compilation guess.
* pthread_sigmask: Document MidnightBSD bug.Bruno Haible2021-02-071-5/+5
| | | | | | | * doc/posix-functions/pthread_sigmask.texi: Mention MidnightBSD as an affected platform. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Update cross-compilation guess accordingly.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* Support compiling without -loldnames on native Windows.Bruno Haible2020-08-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/gnulib-common.m4 (GL_MDA_DEFINES, _GL_MDA_DEFINES): New macros. * m4/chown.m4 (AC_FUNC_CHOWN): In the test programs, use GL_MDA_DEFINES. (gl_FUNC_CHOWN, gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Likewise. * m4/dup.m4 (gl_FUNC_DUP): Likewise. * m4/dup2.m4 (gl_FUNC_DUP2): Likewise. * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise. * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Likewise. * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Likewise. * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise. * m4/fcntl.m4 (gl_FUNC_FCNTL): Likewise. * m4/fdopen.m4 (gl_FUNC_FDOPEN): Likewise. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise. * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Likewise. * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Likewise. * m4/freopen.m4 (gl_FUNC_FREOPEN): Likewise. * m4/futimens.m4 (gl_FUNC_FUTIMENS): Likewise. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise. * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise. * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL, gl_FUNC_GETCWD_SIGNATURE): Likewise. * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Likewise. * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise. * m4/lseek.m4 (gl_FUNC_LSEEK): Likewise. * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise. * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise. * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise. * m4/open-slash.m4 (gl_OPEN_TRAILING_SLASH_BUG): Likewise. * m4/poll.m4 (gl_FUNC_POLL): Likewise. * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Likewise. * m4/pread.m4 (gl_FUNC_PREAD): Likewise. * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Likewise. * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise. * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise. * m4/pwrite.m4 (gl_FUNC_PWRITE): Likewise. * m4/rename.m4 (gl_FUNC_RENAME): Likewise. * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise. * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise. * m4/select.m4 (gl_FUNC_SELECT): Likewise. * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise. * m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise. * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise. * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise. * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise. * m4/utimens.m4 (gl_UTIMENS): Likewise. * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise. * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise. * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): On native Windows, don't test for getcwd. * m4/utime.m4 (gl_FUNC_UTIME): On native Windows, don't test for utime. * m4/wcsdup.m4 (gl_FUNC_WCSDUP): To test for wcsdup, use a test program with GL_MDA_DEFINES. * lib/c++defs.h (_GL_CXXALIAS_MDA): New macro. * lib/fcntl.in.h (creat, open): On native Windows, use the underscore- prefixed symbol. * lib/search.in.h (lfind, lsearch): Likewise. * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam): Likewise. * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise. * lib/string.in.h (memccpy, strdup): Likewise. * lib/sys_stat.in.h (chmod, umask): Likewise. * lib/time.in.h (tzset): Likewise. * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle, execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek, read, rmdir, swab, unlink, write): Likewise. * lib/utime.in.h (utime): Likewise. * lib/wchar.in.h (wcsdup): Likewise. * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise. (isfinite, isinf, isnan, signbit): On native Windows, don't define as an rpl_-prefixed macro. * lib/canonicalize-lgpl.c (__getcwd): On native Windows, use _getcwd. * lib/close.c (close_nothrow): On native Windows, use _close. * lib/creat.c (orig_creat): On native Windows, use _creat. * lib/dup.c (dup_nothrow): On native Windows, use _dup. * lib/dup2.c (dup2_nothrow): Use _dup2. * lib/fdopen.c (fdopen_nothrow): On native Windows, use _fdopen. * lib/getcwd-lgpl.c: On native Windows, use _getcwd. * lib/getcwd.c (getcwd_nothrow): Use _getcwd also on mingw. * lib/open.c (orig_open): On native Windows, use _open. * lib/read.c (read_nothrow): Use _read. * lib/rmdir.c: On native Windows, use _rmdir. * lib/unlink.c: On native Windows, use _unlink. * lib/write.c (write_nothrow): Use _write. * lib/sys_select.in.h (close): With clang, don't attach a warning on an undefined symbol. * lib/sys_socket.in.h (close): Likewise. * lib/sys_time.in.h (close): Likewise. * tests/test-spawn-pipe-child.c: On native Windows, use _fdopen.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* thread, lock, cond, tls: Remove support for Pth threads.Bruno Haible2019-07-061-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Don't document --enable-threads=pth any more. (gl_THREADLIB_BODY): Don't set USE_PTH_THREADS any more. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Update comment. * m4/threads.m4 (gl_THREADS_H): Remove test for conflict between Pth threads and ISO C11 threads. * lib/glthread/thread.h: Remove code for USE_PTH_THREADS. * lib/glthread/lock.h: Likewise. * lib/glthread/lock.c: Likewise. * lib/glthread/cond.h: Likewise. * lib/glthread/cond.c: Likewise. * lib/glthread/tls.h: Likewise. * lib/glthread/tls.c: Likewise. * lib/glthread/yield.h: Likewise. * lib/regex_internal.h: Likewise. * tests/test-thread_create.c: Likewise. * tests/test-lock.c: Likewise. * tests/test-cond.c: Likewise. * tests/test-tls.c: Likewise. * tests/test-rwlock1.c: Don't include glthread/yield.h. (main): Sleep without calling gl_thread_yield.
* pthread_sigmask: Fix compilation error with --enable-threads=windows.Bruno Haible2019-05-181-71/+69
| | | | | | | | | | | | Reported by Tim Rühsen in <https://lists.gnu.org/archive/html/bug-gnulib/2018-01/msg00018.html> and Michele Locati in <https://lists.gnu.org/archive/html/bug-gettext/2019-04/msg00057.html>. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Revert change from 2015-06-01. Test whether pthread_sigmask is a macro, regardless of $LIBMULTITHREAD. Consider it regardless whether module 'threadlib' is in use and regardless which threads API is chosen.
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* Continue to use spaces for indentation, not tabs.Bruno Haible2018-06-251-35/+35
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* pthread_sigmask: discount system version if a simple macroPavel Fedin2015-06-011-1/+25
| | | | | | | MinGW64 has: #define pthread_sigmask(H, S1, S2) 0 * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Call the function to ensure it's available.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* pthread, pthread_sigmask, threadlib: port to Ubuntu 14.04Paul Eggert2014-09-041-3/+4
| | | | | | | | | | | | | | Problem reported by Assaf Gordon in: http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html Apparently Ubuntu is doing some fancy link-time optimization that doesn't work with -lpthread but does work with -pthread. Work around the bug by preferring -pthread to -lpthread. This change affects only LIBS, not CFLAGS, which is a little weird, but it works. * m4/pthread.m4 (gl_PTHREAD_CHECK): * m4/threadlib.m4 (gl_THREADLIB_BODY): Prefer -pthread to -lpthread. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Treat -pthread like -lpthread.
* pthread_sigmask, timer-time: use gl_THREADLIB only if neededPaul Eggert2014-05-281-40/+45
| | | | | | | | | | | | | Without this fix, Emacs would sometimes call sigprocmask instead of pthread_sigmask, which is a no-no in multithreaded applications. Problem reported by Jorgen Schaefer in <http://bugs.gnu.org/17561>. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Suppress check for pthread_sigmask working without -lpthread if the application always links with -lpthread. Do not link with $LIBMULTITHREAD if gl_THREADLIB is not defined. * m4/timer_time.m4 (gl_TIMER_TIME): Require gl_THREADLIB only if it is defined. Do not append $LIBMULTITHREAD to LIB_TIMER_TIME if gl_THREADLIB is not defined.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* Ensure that HAVE_* variables are set to 1 before they are set to 0.Bruno Haible2011-10-091-1/+3
| | | | | | | | * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Require gl_DIRENT_H_DEFAULTS. * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Require gl_ARPA_INET_H_DEFAULTS. * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Require gl_SIGNAL_H_DEFAULTS.
* pthread_sigmask: Actually use results of gl_THREADLIB.Bruno Haible2011-08-031-3/+3
| | | | | | * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test and require gl_THREADLIB, not gl_[]THREADLIB. Reported by Eric Blake.
* pthread_sigmask: assume POSIX threads if --avoid=threadlibPaul Eggert2011-07-201-37/+62
| | | | | | * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): If gl_THREADLIB is not defined, assume POSIX threads and look for pthread_sigmask in $LIBS, without changing $CPPFLAGS.
* pthread_sigmask: Rely on module 'threadlib'.Bruno Haible2011-07-121-54/+40
| | | | | | * modules/pthread_sigmask (Depends-on): Add threadlib. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Assume gl_THREADLIB is defined.
* pthread_sigmask: Work around IRIX bug.Bruno Haible2011-07-091-3/+67
| | | | | | | | * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the IRIX bug. * lib/pthread_sigmask.c (pthread_sigmask): usleep for some time when there may be unblocked pending signals. * doc/posix-functions/pthread_sigmask.texi: Mention the IRIX bug.
* pthread_sigmask: Work around Cygwin bug.Bruno Haible2011-07-091-0/+40
| | | | | | | | * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the Cygwin bug. * lib/pthread_sigmask.c (pthread_sigmask): Fix the return value from the system's pthread_sigmask function. * doc/posix-functions/pthread_sigmask.texi: Mention the Cygwin bug.
* pthread_sigmask: Work around bug in single-threaded implementation.Bruno Haible2011-07-091-1/+56
| | | | | | | | | | | | | * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the FreeBSD, HP-UX, Solaris bug. (gl_PREREQ_PTHREAD_SIGMASK): New macro. * lib/pthread_sigmask.c: Include <stddef.h>. (pthread_sigmask): If HAVE_PTHREAD_SIGMASK, define as a wrapper around the system's pthread_sigmask function. * modules/pthread_sigmask (configure.ac): Invoke gl_PREREQ_PTHREAD_SIGMASK. * doc/posix-functions/pthread_sigmask.texi: Mention bug on FreeBSD, HP-UX, Solaris.
* pthread_sigmask: Assume POSIX when not gl_THREADLIB.Paul Eggert2011-07-081-7/+12
| | | | | | | | * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): When gl_THREADLIB is not in use, assume that the POSIX sematics are desired. This is better for Emacs, which uses POSIX semantics on GNUish and/or POSIXish platforms, and does not use threads at all otherwise.
* pthread_sigmask: fix typo when testing for librariesPaul Eggert2011-07-081-2/+2
| | | | | * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): AC_LINK_IFELSE, not AC_COMPILE_IFELSE.
* pthread_sigmask: Fix link requirements on OSF/1 5.1 and with pth.Bruno Haible2011-07-081-12/+58
| | | | | | | | | | | | * lib/signal.in.h (pthread_sigmask): Override if REPLACE_PTHREAD_SIGMASK is 1. * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize REPLACE_PTHREAD_SIGMASK. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Set also REPLACE_PTHREAD_SIGMASK. Set and substitute LIB_PTHREAD_SIGMASK. * modules/signal (Makefile.am): Substitute REPLACE_PTHREAD_SIGMASK. * modules/pthread_sigmask (Depends-on, configure.ac): Update condition. (Link): Set to $(LIB_PTHREAD_SIGMASK), not $(LIBMULTITHREAD).
* pthread_sigmask: Follow gnulib conventions.Bruno Haible2011-07-081-2/+2
| | | | | | * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Renamed from gl_PTHREAD_SIGMASK. * modules/pthread_sigmask (configure.ac): Update.
* pthread_sigmask: Make declaration C++ safe.Bruno Haible2011-07-081-2/+2
| | | | | | | | | | | | | * lib/signal.in.h: In two special conditions, just do an #include_next. (pthread_sigmask): Test HAVE_PTHREAD_SIGMASK, not REPLACE_PTHREAD_MASK. Invoke _GL_CXXALIAS_SYS and _GL_CXXALIASWARN. * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize HAVE_PTHREAD_SIGMASK, not REPLACE_PTHREAD_MASK. * m4/pthread_sigmask.m4 (gl_PTHREAD_SIGMASK): Set HAVE_PTHREAD_SIGMASK, not REPLACE_PTHREAD_MASK. * modules/signal (Makefile.am): Substitute HAVE_PTHREAD_SIGMASK, not REPLACE_PTHREAD_MASK. * modules/pthread_sigmask (Depends-on, configure.ac): Update condition.
* pthread_sigmask: always replace when not using pthreadEric Blake2011-07-061-2/+4
| | | | | | | | | | | On mingw, when using win32 threading, the pthread_sigmask replacement function was not being installed. * m4/pthread_sigmask.m4 (gl_PTHREAD_SIGMASK): Force sigprocmask replacement when using some threading other than pthread. Fix logic bug. Signed-off-by: Eric Blake <eblake@redhat.com>
* pthread_sigmask: new modulePaul Eggert2011-07-061-0/+24
* 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.