Bruno Haible [Sun, 25 Jun 2023 17:11:26 +0000 (19:11 +0200)]
strerrorname_np: Add support for Solaris 11.4/sparc.
* lib/strerrorname_np.c (strerrorname_np): Consider ECKSUM, EFRAGS.
Allow ENOANO to be overloaded to another value.
* tests/test-strerrorname_np.c (main): Likewise.
Bruno Haible [Sun, 25 Jun 2023 16:19:06 +0000 (18:19 +0200)]
strerrorname_np: Work around glibc bug on PowerPC, SPARC systems.
* m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Test also
strerrorname_np (EDEADLOCK).
* doc/glibc-functions/strerrorname_np.texi: Mention that glibc 2.36
still needs a workaround.
Paul Eggert [Mon, 19 Jun 2023 21:08:06 +0000 (14:08 -0700)]
largefile: port to GNU/Linux alpha and s390x
This patch syncs from Autoconf master.
Problem reported by Matoro <https://bugs.gnu.org/64123>.
* lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_TEST_CODE):
New overridable macro FTYPE, to test types other than off_t.
(_AC_SYS_LARGEFILE_TEST_CODE): Test ino_t for
-D_FILE_OFFSETBITS=64 too, if no flags are needed for off_t.
Needed for GNU/Linux on alpha and s390x.
Bruno Haible [Thu, 15 Jun 2023 06:38:48 +0000 (08:38 +0200)]
aligned-malloc, rmdir-errno: Sanitize configuration test result.
* m4/malloc-align.m4 (gl_MALLOC_ALIGNMENT): Don't put a newline at the
end of the conftest.out file.
* m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Don't put a newline at the
end of the confdir2/errno file.
Jim Meyering [Fri, 9 Jun 2023 17:15:30 +0000 (10:15 -0700)]
maint.mk: sc_prohibit_xalloc_without_use: also match alloc_die
* top/maint.mk (sc_prohibit_xalloc_without_use):
Adjust in-comment command's regexp so it also finds alloc_die,
whose declaration has a prefix of "_Noreturn" .
Also delete some now-obsolete commentary.
(_xa1): Regenerate the regexp using that command.
Reported by Pádraig Brady in
<https://lists.gnu.org/r/bug-gnulib/2023-06/msg00062.html>.
Paul Eggert [Fri, 9 Jun 2023 18:13:19 +0000 (11:13 -0700)]
xalloc-die: omit /*extern*/
* lib/xalloc.h (xalloc_die): Omit leading "/*extern*/".
It complicates syntax checking; see:
https://lists.gnu.org/r/bug-gnulib/2023-06/msg00062.html
Plus, it’s inconsistent style: the other function declarations in
xalloc.h don’t use ‘extern’. (I’m not a fan of using ‘extern’ when
it’s just noise, as is the case here.)
Bruno Haible [Thu, 18 May 2023 14:03:00 +0000 (16:03 +0200)]
gnulib-tool: Ignore .orig and .rej files under modules/.
* gnulib-tool (func_sanitize_modulelist): Exclude also files whose name
ends in .orig or .rej.
* pygnulib/GLModuleSystem.py (GLModuleSystem.file_is_module): Likewise.
Bruno Haible [Fri, 5 May 2023 10:39:25 +0000 (12:39 +0200)]
vasnprintf: Make '0' flag handling more ISO C compliant.
* lib/vasnprintf.c (VASNPRINTF): When doing the padding ourselves,
ignore the '0' flag if a precision is specified and the conversion is
one of d, i, o, u, x, X, b, B.
Paul Eggert [Mon, 1 May 2023 18:19:05 +0000 (11:19 -0700)]
extern-inline: port to pcc
* m4/extern-inline.m4 (gl_EXTERN_INLINE): Port to pcc
1.2.0.DEVEL 20220331, which doesn’t support extern inline
even though it claims to be GCC 4.3 and to support C11.
Bruno Haible [Sat, 29 Apr 2023 01:24:43 +0000 (03:24 +0200)]
stdio: Avoid different configure results in different testdirs.
* m4/stdio_h.m4 (gl_STDIO_H_EARLY): New macro, extracted from
gl_STDIO_H.
(gl_STDIO_H): Move the code that sets __USE_MINGW_ANSI_STDIO to
gl_STDIO_H_EARLY.
* modules/stdio (configure.ac-early): New section.
Po Lu [Wed, 26 Apr 2023 02:57:31 +0000 (04:57 +0200)]
gnulib-tool: For conditional dependencies, generate portable sh code.
* gnulib-tool (func_emit_autoconf_snippets): Avoid sh syntax
'if ! variable', that does not work with Solaris /bin/sh.
* pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Likewise.
Bruno Haible [Tue, 25 Apr 2023 11:38:47 +0000 (13:38 +0200)]
poll tests: Avoid test failure on native Windows.
* tests/test-poll.c (test_pipe): Disable the POLLHUP check also on
native Windows.
* doc/posix-functions/poll.texi: Mention also native Windows w.r.t.
POLLHUP.
Bruno Haible [Mon, 24 Apr 2023 10:48:31 +0000 (12:48 +0200)]
unicodeio tests: Avoid test failures on native Windows.
* tests/test-unicodeio.c: Include localcharset.h.
(main): Handle C locales whose encoding is CP1252 or similar.
* modules/unicodeio-tests (Depends-on): Add localcharset.
Bruno Haible [Thu, 20 Apr 2023 06:42:56 +0000 (08:42 +0200)]
assert-h, verify: Fix compilation error in C++ mode with MSVC 14.30.
* lib/verify.h (_Static_assert): In C++ mode with MSVC 14.1 or newer,
define merely to static_assert.
(static_assert): In C++ mode with MSVC 14.1 or newer, don't define.
Bruno Haible [Sat, 15 Apr 2023 16:05:57 +0000 (18:05 +0200)]
Fix compilation errors of list, set, oset, map, omap in C++ mode.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Define
_GL_BRACKET_BEFORE_ATTRIBUTE. In _GL_ATTRIBUTE_DEPRECATED,
_GL_ATTRIBUTE_MAYBE_UNUSED, _GL_ATTRIBUTE_NODISCARD, don't use the
bracket syntax if _GL_BRACKET_BEFORE_ATTRIBUTE is defined.
backupfile: fix bug when renaming from subdirectory
* lib/backupfile.c (backup_internal): Ensure we use the
appropriate offset if operating on a subdirectory,
i.e., on an updated sdir.
Fixes https://bugs.gnu.org/62607
Paul Eggert [Sun, 25 Dec 2022 19:41:57 +0000 (11:41 -0800)]
largefile: sync from Autoconf master
* 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.
Paul Eggert [Tue, 9 Aug 2022 18:12:05 +0000 (11:12 -0700)]
largefile, year2038: simplify if Autoconf 2.72
* 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.
Jim Meyering [Thu, 23 Mar 2023 02:51:12 +0000 (19:51 -0700)]
gnu-web-doc-update: don't use host alias, cvs.sv.gnu.org
* 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
Paul Eggert [Sun, 19 Mar 2023 23:06:34 +0000 (16:06 -0700)]
test-pselect, test-select: use different ports
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.
Paul Eggert [Sun, 19 Feb 2023 06:05:24 +0000 (00:05 -0600)]
lseek: avoid SEEK_HOLE bugs in FreeBSD, macOS
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.
Bruno Haible [Thu, 2 Mar 2023 19:52:16 +0000 (20:52 +0100)]
mkfifoat: Fix crash on macOS 12.
* 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.
Bruno Haible [Thu, 9 Feb 2023 12:30:04 +0000 (13:30 +0100)]
limits-h: Work around a clang 15 bug.
* 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.