Log

Author Commit Date CI Message
Paul Eggert a002cbb9 2021-02-05T17:08:45 regex: fix comment location * lib/regexec.c (update_regs): Move comment.
Paul Eggert e3a06e1c 2021-02-05T17:08:39 regex-tests: add bug 11053 test * tests/test-regex.c (main): New test case for glibc bug 11053.
Paul Eggert 70b673eb 2021-02-05T17:08:10 regex: fix longstanding backref match bug This fixes a longstanding glibc bug concerning backreferences <https://sourceware.org/11053> (2009-12-04). * lib/regexec.c (proceed_next_node, push_fail_stack) (pop_fail_stack): Push and pop the previous registers as well as the current ones. All callers changed. (set_regs): Also pop if CUR_NODE has already been checked, so that it does not get added as a duplicate set entry. (update_regs): Fix comment location. * tests/test-regex.c (tests): New constant. (bug_regex11): New test function. (main): Bump alarm value. Call new test function.
Paul Eggert f5596242 2021-02-05T16:35:46 regex: avoid duplicate in espilon closure * lib/regcomp.c (calc_eclosure_iter): Insert NODE into epsilon closure first rather than last. Otherwise, the epsilon closure might contain a duplicate of NODE.
Paul Eggert 7256c713 2021-02-05T17:08:29 regex: debug check for set member duplicates * lib/regex_internal.c (re_node_set_insert): Add a DEBUG_ASSERT that would have caught some recently-fixed performance bugs that caused sets to contain duplicate members.
Paul Eggert d6f9ba54 2021-02-05T16:35:45 regex: minor refactoring * lib/regexec.c (proceed_next_node): Use more-local decls.
Paul Eggert 37f2bbbe 2021-02-05T16:35:45 regex: avoid undefined behavior * lib/regexec.c (pop_fail_stack): If the stack is empty, return -1 instead of indulging in undefined behavior. This simplifies callers, and avoids undefined behavior in some cases (see glibc bug 11053, though this change does not fix that overall bug).
Paul Eggert a588d480 2021-02-05T16:35:46 regex-tests: fix typo * tests/test-regex.c (main): Fix typo that would have caused an old test case to report incorrect values on failure.
Paul Eggert 388d9432 2021-02-05T16:35:46 regex: make it easier to merge into glibc * lib/regex_internal.h [_LIBC]: Do not include Gnulib’s dynarray.h.
Paul Eggert 607c71a6 2021-02-05T16:35:45 regex: improve comments * lib/regexec.c: Add and correct comments about return values.
Bruno Haible 8aea50f4 2021-01-31T14:28:03 relocatable-prog-wrapper: Tweak today's patch. * build-aux/install-reloc (func_create_wrapper): Clean up free.o.
Bruno Haible 7b9b52a9 2021-01-31T13:27:42 fmaf: Document QEMU bug * doc/posix-functions/fmaf.texi: Add note about QEMU bug.
Bruno Haible 4f16dff6 2021-01-31T13:21:24 remainderl: Work around musl libc bug. * doc/posix-functions/remainderl.texi: Document musl libc bug. * m4/remainderl.m4 (gl_FUNC_REMAINDERL_WORKS): Add more tests. Update cross compilation guess.
Bruno Haible 231b5036 2021-01-31T13:20:28 log2l: Work around musl libc bugs. * doc/posix-functions/log2l.texi: Document musl libc bugs. * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Add more tests. Update cross compilation guess.
Bruno Haible 6958256b 2021-01-31T13:19:17 log1pl: Work around musl libc bug. * doc/posix-functions/log1pl.texi: Document musl libc bug. * m4/log1pl.m4 (gl_FUNC_LOG1PL_WORKS): New macro. (gl_FUNC_LOG1PL): Invoke it.
Bruno Haible a6be52c6 2021-01-31T13:16:30 log10l: Document musl libc bug. * doc/posix-functions/log10l.texi: Document musl libc bug. * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Update comment and cross compilation guess.
Bruno Haible 84d2f6de 2021-01-31T13:15:38 logl: Document musl libc bug. * doc/posix-functions/logl.texi: Document musl libc bug. * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Update comment and cross compilation guess.
Bruno Haible dc25dacc 2021-01-31T13:14:29 expm1l: Document musl libc bug. * doc/posix-functions/expm1l.texi: Document musl libc bug. * m4/expm1l.m4 (gl_FUNC_EXPM1L): Update comment and cross compilation guess.
Bruno Haible db446a33 2021-01-31T13:10:58 expl: Document musl libc bug. * doc/posix-functions/expl.texi: Document musl libc bug. * m4/expl.m4 (gl_FUNC_EXPL): Update comment and cross compilation guess.
Bruno Haible 24446f2d 2021-01-31T12:42:47 relocatable-prog-wrapper: Update after recent changes. * lib/relocwrapper.c: Update comments. * modules/relocatable-prog-wrapper (Files): Add lib/scratch_buffer.h, lib/malloc/scratch_buffer*, lib/malloc.c, lib/realloc.c, lib/free.c, lib/mempcpy.c, lib/rawmemchr.c, m4/lstat.m4. Remove lib/lstat.c. (Depends-on): Add c99, eloop-threshold, fcntl-h, idx, intprops, libc-config, stddef, sys_stat. Remove alloca-opt. (configure.ac): Invoke gl_FUNC_MALLOC_POSIX, gl_FUNC_REALLOC_POSIX, gl_FUNC_FREE, gl_FUNC_MEMPCPY, gl_FUNC_RAWMEMCHR. * lib/canonicalize-lgpl.c (memmove): Undefine in the relocwrapper. * build-aux/install-reloc (func_create_wrapper): Compile also malloc/scratch_buffer_*.c, malloc.c, realloc.c, free.c, mempcpy.c, rawmemchr.c. Don't compile lstat.c.
Bruno Haible a12d5baf 2021-01-31T12:42:33 Make it possible to compile rawmemchr.c separately, unconditionally. * lib/rawmemchr.c: Don't define rawmemchr if not needed.
Bruno Haible 9c86ea67 2021-01-31T12:42:21 Make it possible to compile mempcpy.c separately, unconditionally. * lib/mempcpy.c: Don't define mempcpy if not needed.
Bruno Haible 3dfe86d1 2021-01-31T12:41:33 Make it possible to compile free.c separately, unconditionally. * m4/free.m4 (gl_FUNC_FREE): Define HAVE_FREE_POSIX. * lib/free.c: Don't define rpl_free if not needed.
Bruno Haible 64bdee09 2021-01-31T12:39:31 Make it possible to compile realloc.c separately, unconditionally. * modules/realloc-posix (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/realloc.c: Don't define rpl_realloc if not needed.
Bruno Haible eae672eb 2021-01-31T12:30:18 Make it possible to compile malloc.c separately, unconditionally. * modules/malloc-posix (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/malloc.c: Don't define rpl_malloc if not needed.
Bruno Haible fd71d76a 2021-01-31T12:35:45 canonicalize-lgpl: Simplify. * lib/canonicalize-lgpl.c (_GL_USE_STDLIB_ALLOC): Remove macro.
Bruno Haible b9bb7e33 2021-01-31T12:29:47 canonicalize, canonicalize-lgpl: Straighten dependencies. * modules/canonicalize-lgpl (Depends-on): Remove free-posix, malloc-posix. Add unistd. * modules/canonicalize (Depends-on): Remove free-posix, xalloc. Add unistd.
Bruno Haible 5c79e150 2021-01-30T16:16:04 scratch_buffer: Fix dependencies. * modules/scratch_buffer (Depends-on): Add malloc-posix, realloc-posix, free-posix.
Karl Berry f1cfd82e 2021-01-29T08:25:17 autoupdate
Bruno Haible 2f389230 2021-01-26T17:36:05 doc: More precise wording. Reported by Reuben Thomas <rrt@sc3d.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00300.html>. * doc/relocatable.texi (Enabling Relocatability): Talk about package management systems in general.
Bruno Haible 751ec475 2021-01-26T17:24:09 doc: Remove obsolete text. Suggested by Reuben Thomas <rrt@sc3d.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00299.html>. * doc/relocatable.texi (Enabling Relocatability): Stop mentioning an issue of libtool 1.5.x.
Karl Berry c20a5a13 2021-01-26T07:50:36 autoupdate
Simon Josefsson 87b45614 2021-01-26T16:24:54 maintainer-makefile: Mimic bootstrap's gnulib-srcdir guessing. * top/maint.mk (gnulib_dir): If $(srcdir)/gnulib doesn't exist, fall back to $GNULIB_SRCDIR.
Bruno Haible 3b732e78 2021-01-25T10:12:51 posix_spawn_file_actions_* tests: Fix module dependencies. * modules/posix_spawn_file_actions_addclose-tests (Depends-on): Add posix_spawn_file_actions_destroy. * modules/posix_spawn_file_actions_addopen-tests (Depends-on): Likewise. * modules/posix_spawn_file_actions_adddup2-tests (Depends-on): Likewise. * modules/posix_spawn_file_actions_addchdir-tests (Depends-on): Likewise. * modules/posix_spawn_file_actions_addfchdir-tests (Depends-on): Likewise.
Bruno Haible 36a838b0 2021-01-25T09:59:20 posix_spawn_file_actions_addclose: Relax configure test. * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): Test a negative file descriptor, not an out-of-range file descriptor. * tests/test-posix_spawn_file_actions_addclose.c (main): Add comment. * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Update.
Simon Josefsson e1f404f4 2021-01-25T08:51:29 getaddrinfo: Doc fix. * doc/posix-functions/getaddrinfo.texi (getaddrinfo): Gnulib does not support IDN.
Bruno Haible 6bb37d98 2021-01-24T10:12:00 getcwd: Fix cross-compilation guess for musl libc. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Guess no also on musl libc. * doc/posix-functions/getcwd.texi: Update platform info.
Bruno Haible 829ed1e3 2021-01-24T09:03:05 expm1l: Fix configure test result with GCC 10 on powerpc64le. * m4/expm1l.m4 (gl_FUNC_EXPM1L): Change test to avoid GCC optimization.
Bruno Haible c20ba692 2021-01-23T22:10:25 utime: Fix configure test (regression 2020-12-04). Reported by Ryan Schmidt <wget@ryandesign.com> via Tim Rühsen in <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00282.html>. * m4/utime.m4 (gl_FUNC_UTIME): In the test program, include <utime.h>, not <time.h>.
Paul Eggert 195a10b5 2021-01-23T10:19:24 libc-config: port to Xcode 7 Problem reported by Mattias Engdegård in: https://lists.gnu.org/r/emacs-devel/2021-01/msg01089.html * lib/cdefs.h (__nonnull): If already defined but glibc is not in use, override the definition with Gnulib’s _GL_ATTRIBUTE_NONNULL. This is needed for Xcode 7, which has a ‘#define __nonnull _Nonnull’ builtin for backwards-compatibility with an older Xcode syntax that GNUish code never uses.
Bastien Roucariès cd1b752f 2021-01-23T14:31:44 explicit_bzero: Add fallback for other compilers. * lib/explicit_bzero.c (explicit_bzero): For other compilers, invoke memset through a volatile function pointer.
Bastien Roucariès ac8adb39 2021-01-23T11:22:10 explicit_bzero: Add support for clang. * lib/explicit_bzero.c (explicit_bzero): Add a compiler barrier for clang.
Paul Eggert 605e20a6 2021-01-21T13:40:16 Port FALLTHROUGH to clang 3.4 and earlier Problem reported by Akim Demaille in: https://lists.gnu.org/r/bug-gnulib/2021-01/msg00241.html * lib/cdefs.h (__glibc_has_attribute): * m4/gnulib-common.m4 (gl_COMMON_BODY): Do not trust __has_attribute in clang 3.4 and earlier, as <https://releases.llvm.org/3.5.0/tools/clang/docs/ReleaseNotes.html> says that __has_attribute is unreliable in these old versions.
Bruno Haible 65f62234 2021-01-20T21:44:36 gc-random: Fix link error in tests. * modules/crypto/gc-random (Link): New section. * modules/crypto/gc-tests (Makefile.am): Link test-gc with $(LIB_GETRANDOM).
Simon Josefsson 44ed0db8 2021-01-20T11:50:21 gc-random: Replace implementation with call to getrandom. * lib/gc-gnulib.c [GNULIB_GC_RANDOM]: Replace #include's with those needed for getrandom. (gc_init): Remove old randomness code. (gc_done): Likewise. (randomize): Rewrite using getrandom, inspired by getentropy. * m4/gc-random.m4: Remove file. * modules/crypto/gc-random: Drop gc-random.m4, gl_GC_RANDOM, and LIB_GC_RANDOM. Add conditional dependency on getrandom. * modules/crypto/gc-tests (test_gc_LDADD): Drop LIB_GC_RANDOM.
Bruno Haible 591b1214 2021-01-20T09:39:55 exec*e tests: Avoid test failures on Cygwin. * tests/test-execle-main.c (main): On Cygwin, add /bin to the new PATH. * tests/test-execve-main.c (main): Likewise. * tests/test-execvpe-main.c (main): Likewise.
Bruno Haible 77ca5f1d 2021-01-20T09:14:18 canonicalize-lgpl: Work around a Cygwin bug. * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Test for lstat. Add a test case that involves a symbolic link to an existing file. * doc/posix-functions/realpath.texi: Mention the Cygwin bug.
Bruno Haible fb0e2ad3 2021-01-20T09:08:50 doc: Document ptsname_r bug on Cygwin. * doc/glibc-functions/ptsname_r.texi: Mention Cygwin bug.
Bruno Haible 3ac4735d 2021-01-20T07:40:56 sethostname tests: Avoid test failure on Cygwin. * tests/test-sethostname2.c (main): Treat errno EACCESS like EPERM.
Paul Eggert 5c52f00c 2021-01-19T18:35:30 fnmatch, regex, fts: FALLTHROUGH consistency Be more consistent about how FALLTHROUGH is defined. For Gnulib, use attribute.h. For glibc, use __GNUC__ >= 7. Problem for glibc reported by Vaseeharan Vinayagamoorthy in: https://sourceware.org/pipermail/libc-alpha/2021-January/121778.html * lib/fnmatch.c (FALLTHROUGH) [_LIBC]: * lib/regex_internal.h (FALLTHROUGH) [_LIBC]: Don’t worry about Clang, as it’s not needed and provokes GCC. * lib/fts.c (FALLTHROUGH) [!_LIBC]: * lib/regex_internal.h (FALLTHROUGH) [!_LIBC]: Rely on attribute.h for FALLTHROUGH * modules/regex: Depend on attribute module.
KO Myung-Hun 2ef5a9b4 2021-01-19T01:40:13 spawn-pipe: Fix SIGSEGV on OS/2 kLIBC. * lib/spawn-pipe.c [OS/2 kLIBC]: Check directory correctly if it means a current directory.
KO Myung-Hun 9cd9d631 2021-01-19T19:23:39 dirent: Fix compilation error in C++ mode on OS/2 kLIBC. * lib/dirent.in.h (dirfd): Redefine dirfd macro as a rpl function always.
KO Myung-Hun 70e3c12f 2021-01-19T01:40:11 zerosize-ptr: Fix compilation on OS/2 kLIBC. * tests/zerosize-ptr.h [OS/2 kLIBC]: Don't use mmap().
KO Myung-Hun 4abfff40 2021-01-19T01:40:09 stddef: Fix compilation for max_align_t on OS/2 kLIBC. * lib/stddef.in.h [OS/2 kLIBC]: Include <cstddef> in C++ mode.
KO Myung-Hun dc357e12 2021-01-19T18:44:19 yield: Implement for OS/2 kLIBC. * modules/yield (Depends-on): Add sched_yield.
KO Myung-Hun 516eb87e 2021-01-19T18:41:09 sched_yield: Implement for OS/2 kLIBC. * lib/sched_yield.c (sched_yield) [OS/2 kLIBC]: New implementation.
KO Myung-Hun 6d07b345 2021-01-19T01:40:07 spawn: Use special invocation for <spawn.h> on OS/2 kLIBC. * lib/spawn.in.h: Use special invocation to include <spawn.h> properly on OS/2 kLIBC.
Bruno Haible 7ddc0c29 2021-01-18T15:13:17 noreturn tests: Avoid test failure on Solaris 10/x86 with cc. * tests/test-noreturn.c (main): Return 0.
Karl Berry 4d2d6a0f 2021-01-18T08:51:01 autoupdate
Bruno Haible 615b8f32 2021-01-18T09:10:55 uninorm tests: Fix compilation error on Cygwin. * tests/uninorm/test-nfc.c (n): Don't define when using a preinstalled libunistring on Windows. * tests/uninorm/test-nfd.c (n): Likewise. * tests/uninorm/test-nfkc.c (n): Likewise. * tests/uninorm/test-nfkd.c (n): Likewise.
Bruno Haible ee634876 2021-01-18T00:32:52 immutable: Implement on native Windows. * lib/immutable.h (IMMUTABLE_EFFECTIVE): Set to 1 on native Windows. * lib/immutable.c: Include <windows.h>. (CreateFileMapping): New macro. (init_pagesize, init_mmap_file, alloc_pages, free_pages): Add implementation for native Windows.
Bruno Haible 8491d944 2021-01-17T22:13:25 canonicalize-lgpl tests: Fix link error. * modules/canonicalize-lgpl-tests (Makefile.am): Link test-canonicalize-lgpl with $(LIBINTL).
Bruno Haible 6ee6c718 2021-01-17T22:07:14 canonicalize-lgpl: Work around // handling in realpath() of musl 1.2.2. Reported by Natanael Copa <ncopa@alpinelinux.org> in <https://lists.gnu.org/archive/html/bug-gettext/2021-01/msg00021.html>. * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Add a test whether // is the same as /, on Linux only. * lib/canonicalize-lgpl.c: Correct indentation of preprocessor directives. * doc/posix-functions/realpath.texi: Mention the musl 1.2.2 bug.
Bruno Haible b67dcfce 2021-01-17T17:22:25 canonicalize[-lgpl] tests: Add more tests. * tests/test-canonicalize.c (main): Add detailed tests for // handling. * tests/test-canonicalize-lgpl.c (main): Likewise.
Bruno Haible 2473046c 2021-01-17T09:22:11 argp tests: Avoid test failures on Alpine Linux. * tests/test-argp-2.sh: Use the test framework (init.sh). Use the 'compare' function instead of 'diff -c'. * tests/test-argp-version-etc-1.sh: Likewise.
Bruno Haible 2e9b9370 2021-01-17T09:17:40 get-rusage-data tests: Avoid test failure on musl libc. * modules/get-rusage-data-tests (Files): Add m4/musl.m4. (configure.ac): Invoke gl_MUSL_LIBC. * tests/test-get-rusage-data.c (main): Treat musl libc like glibc.
Bruno Haible c7710c14 2021-01-17T09:13:20 immutable, get-rusage-data: Fix autoconf warning. * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Define through AC_DEFUN_ONCE.
Bruno Haible ee313987 2021-01-16T19:14:35 vma-iter: Port to 64-bit Haiku. * lib/vma-iter.c (vma_iterate): Adapt to changed signature of get_next_area_info.
Bruno Haible 028296a9 2021-01-15T10:22:33 doc: Update doc about realpath. * doc/posix-functions/realpath.texi: Update info about macOS.
Paul Eggert af586b72 2021-01-13T15:46:33 verify: simplify static_assert configuration * lib/verify.h (_GL_HAVE__STATIC_ASSERT, _GL_HAVE__STATIC_ASSERT1): Do not define for C++. This should be good enough nowadays, since recent-enough C++ compilers have static_assert. (_GL_HAVE_STATIC_ASSERT_CXX11, _GL_HAVE_STATIC_ASSERT_CXX17): Remove. All uses replaced by simply checking __cpp_static_assert.
Simon Josefsson a8bac4d4 2021-01-13T14:38:20 lib-msvc-compat: Update libtool usage recommendation. * doc/ld-output-def.texi (Visual Studio Compatibility): Install .def files into libdir, not bindir. Have libfoo-*.def file depend on libfoo.la to fix parallell builds.
Bruno Haible 8a10202d 2021-01-12T21:11:13 verify: Use C++11 static_assert when available. Reported by Alexandre Duret-Lutz <adl@lrde.epita.fr> in <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00177.html>. * lib/verify.h (_GL_HAVE_STATIC_ASSERT_CXX11): New macro. (_GL_HAVE_STATIC_ASSERT_CXX17): Renamed from _GL_HAVE_STATIC_ASSERT1. (_GL_VERIFY): Use static_assert when available with C++11 syntax.
Paul Eggert 854fbb81 2021-01-11T16:46:12 tempname: consume less entropy Derived from a glibc patch proposed by Adhemerval Zanella in: https://sourceware.org/pipermail/libc-alpha/2021-January/121302.html * lib/tempname.c: Include stdbool.h. (random_bits): New arg use_getrandom. (try_tempname_len): Skip getrandom on the first try, unless __GT_NOCREATE. * modules/tempname (Depends-on): Add stdbool.
Bruno Haible b1268f22 2021-01-10T23:06:39 lchmod-tests: Fix link error. * modules/lchmod-tests (Makefile.am): Don't assume that LIBINTL is set.
Simon Josefsson 411da821 2021-01-10T11:28:31 Correct preceeding change. * top/gitsub.sh: Update link.
Bruno Haible 14eeb810 2021-01-10T01:15:01 immutable: Add tests. * tests/test-immutable.sh: New file. * tests/test-immutable.c: New file. * modules/immutable-tests: New file.
Bruno Haible 9f87c80a 2021-01-10T01:13:04 immutable: New module. * lib/immutable.h: New file. * lib/immutable.c: New file. * m4/immutable.m4: New file. * m4/mprotect.m4: New file, based on libffcall/m4/codeexec.m4. * modules/immutable: New file.
Simon Josefsson b7da35ae 2021-01-10T01:08:38 Use https:// instead of git://. * build-aux/bootstrap (default_gnulib_url): Ditto. * config/srclistvars.sh: Ditto. * doc/gnulib-readme.texi (Git Checkout): Ditto. * doc/gnulib-tool.texi (VCS Issues): Ditto. * top/gitsub.sh: Update link.
Paul Eggert 077ffc1e 2021-01-09T14:17:32 snippet/_Noreturn: port to pedantic clang Problem reported by Joe Nelson in: https://lists.gnu.org/r/bug-gnulib/2021-01/msg00152.html * doc/noreturn.texi: Improve. * lib/_Noreturn.h (_Noreturn): * m4/gnulib-common.m4 (gl_COMMON_BODY): Do not assume _Noreturn works as-is when __STRICT_ANSI__ is defined, unless __STDC_VERSION__ indicates C11 or later. * lib/_Noreturn.h (_Noreturn): Fall back on __attribute__ ((__noreturn__)) if Clang; this merges the 2020-08-10T23:53:13Zbruno@clisp.org patch to m4/gnulib-common.m4.
Darshit Shah 22f880ff 2021-01-09T11:42:26 Allow setting CVS username for gnu-web-doc-update. * build-aux/gnu-web-doc-update: Introduce new option --user to set the name of the user on Savannah, when it doesn't match $USER.
Bruno Haible 8ed1d1f9 2021-01-09T12:47:42 exp* tests: Work around clang 6.0.1 optimization bugs on x86. * tests/test-exp-ieee.h (test_function): Mark some variable as 'volatile'. * tests/test-exp2-ieee.h (test_function): Likewise.
Bruno Haible c738b11c 2021-01-09T08:20:17 fchmodat: Work around trailing slash bug in fchmodat() on AIX 7.2. * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): In the test whether fchmodat works, also test for the trailing slashes behaviour. Define HAVE_NEARLY_WORKING_FCHMODAT if this is the only missing feature. * lib/fchmodat.c (fchmodat): If HAVE_NEARLY_WORKING_FCHMODAT, handle trailing slashes here. * modules/fchmodat (Depends-on): Sort by condition, not alphabetically. * doc/posix-functions/fchmodat.texi: Document the AIX bug.
Bruno Haible 71109861 2021-01-09T06:11:24 fchmod-tests, fchmodat tests, lchmod tests: Add more tests. * tests/test-fchmod.c: Include <fcntl.h>. (BASE): New macro. (main): Add more tests. * tests/test-fchmodat.c (main): Add more tests. * tests/test-lchmod.c (main): Likewise.
Bruno Haible 893f8c74 2021-01-09T07:45:01 utimensat: Fix typo in last commit. * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Fix typo in macro explanation.
Bruno Haible b32c83f5 2021-01-09T07:43:37 truncate: Document last workaround. * doc/posix-functions/truncate.texi: Document the AIX bug.
Paul Eggert 6a00fdb4 2021-01-08T19:50:16 dynarray: work even if ‘free’ is replaced Problem reported by Darshit Shah in: https://lists.gnu.org/r/bug-gnulib/2021-01/msg00140.html * lib/malloc/dynarray-skeleton.c (DYNARRAY_FREE): New macro. Use it everywhere instead of DYNARRAY_NAME (free).
Paul Eggert b0ebaf83 2021-01-08T17:54:30 tempname: don’t block for minutes Derived from a patch proposed by Adhemerval Zanella in: https://sourceware.org/pipermail/libc-alpha/2021-January/121302.html * lib/tempname.c (random_bits): Use GRND_NONBLOCK.
Paul Eggert 551b70f4 2021-01-08T17:31:28 tempname: sync with proposed glibc patch This is from Adhemerval Zanella in: https://sourceware.org/pipermail/libc-alpha/2021-January/121301.html * lib/tempname.c (__lxstat64): Remove. (__lstat64, __stat64): New replacement macros. All uses changed.
Paul Eggert 87ed1f9c 2021-01-08T17:17:32 regex: stop using alloca * lib/regex_internal.h: Do not include <alloca.h> or define __libc_use_alloca or alloca. Patch written by Adhemerval Zanella: https://sourceware.org/pipermail/libc-alpha/2021-January/121374.html * modules/regex (Depends-on): Remove alloca-opt.
Paul Eggert 1731fef3 2021-01-08T14:22:15 regexec: remove alloca usage in build_trtable Prompted by this different change proposed by Adhemerval Zanella: https://sourceware.org/pipermail/libc-alpha/2021-January/121373.html * lib/regexec.c (build_trtable): Prevent inlining, so that it doesn’t bloat the caller’s stack. Use auto variables instead of alloca/malloc. After these changes, build_trtable’s total stack allocation is only 20 KiB on a 64-bit machine, and this is less than glibc’s 64 KiB cutoff so there’s little point to using alloca to shrink it. Although Gnulib traditionally has used a 4 KiB cutoff, going to 20 KiB here should not be a significant problem in practice; Gnulib-using packages concerned about overflow of tiny stacks can compile with something like gcc -fstack-clash-protection. * config/srclist.txt: Comment out regexec.c for now.
Paul Eggert b0e441b8 2021-01-08T12:01:37 scratch_buffer: add scratch_buffer_dupfree macro * lib/scratch_buffer.h (__libc_scratch_buffer_dupfree): New macro, needed to support recent changes in this module.
Paul Eggert b6207ab3 2021-01-08T12:00:09 regex: remove alloca usage on regex set_regs Derived from this patch by Adhemerval Zanella: https://sourceware.org/pipermail/libc-alpha/2021-January/121372.html * lib/regex_internal.h: Include dynarray.h, for Gnulib. * lib/regexec.c (DYNARRAY_STRUCT, DYNARRAY_ELEMENT) (DYNARRAY_PREFIX): New macros. Include malloc/dynarray-skeleton.c. (set_regs): Use dynarray rather than alloca. * modules/regex (Depends-on): Add dynarray.
Paul Eggert 921d2ea1 2021-01-08T11:44:19 dynarray: new module * config/srclist.txt: Mention the new files. * lib/cdefs.h (__attribute_maybe_unused__): New macro, like Gnulib’s _GL_ATTRIBUTE_MAYBE_UNUSED but with glibc naming conventions. * lib/libc-config.h: Use it instead of __glibc_likely. * lib/dynarray.h, modules/dynarray: New files. * lib/malloc/dynarray-skeleton.c, lib/malloc/dynarray.h: * lib/malloc/dynarray_at_failure.c: * lib/malloc/dynarray_emplace_enlarge.c: * lib/malloc/dynarray_finalize.c, lib/malloc/dynarray_resize.c: * lib/malloc/dynarray_resize_clear.c, modules/dynarray: New files, from glibc with the following changes needed for portability to compilers that are not recent-enough GCC. * lib/malloc/dynarray_at_failure.c: Include stdlib.h, for abort. (__libc_dynarray_at_failure) [!_LIBC]: Simply abort. * lib/malloc/dynarray_emplace_enlarge.c: * lib/malloc/dynarray_resize.c: Include intprops.h, and use INT_MULTIPLY_WRAPV instead of __builtin_mul_overflow. * lib/malloc/dynarray.h (__libc_dynarray_at_failure): Use _Noreturn instead of __attribute__ ((noreturn)). * lib/malloc/dynarray_resize_clear.c: Do not include stdlib.h; it’s not needed. (__libc_dynarray_resize_clear): Do not do arithmetic on void *. * lib/malloc/dynarray-skeleton.c (struct DYNARRAY_STRUCT): Do not use anonymous unions, as they are not in C99. All uses changed. Use __nonnull (X) instead of __attribute__ ((nonnull X)), and __attribute_maybe_unused__ instead of __attribute__ ((unused)).
Simon Josefsson bdae9a5d 2021-01-08T11:49:59 bootstrap: Fix parsing of package name. * build-aux/bootstrap (package): Attempt to use autoconf --trace to parse AC_INIT before falling back to sed expression.
Bruno Haible 6047713a 2021-01-07T22:55:41 localename: Fix link error with duplocale on AIX 7.2 (regr. 2019-12-18). * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize LOCALENAME_ENHANCE_LOCALE_FUNCS. * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Set gt_working_uselocale. (gt_INTL_THREAD_LOCALE_NAME): Set gt_fake_locales, gt_good_uselocale, gt_localename_enhances_locale_funcs, LOCALENAME_ENHANCE_LOCALE_FUNCS. Define HAVE_GOOD_USELOCALE, LOCALENAME_ENHANCE_LOCALE_FUNCS. * m4/localename.m4 (gl_LOCALENAME): Test gt_localename_enhances_locale_funcs instead of gt_nameless_locales. * modules/locale (Makefile.am): Substitute LOCALENAME_ENHANCE_LOCALE_FUNCS. * lib/locale.in.h (newlocale, duplocale, freelocale): Don't override if module 'localename' is in use but LOCALENAME_ENHANCE_LOCALE_FUNCS is 0. * lib/localename.c (HAVE_GOOD_USELOCALE): Don't define here. (get_locale_t_name, newlocale, duplocale, freelocale): Define if LOCALENAME_ENHANCE_LOCALE_FUNCS.
Karl Berry 9af36f42 2021-01-07T07:53:54 autoupdate
Bruno Haible 30820c2d 2021-01-06T20:46:52 logb: Fix test failure on glibc/powerpc. * m4/logb.m4 (gl_FUNC_LOGB_WORKS): Fix typo in comment.
Bruno Haible 08afe3dc 2021-01-06T19:59:10 logb: Fix test failure on glibc/powerpc. * doc/posix-functions/logb.texi: Update platform info. * m4/logb.m4 (gl_FUNC_LOGB_WORKS): Test against bug with negative subnormal numbers.
Paul Eggert a4be4b42 2021-01-06T10:02:33 libc-config: simplify clang __has_* macros cdefs.h sometimes used names like __glibc_clang_has_attribute and sometimes __glibc_has_attribute. There is no need in glibc or Gnulib to distinguish clang from other compilers here, so be consistent and use the simpler names. * lib/cdefs.h (__glibc_has_builtin, __glibc_has_extension): Rename from __glibc_clang_has_builtin, __glibc_clang_has_extension. All uses changed. (__glibc_clang_has_attribute): Remove. All uses replaced by __glibc_has_attribute. * lib/libc-config.h [!__glibc_likely]: Undef them here too. This fixes a problem where __glibc_has_attribute was not undeffed.
Bruno Haible e478401b 2021-01-06T12:15:33 flock: Update documentation. * doc/glibc-functions/flock.texi: Document what to expect on AIX and Solaris.