summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: Set executable bit on more tests.Bruno Haible2023-04-084-0/+7
| | | | | | * tests/test-c-dtoastr.sh: Make executable. * tests/test-c-ldtoastr.sh: Likewise. * tests/test-immutable.sh: Likewise.
* Use the 'extern-inline' module explicitly where needed.Bruno Haible2023-04-087-0/+16
| | | | | | | | | * modules/fdutimensat (Depends-on): Add extern-inline. * modules/file-has-acl (Depends-on): Likewise. * modules/hamt (Depends-on): Likewise. * modules/relocatable-prog-wrapper (Depends-on): Likewise. * modules/safe-alloc (Depends-on): Likewise. * modules/xvasprintf (Depends-on): Likewise.
* trim: Fix trim_trailing result in multibyte locales.Bruno Haible2023-04-082-40/+19
| | | | | | * lib/trim.c (trim2): Simplify algorithm for trim_trailing in multibyte locales, to use 2 instead of 3 states. (IF_LINT): Remove macro.
* stddef: Fix __need_wint_t handling in case of two stddef.h overrides.Bruno Haible2023-04-082-3/+9
| | | | | * lib/stddef.in.h: Replace _GL_STDDEF_WINT_T with a symbol that depends on the @GUARD_PREFIX@.
* snprintf: Avoid autoconf warning regarding gl_PRINTF_POSITIONS.Bruno Haible2023-04-082-3/+8
| | | | * m4/printf.m4 (gl_PRINTF_POSITIONS): Define through AC_DEFUN_ONCE.
* is* tests: Ensure needed .m4 files are packaged.Bruno Haible2023-04-0810-3/+28
| | | | | | | | | | | | * modules/isfinite-tests (Files): Add m4/exponent*.m4. * modules/isnan-tests (Files): Likewise. * modules/isnanf-tests (Files): Add m4/exponentf.m4. * modules/isnanf-nolibm-tests (Files): Likewise. * modules/isnand-tests (Files): Add m4/exponentd.m4. * modules/isnand-nolibm-tests (Files): Likewise. * modules/isnanl-tests (Files): Add m4/exponentl.m4. * modules/isnanl-nolibm-tests (Files): Likewise. * modules/isinf-tests (Files): Reorder.
* largefile: sync from Autoconf masterPaul Eggert2023-03-296-209/+287
| | | | | | | | | | | | | | | | | | * m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE): Test whether AC_SYS_YEAR2038 is defined when this macro is defined, not when it is used, as we now define AC_SYS_YEAR2038 later. (_AC_SYS_LARGEFILE_MACRO_VALUE): Remove. (_AC_SYS_YEAR2038_TEST_CODE, _AC_SYS_YEAR2038_OPTIONS) (_AC_SYS_YEAR2038_PROBE, _AC_SYS_YEAR2038_ENABLE) (_AC_SYS_YEAR2038_OPT_IN, AC_SYS_YEAR2038) (_AC_SYS_LARGEFILE_TEST_CODE, _AC_SYS_LARGEFILE_OPTIONS) (_AC_SYS_LARGEFILE_PROBE, _AC_SYS_LARGEFILE_ENABLE): New macros. (AC_SYS_LARGEFILE): Use them. * m4/year2038.m4: Remove. All mentions removed. * modules/largefile, modules/year2038 (configure.ac-early): Do not require gl_YEAR2038_EARLY. * modules/year2038 (Depends-on): Depend on largefile. (configure.ac): Require AC_SYS_YEAR2038, not gl_YEAR2038.
* largefile, year2038: simplify if Autoconf 2.72Paul Eggert2023-03-293-2/+24
| | | | | | | | * m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE) (_AC_SYS_LARGEFILE_MACRO_VALUE): * m4/year2038.m4 (gl_YEAR2038_EARLY, gl_YEAR2038, gl_YEAR2038_BODY): Adjust to Autoconf 2.72, which should contain the Gnulib patches in this area and so should not need to be overridden.
* printf-posix tests: Fix compilation error (regression 2021-08-28).Bruno Haible2023-03-292-0/+6
| | | | * modules/printf-posix-tests (Files): Add tests/qemu.h.
* gnu-web-doc-update: don't use host alias, cvs.sv.gnu.orgJim Meyering2023-03-292-2/+10
| | | | | | | * build-aux/gnu-web-doc-update: Use hostname cvs.savannah.gnu.org, not cvs.sv.gnu.org. Using the shorter alias would elicit this: $ pkg=grep ; cvs -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg Bad server host key: Invalid key length
* unistdio/u*-vasnprintf: Fix conversion of %Id directive result.Bruno Haible2023-03-222-4/+12
| | | | | * lib/vasnprintf.c (VASNPRINTF): Don't assume that snprintf's result is entirely ASCII if the directive contain the glibc 'I' flag.
* gnupload: correct SFTP connection URLAr Rakin2023-03-222-2/+10
| | | | | | | | Approved by Sergey Poznyakoff in <https://lists.gnu.org/archive/html/bug-gnulib/2023-03/msg00078.html>. * build-aux/gnupload: fix gnu.org.ua SFTP connection URL: puszcza.gnu.org.ua -> download.gnu.org.ua
* memrchr tests: Avoid GCC warning.Bruno Haible2023-03-222-2/+8
| | | | | * tests/test-memrchr.c: Don't use '#pragma GCC diagnostic' for GCC versions older than 4.7.
* vasnprintf: Fix potentially wrong zero-padding.Bruno Haible2023-03-222-0/+22
| | | | | * lib/vasnprintf.c (VASNPRINTF): Fix zero-padding when the result starts with a prefix "0x" or "0b".
* test-pselect, test-select: use different portsPaul Eggert2023-03-224-5/+19
| | | | | | | | | | | | | I have observed rare and hard-to-reproduce problems with the GNU grep release candidate with ‘make -j5 check’ on Fedora 37 x86-64. One possibility is that test-pselect and test-select interfere with each other somehow when run simultaneously, as they use the same port. Work around this possibility by using different ports from each other, and from test-poll (which also uses 12345). Of course it’d be better if all these tests used system-assigned ports, but I assume that’d take more work. * tests/test-pselect.c, tests/test-select.c (TEST_PORT): New macro. * tests/test-select.h (TEST_PORT): Remove.
* vasnprintf: Fix potential failure on OpenBSD.Bruno Haible2023-03-222-0/+10
| | | | * lib/vasnprintf.c (VASNPRINTF): Don't use the %n directive on OpenBSD.
* stddef: Fix a compilation error on AIX 7.2 with xlclang.Bruno Haible2023-03-222-1/+9
| | | | | * lib/stddef.in.h (__CLANG_MAX_ALIGN_T_DEFINED): Define whenever we define GNULIB_defined_max_align_t.
* fts: fail gracefully when out of memoryChuanGang Jiang2023-03-022-2/+12
| | | | | * lib/fts.c (fts_read): Set errno==ENOMEM and return NULL when setup_dir() fails, rather than hitting an assertion later.
* dfa: Avoid warnings with some Apple clang versions.Bruno Haible2023-03-022-1/+15
| | | | | | | | | | | Reported by Werner Lemberg <wl@gnu.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00159.html>. * lib/dfa.c (FALLTHROUGH): When __apple_build_version__ is defined, ignore __clang_major__. References: https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2 https://github.com/apple/llvm-project/blob/swift-5.3-RELEASE/clang/test/Sema/fallthrough-attr.c
* lseek: avoid SEEK_HOLE bugs in FreeBSD, macOSPaul Eggert2023-03-024-8/+65
| | | | | | | | | | | | | This attempts to fix <https://bugs.gnu.org/61386>, a bug in GNU cp caused by a serious data corruption bug in FreeBSD and macOS. * doc/posix-functions/lseek.texi: Mention the bug. * lib/unistd.in.h (SEEK_DATA, SEEK_HOLE): Undef in macOS < 13 and FreeBSD < 14. FreeBSD fixed the bug sometime during FreeBSD 13 <https://bugs.freebsd.org/256205>, so the "FreeBSD < 14" is conservative. It’s unknown when Apple will fix macOS so use macOS "9999" as a placeholder. * m4/lseek.m4 (gl_FUNC_LSEEK): Replace lseek if on one of the above platforms.
* hamt: Detect GCC version correctly.ChuanGang Jiang2023-03-022-2/+7
| | | | * lib/hamt.h:Use __GNUC_MINOR__, not __GNUC_MINOR.
* terminfo, termcap: Avoid wrong configure result with clang ≥ 15.Bruno Haible2023-03-023-8/+18
| | | | | | | | | | | clang 15 reports an error for -Wint-conversion by default. Reported by Sam James <sam@gentoo.org> in <https://savannah.gnu.org/bugs/?63793>. * m4/terminfo.m4 (gl_TERMINFO_BODY): Avoid a -Wint-conversion warning when testing for tparam and tparm. * m4/termcap.m4 (gl_TERMCAP_BODY): Likewise.
* unilbrk: Don't compile unused functions outside of libunistring.Bruno Haible2023-03-0217-32/+113
| | | | | | | | | | | | | | | | | | | | | | | | * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Don't compile outside of libunistring. * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks): Likewise. * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks): Likewise. * lib/unilbrk/ulc-possible-linebreaks.c (ulc_possible_linebreaks): Likewise. * lib/unilbrk/u8-width-linebreaks.c (u8_width_linebreaks): Likewise. * lib/unilbrk/u16-width-linebreaks.c (u16_width_linebreaks): Likewise. * lib/unilbrk/u32-width-linebreaks.c (u32_width_linebreaks): Likewise. * lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks): Likewise. * tests/unilbrk/test-u8-possible-linebreaks.c (main): Outside of libunistring, don't test the backward compatibility function. * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise. * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise. * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise. * tests/unilbrk/test-u8-width-linebreaks.c (main): Likewise. * tests/unilbrk/test-u16-width-linebreaks.c (main): Likewise. * tests/unilbrk/test-u32-width-linebreaks.c (main): Likewise. * tests/unilbrk/test-ulc-width-linebreaks.c (main): Likewise.
* sigsegv: Fix a compilation error on OpenBSD with clang ≥ 16.Bruno Haible2023-03-022-1/+7
| | | | | * lib/sigsegv.c (install_for): Add a cast when assigning to action.sa_sigaction.
* mkfifoat: Fix crash on macOS 12.Bruno Haible2023-03-023-4/+134
| | | | | | | * m4/gnulib-common.m4 (gl_PREPARE_CHECK_FUNCS_MACOS, gl_CHECK_FUNCS_MACOS): New macros. * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mknodat and mkfifoat using gl_CHECK_FUNCS_MACOS instead of AC_CHECK_FUNCS_ONCE.
* chown, lchown, fchownat tests: Avoid test failure on macOS 12.Bruno Haible2023-03-023-9/+27
| | | | | | * tests/test-chown.h (test_chown): Skip some assertions if getgid() == (gid_t)-1. * tests/test-lchown.h (test_lchown): Likewise.
* math: Fix compilation error in C++ mode on macOS 12.5.Bruno Haible2023-02-102-2/+8
| | | | | * lib/math.in.h (isnan): On macOS, treat clang version 14 again like clang versions < 12.
* Fix compilation errors in C++ mode on macOS 12.5.Bruno Haible2023-02-102-2/+9
| | | | | | * m4/gnulib-common.m4 (gl_COMMON_BODY): Don't define _GL_ATTRIBUTE_MAYBE_UNUSED to [[__maybe_unused__]] if the compiler is an Apple variant of clang.
* limits-h: Work around a clang 15 bug.Bruno Haible2023-02-104-7/+22
| | | | | | | * m4/limits-h.m4 (gl_LIMITS_H): Test also for BOOL_MAX. * lib/limits.in.h: Handle the case where BOOL_WIDTH is present and BOOL_MAX is missing. * doc/posix-headers/limits.texi: Mention the clang bug.
* Fix error in C++ mode on glibc systems (regression 2022-04-28).Bruno Haible2023-02-103-0/+15
| | | | | | * lib/string.in.h (rpl_free): Add exception specification like stdlib.in.h does. * lib/wchar.in.h (rpl_free): Likewise.
* getcwd: Fix compilation error in C23 mode.Bruno Haible2023-02-102-1/+7
| | | | * lib/getcwd.c: Include <stdio.h>.
* Fix a copyright header - module license mismatch.Bruno Haible2023-02-104-35/+32
| | | | | | | | | | | Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00057.html>. * lib/gen-uni-tables.c (output_predicate): For uniwidth/width2.h, use an LGPLv2+ license. (output_nonspacing_property): Use an LGPLv2+ license. * lib/uniwidth/width0.h: Regenerated. * lib/uniwidth/width2.h: Likewise.
* setlocale-null: Don't use a lock in Cygwin >= 3.4.6.Bruno Haible2023-02-104-9/+32
| | | | | | | | | Road paved by Corinna Vinschen <vinschen@redhat.com>. * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Assume that setlocale (LC_ALL, NULL) is multithread-safe in Cygwin >= 3.4.6. * lib/setlocale_null.c: Update comments. * tests/test-setlocale_null-mt-all.c: Likewise.
* Update build-aux/po/Makefile.in.in.Bruno Haible2023-02-102-6/+23
| | | | | | | | | | Reported by Reuben Thomas <rrt@sc3d.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00020.html>. * build-aux/po/Makefile.in.in: Sync from GNU gettext 0.21.1. Fixes: - In the .po -> .gmo rules, consider the newest changes to the POT file. - Emit a warning when creating a tarball without POT file.
* assert-h, verify: Fix compilation error in C++ mode with MSVC 14.Bruno Haible2023-02-104-0/+16
| | | | | | * lib/verify.h (static_assert): Define _ALLOW_KEYWORD_MACROS. * tests/test-assert-h-c++.cc: Strengthen test. * tests/test-assert-h-c++2.cc: Likewise.
* assert-h, verify: Fix conflict with standard C++ header files on macOS.Bruno Haible2023-02-104-3/+35
| | | | | | | | * lib/verify.h (_Static_assert): Don't redefine with clang ≥ 3.8.0 in C++ mode. * tests/test-assert-h-c++.cc: Also check against conflict with the standard C++ header files. * tests/test-assert-h-c++2.cc: Likewise.
* relocatable-prog: Fix compiler warning.Bruno Haible2023-02-102-2/+7
| | | | * lib/progreloc.c (full_read): Use a non-const pointer.
* at-internal: Fix support for z/OS.Bruno Haible2023-02-102-2/+14
| | | | | * lib/openat-proc.c (openat_proc_name) [z/OS]: Proper error handling. Convert only the relevant part of the dir[] buffer.
* at-internal: Add support for z/OS.Bruno Haible2023-02-102-5/+24
| | | | | | | | Reported and draft patch by Igor Todorovski <itodorov@ca.ibm.com>. * lib/openat-proc.c [z/OS]: Include <termios.h>. (openat_proc_name): For z/OS, use an approach similar to kLIBC, with 3 lines of z/OS specific code by Igor Todorovski <itodorov@ca.ibm.com>.
* Fix compilation errors with CC="clang -D_FORTIFY_SOURCE=2" on Android.Bruno Haible2023-02-103-28/+49
| | | | | | | | | | | Reported by Alexey Rochev <equeim@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2023-01/msg00019.html>. * lib/cdefs.h (__bos, __bos0, __glibc_objsize0, __glibc_objsize, __glibc_safe_len_cond, __glibc_unsigned_or_positive, __glibc_safe_or_unknown_len, __glibc_unsafe_len, __glibc_fortify, __glibc_fortify_n): Don't define these macros in Gnulib. * lib/libc-config.h: Don't undefine these macros in Gnulib.
* Clarify _GL_ATTRIBUTE_NODISCARD code.Bruno Haible2023-02-102-1/+11
| | | | | | | Reported by Paul Eggert. * m4/gnulib-common.m4 (gl_COMMON_BODY): Add comment regarding _GL_ATTRIBUTE_NODISCARD definition.
* unistdio/*printf: Fix negative width handling for %U, %lU, %llU.Bruno Haible2023-02-102-6/+12
| | | | | * lib/vasnprintf.c (VASNPRINTF): In the code for %U, %lU, %llU, test for the FLAG_LEFT bit in the flags variable.
* vasnprintf-posix: Fix possible bug with negative width handling for %lc.Bruno Haible2023-02-102-2/+8
| | | | | * lib/vasnprintf.c (VASNPRINTF): In the code for %lc in vasnprintf, test for the FLAG_LEFT bit in the flags variable.
* vasnprintf-posix: Fix negative width handling for %ls directive.Bruno Haible2023-02-102-5/+12
| | | | | | | Reported by clang via Po Lu <luangruo@yahoo.com>. * lib/vasnprintf.c (VASNPRINTF): In the code for %ls in vasnprintf and for %s in vasnwprintf, test for the FLAG_LEFT bit in the flags variable.
* Avoid clang warnings regarding [[__nodiscard__]].Bruno Haible2023-02-102-2/+15
| | | | | | * m4/gnulib-common.m4 (gl_COMMON_BODY): For clang, in C++ mode, ignore the __has_c_attribute value and define _GL_ATTRIBUTE_NODISCARD to __attribute__ ((__warn_unused_result__)), not [[__nodiscard__]].
* Avoid clang warnings regarding [[__maybe_unused__]].Bruno Haible2023-02-102-4/+18
| | | | | | | * m4/gnulib-common.m4 (gl_COMMON_BODY): For clang versions ≥ 6, < 10, in C++ mode, ignore the __has_c_attribute value and define _GL_ATTRIBUTE_MAYBE_UNUSED to __attribute__ ((__unused__)), not [[__maybe_unused__]].
* Keep config.h idempotent.Bruno Haible2023-01-252-118/+186
| | | | | | | | | | | | | | | * m4/gnulib-common.m4 (gl_COMMON_BODY): Add double-inclusion guards to the definitions of the macros _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_ARTIFICIAL, _GL_ATTRIBUTE_COLD, _GL_ATTRIBUTE_CONST, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR, _GL_ATTRIBUTE_WARNING, _GL_ATTRIBUTE_EXTERNALLY_VISIBLE, _GL_ATTRIBUTE_FALLTHROUGH, _GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_LEAF, _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_MAY_ALIAS, _GL_ATTRIBUTE_MAYBE_UNUSED, _GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE, _GL_ATTRIBUTE_NONNULL, _GL_ATTRIBUTE_NONSTRING, _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED, _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_RETURNS_NONNULL, _GL_ATTRIBUTE_SENTINEL, _GL_ATTRIBUTE_UNUSED, _GL_UNUSED_LABEL.
* vasnprintf: Fix compilation error on Android NDK r26b.Bruno Haible2023-01-252-0/+7
| | | | | | Reported by Po Lu <luangruo@yahoo.com>. * lib/vasnprintf.c: Include <wchar.h>.
* threadlib: Fix support for Solaris 9 and older.Nick Bowler2023-01-252-1/+9
| | | | | * m4/threadlib.m4 (gl_PTHREADLIB_BODY): Allow case patterns to survive m4 processing by using changequote.
* stdalign: Fix a compilation error on FreeBSD 12.0.Bruno Haible2023-01-252-2/+13
| | | | | | * lib/stdalign.in.h (_Alignof): In C mode, prefer __builtin_offsetof over offsetof when possible, since __builtin_offsetof works also when <stddef.h> has not been fully included yet.