summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* autoupdateKarl Berry2021-01-181-101/+62
|
* uninorm tests: Fix compilation error on Cygwin.Bruno Haible2021-01-185-4/+13
| | | | | | | | * 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.
* immutable: Implement on native Windows.Bruno Haible2021-01-183-11/+101
| | | | | | | | * 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.
* canonicalize-lgpl tests: Fix link error.Bruno Haible2021-01-172-0/+7
| | | | | * modules/canonicalize-lgpl-tests (Makefile.am): Link test-canonicalize-lgpl with $(LIBINTL).
* canonicalize-lgpl: Work around // handling in realpath() of musl 1.2.2.Bruno Haible2021-01-174-18/+51
| | | | | | | | | | | 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.
* canonicalize[-lgpl] tests: Add more tests.Bruno Haible2021-01-173-2/+95
| | | | | * tests/test-canonicalize.c (main): Add detailed tests for // handling. * tests/test-canonicalize-lgpl.c (main): Likewise.
* argp tests: Avoid test failures on Alpine Linux.Bruno Haible2021-01-173-22/+30
| | | | | | * 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.
* get-rusage-data tests: Avoid test failure on musl libc.Bruno Haible2021-01-173-1/+10
| | | | | | * 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.
* immutable, get-rusage-data: Fix autoconf warning.Bruno Haible2021-01-172-2/+7
| | | | * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Define through AC_DEFUN_ONCE.
* vma-iter: Port to 64-bit Haiku.Bruno Haible2021-01-162-1/+7
| | | | | * lib/vma-iter.c (vma_iterate): Adapt to changed signature of get_next_area_info.
* doc: Update doc about realpath.Bruno Haible2021-01-152-2/+7
| | | | * doc/posix-functions/realpath.texi: Update info about macOS.
* verify: simplify static_assert configurationPaul Eggert2021-01-142-31/+13
| | | | | | | | * 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.
* lib-msvc-compat: Update libtool usage recommendation.Simon Josefsson2021-01-132-1/+9
| | | | | | * 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.
* verify: Use C++11 static_assert when available.Bruno Haible2021-01-122-4/+24
| | | | | | | | | 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.
* tempname: consume less entropyPaul Eggert2021-01-113-3/+26
| | | | | | | | | | 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.
* lchmod-tests: Fix link error.Bruno Haible2021-01-102-1/+6
| | | | * modules/lchmod-tests (Makefile.am): Don't assume that LIBINTL is set.
* Correct preceeding change.Simon Josefsson2021-01-102-2/+7
| | | | * top/gitsub.sh: Update link.
* immutable: Add tests.Bruno Haible2021-01-104-0/+190
| | | | | | * tests/test-immutable.sh: New file. * tests/test-immutable.c: New file. * modules/immutable-tests: New file.
* immutable: New module.Bruno Haible2021-01-106-0/+559
| | | | | | | | * 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.
* Use https:// instead of git://.Simon Josefsson2021-01-106-10/+19
| | | | | | | | * 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.
* snippet/_Noreturn: port to pedantic clangPaul Eggert2021-01-094-20/+41
| | | | | | | | | | | | | 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.
* Allow setting CVS username for gnu-web-doc-update.Darshit Shah2021-01-092-2/+11
| | | | | * 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.
* exp* tests: Work around clang 6.0.1 optimization bugs on x86.Bruno Haible2021-01-093-2/+9
| | | | | | * tests/test-exp-ieee.h (test_function): Mark some variable as 'volatile'. * tests/test-exp2-ieee.h (test_function): Likewise.
* fchmodat: Work around trailing slash bug in fchmodat() on AIX 7.2.Bruno Haible2021-01-095-20/+72
| | | | | | | | | | * 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.
* fchmod-tests, fchmodat tests, lchmod tests: Add more tests.Bruno Haible2021-01-094-1/+85
| | | | | | | | * 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.
* utimensat: Fix typo in last commit.Bruno Haible2021-01-092-2/+7
| | | | * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Fix typo in macro explanation.
* truncate: Document last workaround.Bruno Haible2021-01-092-0/+9
| | | | * doc/posix-functions/truncate.texi: Document the AIX bug.
* dynarray: work even if ‘free’ is replacedPaul Eggert2021-01-082-3/+13
| | | | | | | 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).
* tempname: don’t block for minutesPaul Eggert2021-01-082-2/+8
| | | | | | 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.
* tempname: sync with proposed glibc patchPaul Eggert2021-01-082-3/+10
| | | | | | | 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.
* regex: stop using allocaPaul Eggert2021-01-083-20/+6
| | | | | | | * 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.
* regexec: remove alloca usage in build_trtablePaul Eggert2021-01-083-63/+28
| | | | | | | | | | | | | | | | 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.
* scratch_buffer: add scratch_buffer_dupfree macroPaul Eggert2021-01-082-0/+5
| | | | | * lib/scratch_buffer.h (__libc_scratch_buffer_dupfree): New macro, needed to support recent changes in this module.
* regex: remove alloca usage on regex set_regsPaul Eggert2021-01-084-22/+30
| | | | | | | | | | | 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.
* dynarray: new modulePaul Eggert2021-01-0813-6/+1087
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)).
* bootstrap: Fix parsing of package name.Simon Josefsson2021-01-082-4/+13
| | | | | * build-aux/bootstrap (package): Attempt to use autoconf --trace to parse AC_INIT before falling back to sed expression.
* localename: Fix link error with duplocale on AIX 7.2 (regr. 2019-12-18).Bruno Haible2021-01-077-16/+63
| | | | | | | | | | | | | | | | | | | * 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.
* autoupdateKarl Berry2021-01-071-2/+2
|
* logb: Fix test failure on glibc/powerpc.Bruno Haible2021-01-061-1/+1
| | | | * m4/logb.m4 (gl_FUNC_LOGB_WORKS): Fix typo in comment.
* logb: Fix test failure on glibc/powerpc.Bruno Haible2021-01-063-9/+32
| | | | | | * doc/posix-functions/logb.texi: Update platform info. * m4/logb.m4 (gl_FUNC_LOGB_WORKS): Test against bug with negative subnormal numbers.
* libc-config: simplify clang __has_* macrosPaul Eggert2021-01-063-44/+46
| | | | | | | | | | | | | | 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.
* flock: Update documentation.Bruno Haible2021-01-062-3/+10
| | | | | * doc/glibc-functions/flock.texi: Document what to expect on AIX and Solaris.
* ilogbl: Fix compilation error with xlclang on AIX 7.2.Bruno Haible2021-01-062-1/+7
| | | | * lib/math.in.h (ilogbl): Undefine macro before declaration.
* ilogbl: Fix test failures on AIX 7.1 in 64-bit mode.Bruno Haible2021-01-063-5/+23
| | | | | | * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Test also some denormalized argument. * doc/posix-functions/ilogbl.texi: Mention the AIX bug.
* ilogb: Fix test failures on AIX 7.1 in 64-bit mode.Bruno Haible2021-01-063-3/+24
| | | | | | * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Test also some denormalized argument. * doc/posix-functions/ilogb.texi: Mention the AIX bug.
* fclose: Fix test failure on AIX 7.2.Bruno Haible2021-01-064-3/+84
| | | | | | | * m4/fclose.m4 (gl_FUNC_FCLOSE_STDIN): New macro. (gl_FUNC_FCLOSE): Invoke it. Set REPLACE_FCLOSE accordingly. * doc/posix-functions/fclose.texi: Update platform information. * doc/posix-functions/fflush.texi: Likewise.
* pipe-filter-gi: Fix test failure on AIX 7.2.Bruno Haible2021-01-062-0/+14
| | | | * lib/pipe-filter-aux.h (SSIZE_MAX) [AIX]: Set to 4096.
* utimens, utimensat, fdutimensat: Avoid test failures on AIX 7.2.Bruno Haible2021-01-063-1/+20
| | | | | | | * lib/utimecmp.c (utimecmpat): On AIX, declare equality when the two times differ by less than 0.01 seconds. * tests/test-futimens.h (test_futimens): Pass UTIMECMP_TRUNCATE_SOURCE flag.
* utimensat: Work around trailing slash bug in utimensat() on AIX 7.2.Bruno Haible2021-01-068-39/+118
| | | | | | | | | | | * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Require AC_CANONICAL_HOST. Add a test for trailing slash handling. Improve cross-compilation guesses. Conditionally define HAVE_NEARLY_WORKING_UTIMENSAT. * lib/utimensat.c (rpl_utimensat): Add alternative implementation when HAVE_NEARLY_WORKING_UTIMENSAT is defined. * lib/utimens.c: Use the overridden utimensat when HAVE_NEARLY_WORKING_UTIMENSAT is defined. * doc/posix-functions/utimensat.texi: Mention the AIX bug.
* ptsname_r, ptsname: Avoid test failures on AIX 7.2.Bruno Haible2021-01-053-3/+55
| | | | | | * tests/test-ptsname_r.c (main): On AIX, set a 20-seconds timer. * tests/test-ptsname.c (main): Likewise. On AIX, open a pty through /dev/ptc and don't test the BSD ptys.