Log

Author Commit Date CI Message
Bruno Haible d8a1c91c 2021-09-19T01:35:24 md5-buffer tests: New module. * tests/test-md5-buffer.c: New file, based on tests/test-md5.c. * tests/test-md5-stream.c: Renamed from tests/test-md5.c. (main): Remove md5-buffer tests. * modules/crypto/md5-buffer-tests: New file, based on modules/crypto/md5-tests. * modules/crypto/md5-tests: Remove tests that are now in modules/crypto/md5-buffer-tests. Test tests/test-md5-stream.c instead of tests/test-md5.c.
Bruno Haible 439979c0 2021-09-19T01:35:19 md5: Clarify module to source relation. * lib/md5-stream.c: New file, extracted from lib/md5.c. * lib/md5.c: Don't include stdlib.h, unlocked-io.h. (BLOCKSIZE, md5_stream): Moved to md5-stream.c. * lib/md5.h: Tweak. * modules/crypto/md5 (Files): Add lib/md5-stream.c. (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM. (Makefile.am): Arrange to compile md5-stream.c. (Link): Mention $(LIB_CRYPTO).
Bruno Haible 88c2657f 2021-09-19T01:33:31 md4-buffer tests: New module. * tests/test-md4-buffer.c: Renamed from tests/test-md4.c. * modules/crypto/md4-buffer-tests: Renamed from modules/crypto/md4-tests. Test tests/test-md4-buffer.c instead of tests/test-md4.c.
Bruno Haible fc0ce037 2021-09-19T01:32:01 md4-buffer: New module. * lib/md4-stream.c: New file, extracted from lib/md4.c. * lib/md4.c: Don't include stdlib.h, unlocked-io.h. (BLOCKSIZE, md4_stream): Moved to md4-stream.c. * lib/md4.h: Reorder declarations. * modules/crypto/md4-buffer: New file, based on modules/crypto/md4. * modules/crypto/md4: Rewritten.
Bruno Haible 341e0c26 2021-09-19T01:30:12 md2-buffer tests: New module. * tests/test-md2-buffer.c: Renamed from tests/test-md2.c. * modules/crypto/md2-buffer-tests: Renamed from modules/crypto/md2-tests. Test tests/test-md2-buffer.c instead of tests/test-md2.c.
Bruno Haible 1cae2a35 2021-09-19T01:29:33 md2-buffer: New module. * lib/md2-stream.c: New file, extracted from lib/md2.c. * lib/md2.c: Don't include stdlib.h, unlocked-io.h. (BLOCKSIZE, md2_stream): Moved to md2-stream.c. * lib/md2.h: Reorder declarations. * modules/crypto/md2-buffer: New file, based on modules/crypto/md2. * modules/crypto/md2: Rewritten.
Bruno Haible 4bed390b 2021-09-18T16:31:52 string, wchar: Don't cause link errors for rpl_free (regr. 2021-09-07). * lib/string.in.h (free, rpl_free): Consider GNULIB_FREE_POSIX variable. * lib/wchar.in.h (free, rpl_free): Likewise. * m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Require module indicator variable initializations from the stdlib module. * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Likewise. * modules/string (Makefile.am): Substitute GNULIB_FREE_POSIX in string.h. * modules/wchar (Makefile.am): Substitute GNULIB_FREE_POSIX in wchar.h.
Bruno Haible 78184556 2021-09-17T22:22:50 threadlib: Avoid crashes in thread-related functions on Cygwin 3.2.0. Reported by Brian Inglis via Akim Demaille in <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00063.html>. * m4/threadlib.m4 (gl_WEAK_SYMBOLS): Force a "guessing no" result on Cygwin.
Bruno Haible bce94c07 2021-09-14T01:18:37 simple-atomic: Port to Oracle Studio 12.6. * lib/simple-atomic.c (asm) [0x590 <= __SUNPRO_C && __STDC__]:
Paul Eggert c9f37b3f 2021-09-13T11:12:54 asyncsafe-spin: port to Oracle Studio 12.6 sparc Problem reported by Dennis Clarke via Eric Blake in: https://lists.gnu.org/r/bug-gnulib/2021-09/msg00056.html * lib/asyncsafe-spin.c (asm) [0x590 <= __SUNPRO_C && __STDC__]: #define to __asm.
Paul Eggert ec2b9f27 2021-09-12T23:46:19 stdint-tests: long long preproc on recent Sun C * tests/test-stdint.c: Test long long preprocessor constants on Oracle Developer Studio 12.6, where they should work.
Bruno Haible 29d79d47 2021-09-13T07:28:09 extern-inline: Fix syntax error on macOS with GCC 11 (regr. 2021-08-22). Reported by Akim Demaille in <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00052.html>. * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE): Put _GL_UNUSED before, not after, 'static'.
Christian Weisgerber aa35e17a 2021-09-11T13:51:13 sigsegv: port to OpenBSD 6.8+ powerpc64 * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Special case for __OpenBSD__ && __powerpc64__, needed due to: https://github.com/openbsd/src/commit/5e649a8714ba05cf482011b7b7d1e5437b7c17db which is part of the oldest currently-supported OpenBSD (6.8), so we needn’t worry about older versions.
Pádraig Brady b6bae60d 2021-09-09T16:16:03 maintainer-makefile: add 'can' to sc_prohibit_doubled_word * top/maint.mk (sc_prohibit_doubled_word): Check for "can can".
Paul Eggert d9559536 2021-09-08T19:18:37 strerror_r-posix: port even better to Android * lib/strerror_r.c: Use STRERROR_R_CHAR_P to decide whether the system strerror_r returns char *, and HAVE_DECL_STRERROR_R to decide whether it either does that or returns an integer. In the former case, use the system strerror_r even on platforms like Android API level 23 that don’t have __xpg_strerror_r; also check for strerror_r failure just in case. * m4/error.m4 (gl_PREREQ_ERROR): * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Use system extensions on Android, to avoid mishandling strerror_r on API level 23 and later. * modules/error, modules/strerror_r-posix (configure.ac): Surround gl_PREREQ_ERROR with AS_IF instead of plain if, so that AC_REQUIREs are propagated out.
Paul Eggert d99c9622 2021-09-08T09:45:46 strerror_r-posix: port better to Android * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Move requirement of gl_USE_SYSTEM_EXTENSIONS from here ... (gl_FUNC_STRERROR_R_WORKS): ... to here, which is the macro that actually needs it. This avoids a bug where 'configure' tests whether strerror_r has the POSIX API before enabling GNU extensions. On Android, enabling GNU extensions switches from the POSIX to the GNU API. Problem reported by Lucy Phipps in: https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html
Paul Eggert 48cfbe8a 2021-09-08T09:42:41 string, wchar: port rpl_free decl to Android * lib/string.in.h, lib/wchar.in.h: (free): When replacing it, declare the unreplaced version too. Problem reported by Lucy Phipps in: https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html
Paul Eggert a4a2d039 2021-09-07T17:51:39 string, wchar: avoid some namespace pollution * lib/string.in.h, lib/wchar.in.h: (free): Declare by hand instead of including stdlib.h. This avoids some namespace pollution. It should also avoid some nested-include problems described by Lucy Phipps in: https://lists.gnu.org/r/bug-gnulib/2021-09/msg00018.html * modules/string, modules/wchar: (Depends-on): Add stdlib, so that REPLACE_FREE has the right value. (Makefile.am): Replace @REPLACE_FREE@ when creating the include file.
Paul Eggert 2c062d40 2021-09-07T14:49:09 crypto: revert previous change
Paul Eggert 394dde1b 2021-09-06T18:43:36 crypto: add missing file af_alg.h * modules/crypto/md5-buffer, modules/crypto/sha1-buffer: * modules/crypto/sha256-buffer, modules/crypto/sha512-buffer: (Files): Add lib/af_alg.h, since the .c files include it.
Paul Eggert 298f0807 2021-09-04T09:45:06 idx: break copying from glibc * config/srclist.txt: Comment out idx.h, and bring back recent change.
Sun Haiyong b50c6442 2021-09-04T15:06:43 sigsegv: Improve cross-compilation support for LoongArch CPU. * m4/stack-direction.m4 (SV_STACK_DIRECTION): Assume the stack grows down on LoongArch.
Simon Josefsson 8b58d529 2021-09-04T10:26:26 doc: Improve help related to bootstrap script. * doc/gnulib-tool.texi (VCS Issues): Make title more positive, s/Issues/Integration/. Some more bootstrap-related hints, including changing suggested submodule path from .gnulib to gnulib as this seems to be more wide-spread.
Paul Eggert c81d4c18 2021-09-04T00:24:12 intprops: fix minor doc glitches * doc/intprops.texi (Integer Properties): Fix doc glitches.
Simon Josefsson 6b8032a3 2021-09-04T09:19:37 doc: Add suggestions on FDL texinfo usage. * doc/licenses-texi.texi (License Texinfo sources): Add texinfo examples.
Simon Josefsson 8f043c69 2021-09-03T21:59:43 maintainer-makefile: Add indentation syntax-check rule. * top/maint.mk (indent): Use AM_V_GEN and indent_args. (sc_indent): New rule. (indent_args): New variable. (C_SOURCES): New variable, initialized to reasonable C files. (exclude_file_name_regexp--indent): New variable.
Karl Berry a4e28bb2 2021-08-31T08:30:42 autoupdate
Paul Eggert ceb9bdd1 2021-08-30T11:15:20 idx: add commentary * lib/idx.h: Add comments about ssize_t and strlen, in response to comments from Simon Josefsson in: https://lists.gnu.org/r/bug-gnulib/2021-08/msg00196.html
Paul Eggert f077e399 2021-08-29T17:50:56 attribute: keep up with gnulib-common.m4 * lib/attribute.h (ATTRIBUTE_DEALLOC, ATTRIBUTE_DEALLOC_FREE): New macros, aliases for the _GL_-prefixed macros added to gnulib-common.m4 last month.
Bruno Haible ac97e574 2021-08-30T02:36:31 supersede: Fix test failure under QEMU user-mode for Linux/mips. * tests/test-supersede-open.h (test_open_supersede): Copy statbuf.st_dev into a local variable of type dev_t. * tests/test-supersede-fopen.h (test_fopen_supersede): Likewise.
Bruno Haible f765c688 2021-08-30T02:06:23 spawn-pipe: Fix test failure when running under QEMU user-mode. * tests/test-spawn-pipe-child.c: Include <stdbool.h>, <string.h>, qemu.h. (main): Under QEMU user-mode, allow fd 2 or fd 3 to be open. * modules/spawn-pipe-tests (Files): Add qemu.h. (Depends-on): Add stdbool.
Bruno Haible 5d5eba1c 2021-08-30T02:05:53 execute: Fix test failure when running under QEMU user-mode. * tests/test-execute-child.c: Include <stdbool.h>, qemu.h. (main): Under QEMU user-mode, allow fd 3 to be open. * modules/execute-tests (Files): Add qemu.h. (Depends-on): Add stdbool.
Bruno Haible dec35a21 2021-08-30T01:56:46 posix_spawn_file_actions_addfchdir: Avoid test failure under QEMU. * tests/test-posix_spawn-fchdir.c: Include qemu.h. (is_qemu): New variable. (test): Under QEMU user-mode, don't expect that "pwd" produces the result "/". (main): Initialize is_qemu. Under QEMU user-mode, skip the relative file name test. * modules/posix_spawn_file_actions_addfchdir-tests (Files): Add qemu.h. (Depends-on): Add stdbool.
Bruno Haible 1968e3a5 2021-08-30T01:44:03 getcwd tests: Avoid test failure when running under QEMU user-mode. * modules/getcwd-tests (Files): Add qemu.h. (Depends-on): Add stdbool. * tests/test-getcwd.c: Include qemu.h. (test_long_name): Skip this test when running under QEMU user-mode. (main): Consider return code 77 from test_long_name.
Paul Eggert 6aafd2a9 2021-08-29T12:58:49 base32, base64: treat negative sizes as overflows * lib/base64.c (base64_encode_alloc): * lib/base32.c (base32_encode_alloc): Treat negative sizes as overflows, for better compatibility with previous API.
Bruno Haible a55152ea 2021-08-29T18:54:54 explicit_bzero test: Fix test failure due to GCC optimizations. * tests/test-explicit_bzero.c (do_secret_stuff): Use static variable 'last_stackbuf'. (main): Use an 'if' to combine the two do_secret_stuff invocations.
Paul Eggert 6c546529 2021-08-29T10:03:24 dfa: port to non-gnulib Suggested by Arnold Robbins in: https://lists.gnu.org/r/bug-gnulib/2021-08/msg00181.html * lib/dfa.h (_GL_ATTRIBUTE_DEALLOC) [!_GL_ATTRIBUTE_MALLOC]: Add missing definition.
Paul Eggert 93280a4b 2021-08-29T00:45:43 base32, base64: fix broken tests Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2021-08/msg00170.html * lib/base32.c, lib/base64.c: Do not include verify.h, and omit all uses of ‘assume’. * modules/base32, modules/base64 (Depends-on): Remove verify. * tests/test-base32.c, tests/test-base64.c: Don’t pass out-of-range values to allocator, as converting them to idx_t relies on implementation-defined behavior that could trap.
Paul Eggert 34298f25 2021-08-29T00:27:10 ialloc: relicense * modules/ialloc (License): Change from LGPL to LGPLv2+.
Bruno Haible 798de454 2021-08-29T02:05:05 fma: Fix compilation error on Linux/sh4. * lib/fma.c (FUNC): Don't test for FE_DOWNWARD or FE_UPWARD when these rounding modes are not defined.
Bruno Haible 8bc60373 2021-08-29T01:16:37 sigabbrev_np, sigdescr_np: Fix compilation error on Linux/alpha, part 2. * tests/test-sigabbrev_np.c (main): Fix syntax error. * tests/test-sigdescr_np.c (main): Likewise.
Bruno Haible d2e97793 2021-08-29T01:03:29 Skip some tests when running under QEMU user-mode. * tests/qemu.h: New file. * tests/test-get-rusage-as.c: Include qemu.h. (main): Skip the test when running under QEMU. * tests/test-get-rusage-data.c: Include qemu.h. (main): Skip the test when running under QEMU. * tests/test-printf-posix2.c: Include qemu.h. (main): Return with code 77 when running under QEMU. * tests/test-fprintf-posix2.c: Include qemu.h. (main): Return with code 77 when running under QEMU. * tests/test-fprintf-posix3.c: Include qemu.h. (main): Return with code 79 when running under QEMU. * tests/test-fprintf-posix3.sh: Skip the test when the return code was 79. * tests/test-dprintf-posix2.c: Include qemu.h. (main): Return with code 79 when running under QEMU. Use return code 80 instead of 78. * tests/test-dprintf-posix2.sh: Skip the test when the return code was 79. Update for changed return code. * modules/get-rusage-as-tests (Files): Add qemu.h. (Depends-on): Add stdbool. * modules/get-rusage-data-tests (Files): Add qemu.h. (Depends-on): Add stdbool. * modules/fprintf-posix-tests (Files): Add qemu.h. (Depends-on): Add stdbool. * modules/dprintf-posix-tests (Files): Add qemu.h. (Depends-on): Add stdbool.
Bruno Haible ecf9863b 2021-08-28T19:39:05 sigabbrev_np, sigdescr_np: Fix compilation error on Linux/alpha. * lib/sigabbrev_np.c (sigabbrev_np): When SIGINFO and SIGPWR have the same value, give precendence to SIGPWR. * lib/sigdescr_np.c (sigdescr_np): Likewise. * tests/test-sigabbrev_np.c (main): Likewise. * tests/test-sigdescr_np.c (main): Likewise.
Bruno Haible ba3c445a 2021-08-28T19:15:38 execle, execve, execvpe tests: Fix test failures under qemu user-mode. * test-execle-main.c: Include <string.h>. (get_environ_assignment, create_minimal_env): New functions. (main): Call create_minimal_env. * test-execve-main.c: Likewise. * test-execvpe-main.c: Likewise.
Paul Eggert 452e8a8f 2021-08-27T15:25:42 base32, base64: prefer signed to unsigned integers * lib/base32.c, lib/base64.c: Include ialloc.h instad of stdlib.h. Include intprops.h, verify.h. * lib/base32.c (base32_encode, base32_encode_alloc, get_8, decode_8) (base32_decode_ctx, base32_decode_alloc_ctx): * lib/base32.h (struct base32_decode_context): * lib/base64.c (base64_encode_fast, base64_encode) (base64_encode_alloc, get_4, decode_4, base64_decode_ctx) (base64_decode_alloc_ctx): * lib/base64.h (struct base64_decode_context): * tests/test-base32.c (main): * tests/test-base64.c (main): Prefer signed to unsigned integers. * lib/base32.c (base32_encode_alloc): * lib/base64.c (base64_encode_alloc): Use simpler and more-direct check for overflow, removing a TODO. * lib/base32.h, lib/base64.h: Include idx.h instead of stddef.h. * modules/base32, modules/base64 (Depends-on): Add ialloc, verify.
Paul Eggert ec343e87 2021-08-27T12:01:26 regex: also break glibc lib/regex.c link for now
Karl Berry 0387adf2 2021-08-27T09:16:36 autoupdate
Paul Eggert fecb4922 2021-08-26T23:45:39 regex: revert much of previous change Use a more-conservative change that syncs closer with glibc, and then merely marks regexec and __compat_regexec.
Paul Eggert eaccb8cb 2021-08-26T16:15:25 regex: fix typo in previous patch Fix typo in previous patch. Somehow I managed to omit the main point of the patch....
Paul Eggert 56b32251 2021-08-26T10:08:00 regex: use C99-style array arg syntax This should help with some static checking. Derived from a suggestion by Martin Sebor in: https://sourceware.org/pipermail/libc-alpha/2021-August/130336.html This also ports recent and relevant Glibc changes to Gnulib and prepares to copy back. * lib/cdefs.h (__ARG_NELTS): New macro. * lib/regex.c: Ignore -Wvla for the whole file. * lib/regex.h (_ARG_NELTS_, _Attr_access_): New macros. Ignore -Wvla when declaring regexec. * lib/regex.h (re_compile_pattern, re_search, re_search_2) (re_match, re_match_2, regcomp, regerror): Use _Attr_access_ where that could help static checking. * lib/regexec.c (regexec, __compat_regexec, re_copy_regs) (re_search_internal, proceed_next_node, push_fail_stack) (pop_fail_stack, set_regs, update_regs): Use __ARG_NELTS for each array parameter whose size is another arg, but which might be null.
Bruno Haible 8fb3a827 2021-08-25T12:43:56 execute tests: Fix test failure when libtool is in use. * modules/execute-tests (Makefile.am): Link test-execute-child without using libtool. * modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-child without using libtool. * modules/system-quote-tests (Makefile.am): Link test-system-quote-child without using libtool.
Paul Eggert 65e69185 2021-08-24T20:12:19 dfa: prefer idx_t to ptrdiff_t for nonnegative * lib/dfa.c (struct dfa, dfaexec_main, dfaexec_mb, dfaexec_sb) (dfaexec_noop, dfaexec): * lib/dfa.h (dfaparse, dfacomp, dfaexec): Prefer idx_t to ptrdiff_t for counts, which should be nonnegative. * lib/dfa.h: Include idx.h.
Bruno Haible d3837928 2021-08-23T03:06:03 snippet/unused-parameter: Mark unused module obsolete. * modules/snippet/unused-parameter (Status, Notice): Mark as obsolete.
Bruno Haible 354f27fe 2021-08-22T23:54:40 Make generated .in.h files as standalone as possible. Reported by Jan Engelhardt <jengelh@inai.de>. * lib/stdlib.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE, _GL_ATTRIBUTE_MALLOC): Add fallback definitions. * lib/dirent.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC): Add fallback definitions. * lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC): Add fallback definition. * lib/math.in.h (_GL_ATTRIBUTE_CONST): Add fallback definition. * lib/pthread.in.h (_GL_ATTRIBUTE_PURE): Add fallback definition. * lib/threads.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/uchar.in.h (_GL_ATTRIBUTE_PURE): Likewise. * lib/string.in.h (_GL_ATTRIBUTE_PURE): Move definition, for consistency with the other *.in.h files. * lib/se-context.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback definition. * lib/se-label.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise. * lib/se-selinux.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise. * lib/textstyle.in.h: Use _GL_ATTRIBUTE_MAYBE_UNUSED instead of _GL_UNUSED. (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback definitions.
Bruno Haible 63f9565f 2021-08-22T23:40:41 gnulib-common.m4: Clarify logic behind _GL_UNUSED_LABEL. Reported by Paul Eggert. * m4/gnulib-common.m4 (gl_COMMON_BODY): Add comment and write the condition in a way that is close to the comment.
Paul Eggert 7a2a0d40 2021-08-22T13:39:24 c-stack: depend on inttypes, mempcpy * modules/c-stack (Depends-on): Add inttypes, mempcpy. mempcpy problem reported by Evan Miller in: https://debbugs.gnu.org/50098#31
Bruno Haible a66cc70c 2021-08-22T22:26:05 mountlist: Use recommended syntax for _GL_UNUSED_LABEL. * lib/mountlist.c (read_file_system_list): Add semicolon after _GL_UNUSED_LABEL.
Bruno Haible ed94575e 2021-08-22T22:11:50 gnulib-common.m4: Make _GL_UNUSED_LABEL effective for clang. * m4/gnulib-common.m4 (gl_COMMON_BODY): Make _GL_UNUSED_LABEL use _GL_ATTRIBUTE_UNUSED also for clang.
Bruno Haible 171035bb 2021-08-22T22:09:15 Oops, remove unintended file additions.
Bruno Haible b034c793 2021-08-22T22:04:34 gnulib-common.m4: Use C2x [[maybe_unused]] when possible. * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_UNUSED as an alias of _GL_ATTRIBUTE_MAYBE_UNUSED, not of _GL_ATTRIBUTE_UNUSED. * lib/binary-io.h (__gl_setmode): Put _GL_UNUSED before, not after, the declaration. * lib/c-stack.c (null_action, segv_handler, overflow_handler, c_stack_action): Likewise. * lib/chown.c (chown): Likewise. * lib/clean-temp-simple.c (cleanup_action): Likewise. * lib/fts.c (dirent_inode_sort_may_be_useful, leaf_optimization, fts_set): Likewise. * lib/getgroups.c (getgroups): Likewise. * lib/getopt.c (_getopt_initialize): Likewise. * lib/getugroups.c (getugroups): Likewise. * lib/localename.c (gl_locale_name_thread_unsafe, gl_locale_name_thread, gl_locale_name_posix, gl_locale_name_environ): Likewise. * lib/mkdir.c (rpl_mkdir): Likewise. * lib/mkfifo.c (mkfifo): Likewise. * lib/mkfifoat.c (mkfifoat): Likewise. * lib/mknod.c (mknod): Likewise. * lib/mknodat.c (mknodat): Likewise. * lib/mountlist.c (me_remote): Likewise. * lib/openpty.c (openpty): Likewise. * lib/parse-datetime.y (yyerror): Likewise. * lib/passfd.c (sendfd, recvfd): Likewise. * lib/pthread-cond.c (pthread_condattr_destroy, pthread_cond_init, pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal, pthread_cond_broadcast, pthread_cond_destroy): Likewise. * lib/pthread-mutex.c (pthread_mutexattr_destroy, pthread_mutex_init, pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_timedlock, pthread_mutex_unlock, pthread_mutex_destroy): Likewise. * lib/pthread-rwlock.c (pthread_rwlockattr_destroy, pthread_rwlock_init, pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): Likewise. * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy): Likewise. * lib/pthread-thread.c (pthread_attr_destroy): Likewise. * lib/readlink.c (readlink): Likewise. * lib/rename.c (rpl_rename): Likewise. * lib/set-permissions.c (set_permissions): Likewise. * lib/sockets.c (gl_sockets_startup): Likewise. * lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime, stat_time_normalize): Likewise. * lib/strptime.c (__strptime_internal): Likewise. * lib/strtod.c (LDEXP): Likewise. * lib/symlink.c (symlink): Likewise. * lib/symlinkat.c (symlinkat): Likewise. * lib/tempname.c (try_dir, try_nocreate): Likewise. * lib/textstyle.in.h (styled_ostream_begin_use_class, styled_ostream_end_use_class, styled_ostream_get_hyperlink_ref, styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink, styled_ostream_flush_to_current_style, fd_ostream_create, term_ostream_get_color, term_ostream_set_color, term_ostream_get_bgcolor, term_ostream_set_bgcolor, term_ostream_get_weight, term_ostream_set_weight, term_ostream_get_posture, term_ostream_set_posture, term_ostream_get_underline, term_ostream_set_underline, term_ostream_get_hyperlink_ref, term_ostream_get_hyperlink_id, term_ostream_set_hyperlink, term_ostream_create, term_styled_ostream_create, html_styled_ostream_create, handle_color_option, handle_style_option, style_file_prepare, styled_ostream_create, libtextstyle_set_failure_exit_code): Likewise. * lib/unicodeio.c (exit_failure_callback, fallback_failure_callback): Likewise. * lib/wait-process.c (cleanup_slaves_action): Likewise. * tests/signature.h (SIGNATURE_CHECK2): Likewise. * tests/test-areadlink.c (do_areadlink): Likewise. * tests/test-areadlinkat.c (do_areadlinkat): Likewise. * tests/test-ceilf-ieee.c (main): Likewise. * tests/test-ceilf1.c (main): Likewise. * tests/test-dirent.c (dir): Likewise. * tests/test-fchownat.c (main): Likewise. * tests/test-fdopendir.c (main): Likewise. * tests/test-filenamecat.c (main): Likewise. * tests/test-floor1.c (main): Likewise. * tests/test-floorf-ieee.c (main): Likewise. * tests/test-floorf1.c (main): Likewise. * tests/test-fseeko.c (main): Likewise. * tests/test-fstatat.c (main): Likewise. * tests/test-ftello.c (main): Likewise. * tests/test-getdomainname.c (main): Likewise. * tests/test-getgroups.c (main): Likewise. * tests/test-gethostname.c (main): Likewise. * tests/test-math-c++.cc (OVERLOADED_CHECK): Likewise. * tests/test-mkdirat.c (main): Likewise. * tests/test-openat.c (main): Likewise. * tests/test-parse-datetime.c (main): Likewise. * tests/test-quotearg-simple.c (main): Likewise. * tests/test-quotearg.c (main): Likewise. * tests/test-sethostname2.c (main): Likewise. * tests/test-unlinkat.c (main): Likewise. * tests/test-version-etc.c (main): Likewise. * tests/test-xalloc-die.c (main): Likewise. * tests/test-xfprintf-posix.c (main): Likewise. * tests/test-xprintf-posix.c (main): Likewise. * tests/test-xvasprintf.c (main): Likewise.
Bruno Haible 55974fb6 2021-08-22T21:58:31 gnulib-common.m4: Document the gnulib-internal _GL_ATTRIBUTE_* macros. * m4/gnulib-common.m4 (gl_COMMON_BODY): Add comments to the _GL_ATTRIBUTE_* macros, based on lib/attribute.h.
Bernhard Voelker e2a4a093 2021-08-22T16:06:47 doc: fix order of stdlib functions * doc/gnulib.texi (node Glibc stdlib.h): Move mrand48_r after mkstemps. Reported by Benno Schulenberg.
Bruno Haible 4ea0e64a 2021-08-22T01:25:59 c-stack: Test for libsigsegv once, not twice. * m4/sigsegv.m4: New file, based on modules/sigsegv. * modules/sigsegv (Files): Add it. (configure.ac): Require gl_SIGSEGV. Test gl_sigsegv_uses_libsigsegv instead of with_libsigsegv and gl_cv_lib_sigsegv. * m4/c-stack.m4 (gl_C_STACK): Likewise.
Bruno Haible 4585c30b 2021-08-22T00:32:40 rawmemchr: Fix use in relocatable-prog-wrapper (regression 2021-08-20). * lib/rawmemchr.c: Restore test of HAVE_RAWMEMCHR. * modules/relocatable-prog-wrapper (Depends-on): Add stdalign.
Karl Berry 755cb839 2021-08-21T08:27:26 autoupdate
Paul Eggert b8ae80b2 2021-08-20T19:25:06 rawmemchr: modernize and simplify * lib/rawmemchr.c (HAVE_RAWMEMCHR): Assume it’s not defined; otherwise this file would not be compiled. Include limits.h, stdalign.h, stdint.h, verify.h. (rawmemchr): Prefer uintptr_t to unsigned long and to size_t when it’s the better type. Verify that longword lacks padding. Use alignof rather than sizeof when checking alignment. Simplify by assuming C99 decl-after-statement, and by using multiplication rather than repeated shifting and OR (modern compilers can optimize the multiplication if needed). Avoid unnecessary casts. Don’t assume CHAR_WIDTH is 8. Convert back and forth between void * to suppress bogus GCC warnings about alignment. Omit a duplicate assignment to char_ptr. * modules/rawmemchr (Depends-on): Add stdalign, stdint, verify.
Karl Berry a38c80d8 2021-08-18T07:01:44 autoupdate
Paul Eggert 732539da 2021-08-17T12:06:42 c-stack: fix libsigsegv dependency Problem reported for GNU grep by Evan Miller (Bug#50098). * m4/c-stack.m4 (gl_C_STACK): Call gl_LIBSIGSEGV before testing gl_cv_lib_sigsegv.
Bruno Haible 8f4538a5 2021-08-14T22:07:33 doc: Update for glibc 2.34. * doc/posix-functions/timespec_getres.texi: New file. * doc/glibc-functions/_Fork.texi: New file. * doc/glibc-functions/closefrom.texi: New file. * doc/glibc-functions/dn_comp.texi: New file. * doc/glibc-functions/dn_skipname.texi: New file. * doc/glibc-functions/execveat.texi: New file. * doc/glibc-functions/posix_spawn_file_actions_addclosefrom_np.texi: New file. * doc/glibc-functions/res_dnok.texi: New file. * doc/glibc-functions/res_hnok.texi: New file. * doc/glibc-functions/res_mailok.texi: New file. * doc/glibc-functions/res_nmkquery.texi: New file. * doc/glibc-functions/res_nquery.texi: New file. * doc/glibc-functions/res_nquerydomain.texi: New file. * doc/glibc-functions/res_nsearch.texi: New file. * doc/glibc-functions/res_nsend.texi: New file. * doc/glibc-functions/res_ownok.texi: New file. * doc/glibc-functions/res_send.texi: New file. * doc/gnulib.texi: Include them. * doc/glibc-functions/inet_neta.texi: Remove file. * doc/glibc-functions/malloc_get_state.texi: Remove file. * doc/glibc-functions/malloc_set_state.texi: Remove file. * doc/glibc-functions/pthread_mutex_consistent_np.texi: Remove file. * doc/glibc-functions/pthread_mutexattr_getrobust_np.texi: Remove file. * doc/glibc-functions/pthread_mutexattr_setrobust_np.texi: Remove file. * doc/glibc-functions/pthread_yield.texi: Remove file. * doc/gnulib.texi: Don't include them. * doc/glibc-headers/resolv.texi: Update. * doc/pastposix-functions/h_errno.texi: Likewise. * doc/posix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise.
Paul Eggert 5b819771 2021-08-12T14:36:34 memrchr-tests: port to GCC 12 * tests/test-memrchr.c: Bug#101494 is fixed in GCC 12.
Akim Demaille 964ce0a9 2021-08-12T09:30:41 snippet/_Noreturn: Fix typo * lib/_Noreturn.h: Fix spelling of 4.
Paul Eggert 6a3bdcfd 2021-08-11T13:00:57 dynarray: merge from glibc This also helps document glibc’s direction in using GCC’s memory-allocation checking. * lib/cdefs.h: Omit comments that glibc rejected. (__returns_nonnull, __attr_access_none, __attr_dealloc) (__attr_dealloc_free): New macros. * lib/libc-config.h: Undef the new macros that are defined unconditionally. * lib/malloc/dynarray_at_failure.c [_LIBC]: Do not include stdlib.h. (__libc_dynarray_at_failure) [_LIBC]: Call __libc_fatal, fixing a bad merge previously.
Bruno Haible 1221876a 2021-08-08T22:11:03 canonicalize-lgpl: Fix conflict with z/OS <sys/stat.h>. Reported by Mike Fulton <mikefultonpersonal@gmail.com> in <https://lists.gnu.org/archive/html/m4-discuss/2021-08/msg00000.html> via Eric Blake. * lib/canonicalize-lgpl.c (__stat): Remove macro. (file_accessible): Use 'stat' instead.
Bruno Haible 0b4d8062 2021-08-08T21:56:42 ptsname_r: Drop sync with glibc. * lib/ptsname_r.c: Drop _LIBC code. (__set_errno, __isatty, __stat, __ttyname_r, __ptsname_r): Remove macros. (ptsname_r): Rename local variable 'save_errno'.
Bruno Haible 375f0d3b 2021-08-08T21:42:26 config: Update after glibc changed. * config/srclist.txt: Remove two files that glibc dropped on 2013-12-17.
Bruno Haible 51dd0550 2021-08-08T19:11:31 relocatable-lib-lgpl: Fix a memory leak related to a Windows DLL. Reported by Jonathan Boeing <jonathan@claws-mail.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2021-08/msg00048.html>. * lib/relocatable.c (DllMain): Avoid memory leak in a special case of repeated attach/detach.
Bruno Haible 1cb09be0 2021-08-08T18:54:06 fopen: Fix link error on native Windows. * modules/fopen (Depends-on): Add close.
Bruno Haible bba5f1be 2021-08-08T18:38:45 fopen: Fix compilation error on AIX (regression from 2020-05-28). * modules/fopen (Depends-on): Add fcntl-h.
Bruno Haible 09917a44 2021-08-08T18:27:56 stdio: Improve GCC 11 allocation-deallocation checking. * lib/stdio.in.h (fdopen, fopen, tmpfile): For GCC >= 11: Declare nearly always. (popen): For GCC >= 11: Declare also when the platform already declares the function or when the module 'popen' is not in use.
Bruno Haible 0b53edc9 2021-08-08T18:23:46 dirent: Improve GCC 11 allocation-deallocation checking. * lib/dirent.in.h (opendir): For GCC >= 11: Declare also when the platform already declares the function or when the module 'opendir' is not in use. (fdopendir): For GCC >= 11: Declare also when the platform already declares the function or when the module 'fdopendir' is not in use.
Bruno Haible 48ece5c3 2021-08-08T18:18:25 stdlib, string, wchar: Improve GCC 11 allocation-deallocation checking. * lib/stdlib.in.h (aligned_alloc): For GCC >= 11: Declare also when the platform already declares the function or when the module 'aligned_alloc' is not in use. (calloc): For GCC >= 11: Declare nearly always. (canonicalize_file_name): For GCC >= 11: Declare also when the platform already declares the function or when the module 'canonicalize-lgpl' is not in use. (malloc, realloc): For GCC >= 11: Declare nearly always. * lib/malloc.in.h: Remove redundant include. (memalign): For GCC >= 11: Declare also when the platform already declares the function or when the module 'memalign' is not in use. * lib/string.in.h: Include <stdlib.h> always. (strdup): For GCC >= 11: Declare also when the platform already declares the function or when the module 'strdup' or 'strdup-posix' is not in use. * lib/wchar.in.h: Include <stdlib.h> always. (wcsdup): For GCC >= 11: Declare also when the platform already declares the function or when the module 'wcsdup' is not in use. * modules/free-posix (Depends-on): Add string, wchar.
Bruno Haible 6ccfbd64 2021-08-08T03:52:01 gnulib-tool: Add support for Automake 1.16.4. Reported by <shoober420@gmail.com> in <https://lists.gnu.org/archive/html/bug-libunistring/2021-08/msg00000.html>. * build-aux/test-driver-1.16.3.diff: Renamed from build-aux/test-driver.diff. * build-aux/test-driver.diff: Update to match Automake 1.16.4. * gnulib-tool (func_create_testdir, func_create_megatestdir): Try both .diff files.
Bruno Haible dac3c7e8 2021-08-08T02:51:24 gnulib-common.m4: Minor style fix. * m4/gnulib-common.m4 (gl_COMMON_BODY): Keep list of attributes sorted alphabetically.
Bruno Haible 526cd383 2021-08-08T02:14:11 uninorm, unistr: Improve GCC 11 allocation-deallocation checking. * lib/uninorm.in.h (uninorm_filter_free): Move declaration up. (uninorm_filter_create): Declare that deallocation must happen through 'uninorm_filter_free'. * lib/unistr.in.h: Include <stdlib.h>. (u8_strdup, u16_strdup, u32_strdup): Declare that deallocation must happen through 'free'.
Bruno Haible 54c36a38 2021-08-08T00:11:49 ialloc: Prepare for allocation-deallocation checking. * lib/ialloc.h (imalloc, irealloc, icalloc): Add comment that deallocation must happen through 'free'.
Bruno Haible 2d2ab37b 2021-08-08T00:09:10 aligned-malloc: Prepare for allocation-deallocation checking. * lib/aligned-malloc.h (aligned_free): Move declaration up. (aligned_malloc): Add comment that deallocation must happen through 'aligned_free'.
Bruno Haible daabfcee 2021-08-08T00:00:36 list, set, oset, map, omap: Prepare allocation-deallocation checking. * lib/gl_list.h (gl_list_create_empty, gl_list_nx_create_empty, gl_list_create, gl_list_nx_create): Add comment that deallocation must happen through 'gl_list_free'. * lib/gl_xlist.h (gl_list_create_empty, gl_list_create): Likewise. * lib/gl_sublist.h (gl_sublist_create, gl_sublist_nx_create): Likewise. * lib/gl_xsublist.h (gl_sublist_create): Likewise. * lib/gl_set.h (gl_set_create_empty, gl_set_nx_create_empty): Add comment that deallocation must happen through 'gl_set_free'. * lib/gl_xset.h (gl_set_create_empty): Likewise. * lib/gl_oset.h (gl_oset_create_empty, gl_oset_nx_create_empty): Add comment that deallocation must happen through 'gl_oset_free'. * lib/gl_xoset.h (gl_oset_create_empty): Likewise. * lib/gl_map.h (gl_map_create_empty, gl_map_nx_create_empty): Add comment that deallocation must happen through 'gl_map_free'. * lib/gl_xmap.h (gl_map_create_empty): Likewise. * lib/gl_omap.h (gl_omap_create_empty, gl_omap_nx_create_empty): Add comment that deallocation must happen through 'gl_omap_free'. * lib/gl_xomap.h (gl_omap_create_empty): Likewise.
Bruno Haible 4c424dc4 2021-08-07T23:36:42 xgetdomainname: Improve GCC 11 allocation-deallocation checking. * lib/xgetdomainname.h: Include <stdlib.h>. (xgetdomainname): Declare that deallocation must happen through 'free'.
Bruno Haible 9af2d6c9 2021-08-07T23:30:53 xgetdomainname: Ensure .c file starts with '#include <config.h>'. * lib/xgetaname-impl.h: New file, based on lib/xgethostname.c. * lib/xgethostname.c: Move implementation to lib/xgetaname-impl.h. * lib/xgetdomainname.c: Include <config.h>. Include xgetaname-impl.h instead of xgethostname.c. * modules/xgethostname (Files): Add lib/xgetaname-impl.h. * modules/xgetdomainname (Files): Likewise. (Depends-on): Remove xgethostname. Add free-posix, xalloc.
Bruno Haible d3c1eca9 2021-08-07T23:15:21 xstrndup: Improve GCC 11 allocation-deallocation checking. * lib/xstrndup.h: Include <stdlib.h> instead of <stddef.h>. (xstrndup): Declare that deallocation must happen through 'free'.
Bruno Haible 5f7e4b01 2021-08-07T23:11:48 xstriconveh: Improve GCC 11 allocation-deallocation checking. * lib/xstriconveh.h: Include <stdlib.h> instead of <stddef.h>. (xstr_cd_iconveh, xstr_iconveh): Declare that deallocation must happen through 'free'.
Bruno Haible 5c2fcfe2 2021-08-07T23:08:45 xmemdup0: Improve GCC 11 allocation-deallocation checking. * lib/xmemdup0.h: Include <stdlib.h> instead of <stddef.h>. (xmemdup0): Declare that deallocation must happen through 'free'.
Bruno Haible 4a0993e3 2021-08-07T23:05:51 windows-spawn: Improve GCC 11 allocation-deallocation checking. * lib/windows-spawn.h: Include <stdlib.h>. (compose_command, compose_envblock): Declare that deallocation must happen through 'free'.
Bruno Haible 40cc7b7e 2021-08-07T22:16:55 string-buffer: Improve GCC 11 allocation-deallocation checking. * lib/string-buffer.h: Include <stdlib.h> instead of <stddef.h>. (sb_dupfree): Declare that deallocation must happen through 'free'.
Bruno Haible 21884ba6 2021-08-07T22:14:02 striconveha: Improve GCC 11 allocation-deallocation checking. * lib/striconveha.h: Include <stdlib.h> instead of <stddef.h>. (str_iconveha): Declare that deallocation must happen through 'free'.
Bruno Haible 392c16a0 2021-08-07T22:10:29 striconveh: Improve GCC 11 allocation-deallocation checking. * lib/striconveh.h: Include <stdlib.h> instead of <stddef.h>. (str_cd_iconveh, str_iconveh): Declare that deallocation must happen through 'free'.
Bruno Haible 4a49d74a 2021-08-07T22:08:16 striconv: Improve GCC 11 allocation-deallocation checking. * lib/striconv.h: Include <stdlib.h> instead of <stddef.h>. (str_cd_iconv, str_iconv): Declare that deallocation must happen through 'free'.
Bruno Haible ccecca2b 2021-08-07T22:04:55 relocatable-lib-lgpl: Improve GCC 11 allocation-deallocation checking. * lib/relocatable.h: Include <stdlib.h>. (compute_curr_prefix): Declare that deallocation must happen through 'free'.
Bruno Haible 72ec85ae 2021-08-07T22:02:37 regex-quote: Improve GCC 11 allocation-deallocation checking. * lib/regex-quote.h: Include <stdlib.h> instead of <stddef.h>. (regex_quote): Declare that deallocation must happen through 'free'.
Bruno Haible fe15063a 2021-08-07T21:55:00 readline: Improve GCC 11 allocation-deallocation checking. * lib/readline.h: Include <stdlib.h>. (readline): Declare that deallocation must happen through 'free'.