Log

Author Commit Date CI Message
Bruno Haible 33fb97d1 2019-07-06T07:03:06 doc: Remove documentation of OSF/1 as supported platform. * doc/gnulib-intro.texi (Target Platforms): Mention that OSF/1 is unsupported. * doc/glibc-functions/getdomainname.texi: Don't mention OSF/1 specific workarounds. * doc/glibc-functions/pthread_setname_np.texi: Likewise. * doc/glibc-functions/ptsname_r.texi: Likewise. * doc/posix-functions/ceil.texi: Likewise. * doc/posix-functions/ceilf.texi: Likewise. * doc/posix-functions/ceill.texi: Likewise. * doc/posix-functions/fchdir.texi: Likewise. * doc/posix-functions/floor.texi: Likewise. * doc/posix-functions/floorf.texi: Likewise. * doc/posix-functions/fmod.texi: Likewise. * doc/posix-functions/fmodf.texi: Likewise. * doc/posix-functions/fmodl.texi: Likewise. * doc/posix-functions/log.texi: Likewise. * doc/posix-functions/logf.texi: Likewise. * doc/posix-functions/logl.texi: Likewise. * doc/posix-functions/log10.texi: Likewise. * doc/posix-functions/log10f.texi: Likewise. * doc/posix-functions/log10l.texi: Likewise. * doc/posix-functions/log2.texi: Likewise. * doc/posix-functions/log2f.texi: Likewise. * doc/posix-functions/log2l.texi: Likewise. * doc/posix-functions/mbrtowc.texi: Likewise. * doc/posix-functions/recv.texi: Likewise. * doc/posix-functions/recvfrom.texi: Likewise. * doc/posix-functions/remainder.texi: Likewise. * doc/posix-functions/remainderf.texi: Likewise. * doc/posix-functions/remainderl.texi: Likewise. * doc/posix-functions/round.texi: Likewise. * doc/posix-functions/roundf.texi: Likewise. * doc/posix-functions/roundl.texi: Likewise. * doc/posix-functions/send.texi: Likewise. * doc/posix-functions/sendto.texi: Likewise. * doc/posix-functions/setenv.texi: Likewise. * doc/posix-functions/snprintf.texi: Likewise. * doc/posix-functions/tcgetsid.texi: Likewise. * doc/posix-functions/trunc.texi: Likewise. * doc/posix-functions/truncf.texi: Likewise. * doc/posix-functions/truncl.texi: Likewise. * doc/posix-functions/ttyname_r.texi: Likewise. * doc/posix-functions/unsetenv.texi: Likewise. * doc/posix-functions/wcsrtombs.texi: Likewise. * doc/posix-headers/sys_select.texi: Likewise. * doc/posix-headers/wchar.texi: Likewise. * doc/posix-headers/wctype.texi: Likewise. * doc/**/*.texi: Update.
Bruno Haible c3566f95 2019-07-06T06:54:32 doc: Remove documentation of Interix as a supported platform.
Bruno Haible 2dfd36ad 2019-07-06T05:16:14 doc: Remove documentation of BSDI and BSD/OS as supported platforms. * doc/**/*.texi: Update.
Bruno Haible 8f999c44 2019-07-06T05:10:53 doc: Remove documentation of Solaris 8 and older as supported platforms. * doc/gnulib-intro.texi (Target Platforms): Mention that Solaris <= 8 is unsupported. * doc/posix-functions/mbrtowc.texi: Don't mention Solaris specific workarounds. * doc/posix-functions/memcmp.texi: Likewise. * doc/posix-functions/rename.texi: Likewise. * doc/posix-functions/tzset.texi: Likewise. * doc/posix-headers/wctype.texi: Likewise. * doc/**/*.texi: Update.
Bruno Haible 9e7e46b0 2019-07-06T04:41:05 doc: Remove documentation of Interix 3.5 as a supported platform. * doc/**/*.texi: Update.
Bruno Haible a4b2403a 2019-07-06T04:35:31 doc: Remove documentation of BeOS as a supported platform. * doc/gnulib-intro.texi (Target Platforms): Mention that BeOS is unsupported. * doc/*-functions/*printf.texi: Don't mention BeOS specific workarounds. * doc/posix-functions/getdelim.texi: Likewise. * doc/**/*.texi: Update.
Bruno Haible 7ce5f5c7 2019-07-06T03:56:55 thread, lock, cond, tls: Remove support for Pth threads. * 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.
Bruno Haible e58796ff 2019-07-06T03:36:45 thread, lock, cond, tls: Remove support for old Solaris threads. Solaris >= 2.5.1 has POSIX threads. * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Don't document --enable-threads=solaris any more. (gl_THREADLIB_BODY): Don't set USE_SOLARIS_THREADS any more. * lib/glthread/thread.c: Update comment. * lib/glthread/thread.h: Remove code for USE_SOLARIS_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.
Bruno Haible d4424134 2019-07-06T00:47:12 getcwd-lgpl, getcwd: Don't call realloc when it is pointless. * lib/getcwd-lgpl.c (rpl_getcwd): Don't call realloc if the result's needed size is equal to the allocated size. * lib/getcwd.c (__getcwd): Likewise.
Bruno Haible ac7390ac 2019-07-06T00:43:59 xgetdomainname: Don't return an excessive memory allocation. * lib/xgetdomainname.c (xgetdomainname): Shrink the domainname buffer before returning it.
Bruno Haible 98802d16 2019-07-06T00:43:01 xgethostname: Don't return an excessive memory allocation. * lib/xgethostname.c (xgethostname): Shrink the hostname buffer before returning it.
Bruno Haible 8f91b5cf 2019-07-06T00:40:34 areadlinkat-with-size: Don't return an excessive memory allocation. * lib/areadlinkat-with-size.c (areadlinkat_with_size): Shrink the buffer before returning it.
Bruno Haible eb76defb 2019-07-06T00:39:07 areadlink-with-size: Don't return an excessive memory allocation. Reported by Andreas Dilger <adilger@whamcloud.com>. * lib/areadlink-with-size.c (areadlink_with_size): Shrink the buffer before returning it.
Bruno Haible d4239808 2019-07-03T02:49:27 renameatu: Fix test failure on MSVC. * lib/at-func2.c (at_func2): Fail with ENOENT if file1 or file2 is the empty string.
Karl Berry 9ce9be2e 2019-07-04T08:23:14 autoupdate
Bruno Haible d1e92798 2019-07-03T19:25:09 mbrtowc: Fix invalid use of mbtowc() on MSVC. * lib/mbrtowc.c: Include glthread/lock.h. (mbtowc_lock): New variable. (mbrtowc): Treat UTF-8 encoding without locking. For the other encodings, explicitly reset the internal state of mbtowc, and protect this through a lock. * modules/mbrtowc (Depends-on): Add lock.
Akim Demaille 65b3308b 2019-07-03T06:35:34 argmatch: don't define _ in the header Reported by Jim Meyering. * lib/argmatch.h (N_, _): Don't define. Use gettext instead. * lib/argmatch.h (_): Define. * tests/test-argmatch.c (N_): Define.
Paul Eggert c8829960 2019-07-02T16:33:04 verify: document ‘assume’ better * lib/verify.h: Reword doc (Bug#36370).
Bruno Haible ece9e261 2019-07-02T20:56:26 localcharset, nl_langinfo: Fix return value for UTF-8 locales on MSVC. * lib/localcharset.c (locale_charset): Return "UTF-8" instead of "CPutf8". * lib/nl_langinfo.c (ctype_codeset): Likewise.
Bruno Haible 3e4a348e 2019-07-02T20:43:00 getcwd: Fix crash when invoked with size = 0 on MSVC. * lib/getcwd.c: Include msvc-inval.h. (getcwd_nothrow): New function/macro. (getcwd_system): New macro. (__getcwd): Use it instead of getcwd. * modules/getcwd (Depends-on): Add msvc-inval. * doc/posix-functions/getcwd.texi: Mention the MSVC issue.
Bruno Haible 7c3bb867 2019-07-02T19:59:28 nonblocking-pipe tests: Fix test failure on MSVC. * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE): Set to 10000 on native Windows.
Bruno Haible 54d342c7 2019-07-02T19:57:03 usleep: Implement with millisecond resolution on native Windows. * lib/usleep.c (usleep): On native Windows, implement using Sleep(). * doc/pastposix-functions/usleep.texi: Update accordingly.
Bruno Haible 77dc7fb4 2019-07-02T19:48:14 lstat tests: Fix test failure on MSVC. * tests/test-lstat.h (test_lstat_func): Don't test SAME_INODE values on native Windows, unless _GL_WINDOWS_STAT_INODES is defined.
Bruno Haible 75b56a53 2019-07-02T19:44:52 stat tests: Fix test failure on MSVC. * tests/test-stat.h (test_stat_func): Don't test SAME_INODE values on native Windows, unless _GL_WINDOWS_STAT_INODES is defined.
Bruno Haible 0b40814b 2019-07-02T19:38:27 getaddrinfo tests: Fix test failure on MSVC. * tests/test-getaddrinfo.c: Include sockets.h. (main): Invoke gl_sockets_startup. * modules/getaddrinfo-tests (Depends-on): Add sockets.
Hannes Müller d40db5e2 2019-07-01T16:59:45 poll: Fix type of timeout pointer passed to select() on mingw x86_64. * lib/poll.c: Call Windows native select() with Windows native timeval.
Bruno Haible 9c2e2250 2019-06-30T21:12:42 argmatch: Fix compilation errors. * lib/argmatch.h: Include <limits.h>, for INT_MAX. * tests/test-argmatch.c (main): Update after last-minute function names change.
Karl Berry fa2256ec 2019-06-30T08:45:19 autoupdate
Bruno Haible fcd36afd 2019-06-30T16:11:08 Include <stdlib.h> when needed. * lib/cnd.c: Include <stdlib.h>, needed for abort(). * lib/fcntl.c: Likewise. * lib/mbscasestr.c: Likewise. * lib/mbssep.c: Likewise. * lib/mbsstr.c: Likewise. * lib/openat.c: Include <stdlib.h>, needed for free(). * lib/windows-tls.c: Include <stdlib.h>, needed for malloc(), free(), abort().
Bruno Haible 3712d6cd 2019-06-30T15:52:09 Include <stdlib.h> when needed. * lib/areadlinkat.c: Include <stdlib.h>, needed for free() in at-func.c. * lib/faccessat.c: Likewise. * lib/fchmodat.c: Likewise. * lib/fchownat.c: Likewise. * lib/fstatat.c: Likewise. * lib/mkfifoat.c: Likewise. * lib/mknodat.c: Likewise. * lib/readlinkat.c: Likewise. * lib/symlinkat.c: Likewise. * lib/utimensat.c: Likewise. * lib/mkdirat.c: Likewise. Include also the specification header.
Bruno Haible 8c4ec56e 2019-06-30T15:20:24 inet_ntop, inet_pton: Avoid conflict with native Windows functions. * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WS2TCPIP): New macro, extracted from gl_PREREQ_SYS_H_SOCKET. (gl_PREREQ_SYS_H_SOCKET): Invoke it. * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Invoke gl_PREREQ_SYS_H_WS2TCPIP. * modules/arpa_inet (Files): Add m4/sys_socket_h.m4, m4/socklen.m4. (Makefile.am): Substitute HAVE_WS2TCPIP_H. * lib/arpa_inet.in.h: Include <ws2tcpip.h>.
Bruno Haible 6136e937 2019-06-30T15:08:05 inet_ntop, inet_pton: Forward-compatibility with newer Windows versions. * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): On native Windows, set REPLACE_INET_NTOP to 1 always. * m4/inet_pton.m4 (gl_FUNC_INET_PTON): On native Windows, set REPLACE_INET_PTON to 1 always.
Bruno Haible 326d9f99 2019-06-30T14:54:40 inet_pton: Fix link error on mingw with _WIN32_WINNT >= 0x0600. * modules/inet_pton (Depends-on, configure.ac): Test REPLACE_INET_PTON, not REPLACE_INET_NTOP.
Bruno Haible 1d56a791 2019-06-30T14:48:50 poll: Add comment. * lib/poll.c: Add comment about WSAPoll.
Bruno Haible a734086a 2019-06-30T14:43:44 poll-h: Fix compilation error on mingw with _WIN32_WINNT >= 0x0600. Reported by Hannes Müller <h.c.f.mueller@gmx.de>. * lib/poll.in.h: Include <winsock2.h>. (POLL*, pollfd): Override on native Windows. * m4/poll_h.m4 (gl_POLL_H): Invoke gl_PREREQ_SYS_H_WINSOCK2. * modules/poll-h (Files): Add m4/sys_socket_h.m4. (Makefile.am): Substitute HAVE_WINSOCK2_H.
Bruno Haible e597d4b8 2019-06-29T02:02:10 accept4: Fix compilation error on OpenIndiana. Reported by Michal Nowak <mnowak@startmail.com> via Mark H Weaver <mhw@netris.org>. * m4/accept.m4 (gl_FUNC_ACCEPT4): Test whether accept4 is declared, not whether it exists as a function.
Karl Berry c299f3dd 2019-06-27T09:32:11 autoupdate
Paul Eggert e0d220aa 2019-06-26T12:46:32 strverscmp: sync from glibc * lib/strverscmp.c: Sync from glibc, except use UTF-8 encoding in comments, include libc-config.h, define __strverscmp to be strverscmp, and don’t assume types line uint8_t and int8_t that that C99 doesn’t guarantee. [!_LIBC]: Include libc-config.h; define __strverscmp. Include stdint.h. (__strverscmp): Assume C99. Use uint_least8_t and int_least8_t instead of unsigned char and signed char. * modules/strverscmp (Depends-on): Add libc-config, stdint.
Bruno Haible bacccb4e 2019-06-26T03:32:57 tss tests: Add tests for destructors and races. * tests/test-tss.c (worker_thread): Fix typo in debug message. (test_tss_dtorcheck1, test_tss_dtorcheck2, test_tss_racecheck): New functions. (main): Invoke them. * modules/tls-tests (Depends-on): Add mtx.
Bruno Haible d1e821c9 2019-06-26T03:32:51 tls tests: Add tests for destructors and races. * tests/test-tls.c: Include glthread/lock.h. (test_tls_dtorcheck1, test_tls_dtorcheck2, test_tls_racecheck): New functions. (main): Invoke them. * modules/tls-tests (Depends-on): Add lock.
Bruno Haible d6bfe479 2019-06-26T03:32:46 windows-tls: Implement TLS key destructors for native Windows. * lib/windows-tls.h (glwthread_tls_process_destructors): New declaration. (GLWTHREAD_DESTRUCTOR_ITERATIONS): New macro. * lib/windows-tls.c: Include <limits.h>, windows-once.h. (dtor_table_init_once, dtor_table_lock: New variables. (struct dtor): New type. (dtor_table, dtors_count, dtors_used, dtors_allocated, dtor_processing_threads): New variables. (dtor_table_initialize, dtor_table_ensure_initialized, dtor_table_shrink_used, glwthread_tls_process_destructors): New functions. (glwthread_tls_key_create, glwthread_tls_key_delete): Rewritten to handle non-NULL destructors. * modules/windows-tls (Depends-on): Add windows-once. * lib/glthread/tls.h (glthread_tls_key_init, glthread_tls_key_destroy): Use the functions declared in windows-tls.h. * lib/threads.in.h (TSS_DTOR_ITERATIONS): Define using GLWTHREAD_DESTRUCTOR_ITERATIONS. * lib/windows-thread.c: Include windows-tls.h. (wrapper_func, glwthread_thread_exit): Invoke glwthread_tls_process_destructors. * modules/windows-thread (Depends-on): Add windows-tls.
Bruno Haible 14b8ae17 2019-06-26T03:32:42 threadlib: Avoid autoconf warning "was expanded before it was required". * modules/threadlib (configure.ac): Require gl_THREADLIB.
Akim Demaille 47405621 2019-06-25T08:11:34 argmatch: remove duplicate const qualifier * lib/argmatch.h (ARGMATCH_DEFINE_GROUP): Here.
Paul Eggert a6e8a861 2019-06-24T11:54:00 unistd: stddef.h and sys/types.h namespace cleanup * lib/unistd.in.h [__GLIBC__]: Do not include stddef.h or sys/types.h. [!__GLIBC__]: Always include sys/types.h, since unistd.h is supposed to declare off_t and ssize_t. Problem found when looking at why @GNULIB_PWRITE@ was different from the newly-added @GNULIB_COPY_FILE_RANGE@ with respect to ssize_t.
Akim Demaille 7f7d18eb 2019-06-22T17:52:16 maintainer-makefile: restore portability to non-GNU awks Reported by Tim Rühsen. * top/maint.mk (AWK): New variable. Use it. (sc_prohibit_gnu_make_extensions): Skip if $(AWK) is not gawk.
Paul Eggert 232ba923 2019-06-23T15:36:49 Document setvbuf _IOLBF problem * doc/posix-functions/setvbuf.texi (setvbuf): Document MS-Windows portability problem with _IOLBF.
Paul Eggert e0ddd076 2019-06-23T15:35:29 Document lseek SEEK_DATA/SEEK_HOLE * doc/posix-functions/lseek.texi (lseek): Document some systems that do not support SEEK_DATA and SEEK_HOLE.
Karl Berry 7ed70c55 2019-06-23T09:24:49 autoupdate
Karl Berry 66928dc8 2019-06-23T09:11:38 autoupdate
Akim Demaille 96286226 2019-06-22T08:37:31 argmatch: put all the docs member last. Reported by Bruno Haible. * lib/argmatch.h (argmatch_##Name##_group_type): Put the args member before the docs done. * doc/argmatch.texi, tests/test-argmatch.c: Adjust.
Akim Demaille 5d00a2ec 2019-04-30T08:01:14 argmatch: add support to generate the usage message * lib/argmatch.c: Move some #includes and gettext support to... * lib/argmatch.h: here. (ARGMATCH_DEFINE_GROUP): New macro. * tests/test-argmatch.c (argmatch_backup_docs, argmatch_backup_args) (argmatch_backup_group): New. (CHECK): New. (main): Check argmatch_backup_value, argmatch_backup_xvalue, argmatch_backup_argument and argmatch_backup_usage. * modules/argmatch: We depend on c99. * doc/argmatch.texi (Recognizing Option Arguments): New. * doc/gnulib.texi: Use it.
Bruno Haible 13644a81 2019-06-21T11:59:22 thrd: Add comment. * lib/thrd.c (pthread_main_func): Add comment.
Bruno Haible d1cb5add 2019-06-21T11:57:21 threads-h: Define 'thread_local' if and only if it actually works.
Bruno Haible 42b99eaf 2019-06-21T11:23:40 threads-h: Small doc correction.
Bruno Haible a12c7fd1 2019-06-21T04:35:41 threads-h: Define 'thread_local' if and only it actually works. * m4/threads.m4 (gl_THREAD_LOCAL_DEFINITION): New macro. (gl_THREADS_H): Define _Thread_local to __thread also for ARM C, IBM C, Oracle Solaris Studio C. Compile a simple program, to see whether _Thread_local basically works. Set HAVE_THREAD_LOCAL and LIBTHREADLOCAL. (gl_THREADS_H_DEFAULTS): Initialize HAVE_THREAD_LOCAL. * lib/threads.in.h (thread_local): Undefine if it does not work. * modules/threads-h (Makefile.am): Substitute HAVE_THREAD_LOCAL. (Link): Mention LIBTHREADLOCAL. * tests/test-threads.c: Don't check that thread_local is defined. * tests/test-thread_local.c: New file. * modules/threads-h-tests (Files): Add it and macros.h. (Depends-on): Add thrd and stdint. (configure.ac): Test whether 'alarm' is declared. (Makefile.am): Arrange to build and link test-thread_local. * doc/posix-headers/threads.texi: Mention the platforms that don't support 'thread_local'.
Bruno Haible b6293339 2019-06-21T03:41:35 threads-h: Simplify link dependencies. * m4/threads.m4 (gl_THREADS_H): Bail out if Pth threading is requested. Don't set LTLIBSTDTHREAD. * modules/thrd (Link): Simplify accordingly. * modules/mtx (Link): Likewise. * modules/cnd (Link): Likewise. * modules/tss (Link): Likewise. * modules/threads (Link): Likewise.
Bruno Haible 9e6e4c03 2019-06-21T02:57:46 threads-h: Fix link error on FreeBSD 11. * m4/threads.m4 (gl_THREADS_H): When linking with -lstdthreads, link also with -lpthread.
Bruno Haible 316b626d 2019-06-21T02:52:42 threadlib: Fix typo (regression from today). * m4/threadlib.m4 (gl_THREADLIB_BODY): Fix typo in comment marker.
Bruno Haible 9e2d1943 2019-06-21T02:49:38 windows-thread, windows-tls: Fix compilation error on 32-bit mingw. * lib/windows-thread.c: Include <errno.h>. * lib/windows-tls.c: Likewise.
Karl Berry e9d8b52d 2019-06-20T10:55:09 autoudpate
Bruno Haible 7614f78d 2019-06-20T17:44:59 tss tests: Small improvement. * tests/test-tss.c (test_tss): Pass a different id to each thread.
Bruno Haible 0dbc0378 2019-06-20T04:41:03 threads: New module. * modules/threads: New file.
Bruno Haible 14a5f137 2019-06-20T04:40:39 tss: Add tests. * tests/test-tss.c: New file, based on tests/test-tls.c. * modules/tss-tests: New file.
Bruno Haible c94b90fc 2019-06-20T04:40:02 cnd: Add tests. * tests/test-cnd.c: New file, based on tests/test-cond.c. * modules/cnd-tests: New file.
Bruno Haible 4a440ef9 2019-06-20T04:38:06 mtx: Add tests. * tests/test-mtx.c: New file, based on tests/test-lock.c. * tests/test-call_once.c: New file, based on tests/test-once.c. * modules/mtx-tests: New file.
Bruno Haible 6ac18d06 2019-06-20T04:37:23 thrd: Add tests. * tests/test-thrd_create.c: New file, based on tests/test-thread_create.c. * tests/test-thrd_current.c: New file, based on tests/test-thread_self.c. * modules/thrd-tests: New file.
Bruno Haible ee2f4139 2019-06-20T04:34:49 tss: New module. * lib/tss.c: New file. * modules/tss: New file. * doc/posix-functions/tss_create.texi: Mention the new module. * doc/posix-functions/tss_set.texi: Likewise. * doc/posix-functions/tss_get.texi: Likewise. * doc/posix-functions/tss_delete.texi: Likewise.
Bruno Haible 36307d84 2019-06-20T04:32:42 cnd: New module. * lib/cnd.c: New file. * modules/cnd: New file. * doc/posix-functions/cnd_init.texi: Mention the new module. * doc/posix-functions/cnd_wait.texi: Likewise. * doc/posix-functions/cnd_timedwait.texi: Likewise. * doc/posix-functions/cnd_signal.texi: Likewise. * doc/posix-functions/cnd_broadcast.texi: Likewise. * doc/posix-functions/cnd_destroy.texi: Likewise.
Bruno Haible 6b4c64f0 2019-06-20T04:30:11 mtx: New module. * lib/mtx.c: New file. * modules/mtx: New file. * doc/posix-functions/call_once.texi: Mention the new module. * doc/posix-functions/mtx_init.texi: Likewise. * doc/posix-functions/mtx_lock.texi: Likewise. * doc/posix-functions/mtx_trylock.texi: Likewise. * doc/posix-functions/mtx_timedlock.texi: Likewise. * doc/posix-functions/mtx_unlock.texi: Likewise. * doc/posix-functions/mtx_destroy.texi: Likewise.
Bruno Haible 3696a934 2019-06-20T04:26:31 thrd: New module. * lib/thrd.c: New file. * m4/thrd.m4: New file. * modules/thrd: New file. * doc/posix-functions/thrd_current.texi: Mention the new module. * doc/posix-functions/thrd_detach.texi: Likewise. * doc/posix-functions/thrd_equal.texi: Likewise. * doc/posix-functions/thrd_exit.texi: Likewise. * doc/posix-functions/thrd_sleep.texi: Likewise. * doc/posix-functions/thrd_yield.texi: Likewise. * doc/posix-functions/thrd_create.texi: Mention the new module and the AIX bug. * doc/posix-functions/thrd_join.texi: Mention the new module and the AIX and Solaris bugs.
Bruno Haible bf6dd504 2019-06-20T04:25:58 threads-h: Add tests. * tests/test-threads.c: New file. * modules/threads-h-tests: New file. * tests/test-threads-c++.cc: New file. * modules/threads-h-c++-tests: New file.
Bruno Haible 80d24481 2019-06-20T04:17:30 threads-h: New module. * lib/threads.in.h: New file. * m4/threads.m4: New file. * m4/yield.m4 (gl_YIELD): Update comment. * modules/threads-h: New file. * modules/yields (configure.ac): Use AC_REQUIRE. * doc/posix-headers/threads.texi: Mention the new module and the AIX bugs.
Bruno Haible 0894f96f 2019-06-20T04:16:20 windows-thread: New module. * lib/windows-thread.h: New file, based on lib/glthread/thread.h. * lib/windows-thread.c: New file, based on lib/glthread/thread.c. * lib/glthread/thread.h: Include windows-thread.h. (gl_thread_t): Define using glwthread_thread_t. (glthread_create): Define using glwthread_thread_create. (glthread_join): Define using glwthread_thread_join. (gl_thread_self): Define using glwthread_thread_self. (gl_thread_exit): Define using glwthread_thread_exit. (glthread_create_func, glthread_join_func, gl_thread_self_func, gl_thread_exit_func): Remove declarations. * lib/glthread/thread.c (self_key): Remove variable. (do_init_self_key, init_self_key): Remove functions. (struct gl_thread_struct): Remove type. (get_current_thread_handle, gl_thread_self_func, wrapper_func, glthread_create_func, glthread_join_func, gl_thread_exit_func): Remove functions. * modules/windows-thread: New file. * modules/thread (Depends-on): Add windows-thread.
Bruno Haible 7435d61f 2019-06-20T04:15:30 windows-tls: New module. * lib/windows-tls.h: New file, based on lib/glthread/tls.h. * lib/windows-tls.c: New file, based on lib/glthread/tls.h. * lib/glthread/tls.h: Include windows-tls.h. (gl_tls_key_t): Define using glwthread_tls_key_t. * modules/windows-tls: New file. * modules/tls (Depends-on): Add windows-tls.
Bruno Haible 7b7305f4 2019-06-20T04:13:43 windows-cond: New module. * lib/windows-cond.h: New file, based on lib/glthread/cond.h. * lib/windows-cond.c: New file, based on lib/glthread/cond.c. * lib/glthread/cond.h: Include windows-cond.h. (struct gl_waitqueue_link, gl_linked_waitqueue_t): Remove types. (gl_cond_t): Define using glwthread_cond_t. (gl_cond_initializer): Define using GLWTHREAD_COND_INIT. (glthread_cond_init): Define using glwthread_cond_init. (glthread_cond_wait): Define using glwthread_cond_wait. (glthread_cond_timedwait): Define using glwthread_cond_timedwait. (glthread_cond_signal): Define using glwthread_cond_signal. (glthread_cond_broadcast): Define using glwthread_cond_broadcast. (glthread_cond_destroy): Define using glwthread_cond_destroy. (glthread_cond_init_func, glthread_cond_wait_func, glthread_cond_timedwait_func, glthread_cond_signal_func, glthread_cond_broadcast_func, glthread_cond_destroy_func): Remove declarations. * lib/glthread/cond.c (gl_waitqueue_t, gl_waitqueue_element): Remove types. (gl_waitqueue_init, gl_waitqueue_add, gl_waitqueue_remove, gl_waitqueue_notify_first, gl_waitqueue_notify_all, glthread_cond_init_func, glthread_cond_wait_func, glthread_cond_timedwait_func, glthread_cond_signal_func, glthread_cond_broadcast_func, glthread_cond_destroy_func): Remove functions. * modules/windows-cond: New file. * modules/cond (Depends-on): Add windows-cond. Remove gettimeofday.
Bruno Haible f46ac2b2 2019-06-20T04:12:41 windows-timedrecmutex: New module. * lib/windows-timedrecmutex.h: New file, based on windows-recmutex.h. * lib/windows-timedrecmutex.c: New file, based on windows-recmutex.c. * modules/windows-timedrecmutex: New file.
Bruno Haible d20c7ec3 2019-06-20T04:11:57 windows-timedmutex: New module. * lib/windows-timedmutex.h: New file, based on windows-mutex.h. * lib/windows-timedmutex.c: New file, based on windows-mutex.c. * modules/windows-timedmutex: New file.
Bruno Haible 4570a616 2019-06-20T04:10:39 windows-recmutex: New module. * lib/windows-recmutex.h: New file, extracted from lib/glthread/lock.h. * lib/windows-recmutex.c: New file, extracted from lib/glthread/lock.c. * lib/glthread/lock.h: Include windows-recmutex.h. (gl_recursive_lock_t): Define using glwthread_recmutex_t. (gl_recursive_lock_initializer): Define using GLWTHREAD_RECMUTEX_INIT. (glthread_recursive_lock_init): Define using glwthread_recmutex_init. (glthread_recursive_lock_lock): Define using glwthread_recmutex_lock. (glthread_recursive_lock_unlock): Define using glwthread_recmutex_unlock. (glthread_recursive_lock_destroy): Define using glwthread_recmutex_destroy. (glthread_recursive_lock_init_func, glthread_recursive_lock_lock_func, glthread_recursive_lock_unlock_func, glthread_recursive_lock_destroy_func): Remove declarations. * lib/glthread/lock.c (glthread_recursive_lock_init_func, glthread_recursive_lock_lock_func, glthread_recursive_lock_unlock_func, glthread_recursive_lock_destroy_func): Remove functions. * modules/windows-recmutex: New file. * modules/lock (Depends-on): Add windows-recmutex.
Bruno Haible 2535ce3a 2019-06-20T04:08:16 windows-mutex: New module. * lib/windows-mutex.h: New file, extracted from lib/glthread/lock.h. * lib/windows-mutex.c: New file, extracted from lib/glthread/lock.c. * lib/windows-spinlock.h: New file, extracted from lib/glthread/lock.h. * lib/glthread/lock.h: Include windows-spinlock.h, windows-mutex.h. (gl_spinlock_t): Remove type. (gl_lock_t): Define using glwthread_mutex_t. (gl_lock_initializer): Define using GLWTHREAD_MUTEX_INIT. (glthread_lock_init): Define using glwthread_mutex_init. (glthread_lock_lock): Define using glwthread_mutex_lock. (glthread_lock_unlock): Define using glwthread_mutex_unlock. (glthread_lock_destroy): Define using glwthread_mutex_destroy. (glthread_lock_init_func, glthread_lock_lock_func, glthread_lock_unlock_func, glthread_lock_destroy_func): Remove declarations. Use glwthread_spinlock_t instead of gl_spinlock_t. (gl_rwlock_initializer, gl_recursive_lock_initializer): Define using GLWTHREAD_SPINLOCK_INIT. * lib/glthread/lock.c (glthread_lock_init_func, glthread_lock_lock_func, glthread_lock_unlock_func, glthread_lock_destroy_func): Remove functions. * lib/glthread/cond.h: Use glwthread_spinlock_t instead of gl_spinlock_t. * modules/windows-mutex: New file. * modules/lock (Depends-on): Add windows-mutex.
Bruno Haible 6c3d118e 2019-06-20T04:04:45 windows-once: New module. * lib/windows-once.h: New file, extracted from lib/glthread/lock.h. * lib/windows-once.c: New file, extracted from lib/glthread/lock.c. * lib/glthread/lock.h: Include windows-once.h. (gl_once_t): Define using glwthread_once_t. (gl_once_define): Define using GLWTHREAD_ONCE_INIT. (glthread_once): Define using glwthread_once. (glthread_once_func): Remove declaration. * lib/glthread/lock.c (glthread_once_func): Remove function. * modules/windows-once: New file. * modules/lock (Depends-on): Add windows-once.
Bruno Haible 7078fef3 2019-06-20T04:04:08 lock, cond: Avoid possible counter wraparound on Windows. * lib/glthread/lock.c (glthread_lock_lock_func): Leave the 'started' field of the guard unchanged if it was already positive. (glthread_rwlock_rdlock_func): Likewise. (glthread_rwlock_wrlock_func): Likewise. (glthread_recursive_lock_lock_func): Likewise. * lib/glthread/cond.c (glthread_cond_wait_func): Likewise. (glthread_cond_timedwait_func): Likewise.
Bruno Haible d4c0a04b 2019-06-20T04:03:37 cond: Make glthread_cond_timedwait more reliable on Windows. * lib/glthread/cond.c (glthread_cond_timedwait_func): Initialize the condition variable before looking at the current time.
Bruno Haible 145e16d8 2019-06-20T04:02:52 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.
Bruno Haible 79c25453 2019-06-20T03:54:56 thread, lock, cond, tls: Recognize C11 multithreaded applications. * m4/threadlib.m4 (gl_THREADLIB_BODY): Test for <threads.h>. * lib/glthread/thread.h (c11_threads_in_use): New macro. (pthread_in_use, pth_in_use, thread_in_use): Use it. * lib/glthread/lock.h (c11_threads_in_use): New macro. (pthread_in_use, pth_in_use, thread_in_use): Use it. * lib/glthread/cond.h (c11_threads_in_use): New macro. (pthread_in_use, pth_in_use, thread_in_use): Use it. * lib/glthread/tls.h (c11_threads_in_use): New macro. (pthread_in_use, pth_in_use, thread_in_use): Use it.
Bruno Haible 97ae5364 2019-06-20T03:53:51 tls tests: Small improvements. * tests/test-tls.c: Include <stdint.h>. (worker_thread): Avoid gcc warning on 64-bit mingw. (test_tls): Pass a different id to each thread. * modules/tls-tests (Depends-on): Add stdint.
Bruno Haible a06d5050 2019-06-20T03:52:28 cond tests: Simplify. * tests/test-cond.c (test_timedcond): Remove redundant assignment.
Bruno Haible e8d62a2a 2019-06-20T03:50:52 lock tests: Avoid reference to undefined variable if !ENABLE_LOCKING. * tests/test-lock.c (test_once): Don't reference fire_signal if !ENABLE_LOCKING.
Bruno Haible 33d1306e 2019-06-19T18:05:07 nanosleep: Relicense under LGPLv2+. Approved by Jim Meyering, Paul Eggert, Eric Blake, Pádraig Brady. * modules/nanosleep (License): Change to LGPLv2+.
Bruno Haible a5a93a6e 2019-06-19T12:06:23 Reorder pieces of header in perl scripts. The desired order is - Prologue part 1 (2 lines with #!) - Program short description - Copyright and license notice - Written-by notice - Program short description (optional) - Program long description (optional) - Prologue part 2 - Time stamp - Code Reported by Paul Eggert. * build-aux/announce-gen: Reorder header. * build-aux/gitlog-to-changelog: Likewise. * build-aux/useless-if-before-free: Likewise. * build-aux/prefix-gnulib-mk: Add copyright notice and short description. * build-aux/update-copyright: Likewise. Add short description. Bump time-stamp-line-limit to 200.
Paul Eggert af35f056 2019-06-18T17:41:46 verify-tests: work around xlc bug Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2019-06/msg00049.html * tests/test-verify.c (item): Move the arithmetic inside the verify_expr, to avoid tickling a bug in IBM AIX xlc V12.1.
Bruno Haible 36bfd586 2019-06-16T14:54:43 Restore Emacs time-stamp hook applicability. Reported by Darshit Shah <darnir@gnu.org>. * build-aux/useless-if-before-free: Bump time-stamp-line-limit to 50. * build-aux/announce-gen: Likewise. * build-aux/gitlog-to-changelog: Likewise. * build-aux/prefix-gnulib-mk: Likewise. * build-aux/update-copyright: Likewise.
Bruno Haible c2fdc30c 2019-06-15T22:03:09 Fix comments in last commit. Reported by Paul Eggert. * build-aux/useless-if-before-free: Fix comment regarding the second line. * build-aux/announce-gen: Likewise. * build-aux/gitlog-to-changelog: Likewise. * build-aux/prefix-gnulib-mk: Likewise. * build-aux/update-copyright: Likewise. * tests/test-update-copyright.sh: Update test program accordingly.
Bruno Haible a05d5d12 2019-06-15T13:03:58 Fix scripts to have valid executable format on Alpine Linux. Reported by Tim Rühsen <tim.ruehsen@gmx.de>. Idea by Paul Eggert. * build-aux/useless-if-before-free: Use a prologue that starts with '#!/bin/sh'. * build-aux/announce-gen: Likewise. * build-aux/gitlog-to-changelog: Likewise. * build-aux/prefix-gnulib-mk: Likewise. * build-aux/update-copyright: Likewise. * tests/test-update-copyright.sh: Update test program accordingly.
Karl Berry 5905d8ca 2019-06-11T07:09:46 autoupdate
Bruno Haible 5dd3e60c 2019-06-10T22:11:11 nproc: Ensure nproc(NPROC_ALL) ≥ nproc(NPROC_CURRENT) with glibc ≥ 2.26. Reported by Nikita Ermakov <arei@altlinux.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2019-06/msg00003.html>. * lib/nproc.c (num_processors_ignoring_omp): Treat a return value of sysconf (_SC_NPROCESSORS_CONF) == 2 like a return value == 1.
Bruno Haible b827d8a6 2019-06-10T16:51:51 posix_spawn_file_actions_addchdir: Fix possible use-after-free bug. * lib/spawn_int.h (struct __spawn_action): Remove 'const' from path. * lib/spawn_faction_addchdir.c (posix_spawn_file_actions_addchdir): Make a copy of the path argument. * lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Free it.
Bruno Haible 765146c3 2019-06-10T16:50:04 posix_spawn_file_actions_addopen: Fix possible use-after-free bug. Reported at <https://sourceware.org/bugzilla/show_bug.cgi?id=17048>. * lib/spawn_int.h (struct __spawn_action): Remove 'const' from path. * lib/spawn_faction_addopen.c (posix_spawn_file_actions_addopen): Make a copy of the path argument. * lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Free it.
Bruno Haible fbb40ec1 2019-06-10T16:17:35 posix_spawn_file_actions_addfchdir: Add tests. * tests/test-posix_spawn_file_actions_addfchdir.c: New file. * tests/test-posix_spawn5.c: New file. * modules/posix_spawn_file_actions_addfchdir-tests: New file.
Bruno Haible d822de87 2019-06-10T16:16:16 posix_spawn_file_actions_addfchdir: New module. * lib/spawn.in.h (posix_spawn_file_actions_addfchdir): New declaration. * lib/spawn_int.h (struct __spawn_action): Add tag 'spawn_do_fchdir' and union member 'fchdir_action'. * lib/spawn_faction_addfchdir.c: New file. * lib/spawni.c (__spawni): Implement the spawn_do_fchdir action. * m4/posix_spawn_faction_addfchdir.m4: New file. * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether module 'posix_spawn_file_actions_addfchdir' is present and whether posix_spawn_file_actions_addfchdir_np exists. Set REPLACE_POSIX_SPAWN. * m4/spawn_h.m4 (gl_SPAWN_H): Test whether posix_spawn_file_actions_addfchdir is declared. (gl_SPAWN_H_DEFAULTS): Initialize GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR, HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR, REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR. * modules/spawn (Makefile.am): Substitute GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR, HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR, REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR. * modules/posix_spawn_file_actions_addfchdir: New file. * tests/test-spawn-c++.cc (posix_spawn_file_actions_addfchdir): Check signature. * doc/posix-functions/posix_spawn.texi: Mention the new module. * doc/posix-functions/posix_spawnp.texi: Likewise. * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi: Likewise.
Bruno Haible 2ad7a33b 2019-06-10T16:26:03 doc: Document existence of posix_spawn_file_actions_addchdir module. * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi: Mention the posix_spawn_file_actions_addchdir module.