Bruno Haible [Fri, 24 Mar 2023 11:04:20 +0000 (12:04 +0100)]
dprintf-gnu: New module.
* m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_DPRINTF_POSIX.
(gl_FUNC_DPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/dprintf-gnu.m4: New file, based on m4/dprintf-posix.m4.
* modules/dprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/dprintf.texi: Mention the new module.
Bruno Haible [Fri, 24 Mar 2023 11:01:45 +0000 (12:01 +0100)]
vdprintf-gnu: Add tests.
* tests/test-vdprintf-gnu.sh: New file, based on
tests/test-vdprintf-posix.sh.
* tests/test-vdprintf-gnu.c: New file, based on
tests/test-vdprintf-posix.c.
* modules/vdprintf-gnu-tests: New file, based on
modules/vdprintf-posix-tests.
Bruno Haible [Fri, 24 Mar 2023 11:00:23 +0000 (12:00 +0100)]
vdprintf-gnu: New module.
* m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_VDPRINTF_POSIX.
(gl_FUNC_VDPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/vdprintf-gnu.m4: New file, based on m4/vdprintf-posix.m4.
* modules/vdprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/vdprintf.texi: Mention the new module.
Bruno Haible [Fri, 24 Mar 2023 10:57:19 +0000 (11:57 +0100)]
printf-gnu: Add tests.
* tests/test-printf-gnu.sh: New file, based on
tests/test-printf-posix.sh.
* tests/test-printf-gnu.c: New file, based on tests/test-printf-posix.c.
* modules/printf-gnu-tests: New file, based on
modules/printf-posix-tests.
Bruno Haible [Fri, 24 Mar 2023 10:55:38 +0000 (11:55 +0100)]
printf-gnu: New module.
* m4/printf-posix.m4: Renamed from m4/printf-posix-rpl.m4.
(gl_FUNC_PRINTF_IS_POSIX): New macro.
(gl_FUNC_PRINTF_POSIX): Require it. Don't require
gl_FUNC_VFPRINTF_POSIX. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
and gl_REPLACE_VASNPRINTF.
* m4/printf-gnu.m4: New file, based on m4/fprintf-posix.m4.
* modules/printf-posix (Files): Update.
* modules/printf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/printf.texi: Mention the new module.
Bruno Haible [Fri, 24 Mar 2023 10:47:20 +0000 (11:47 +0100)]
vprintf-gnu: Add tests.
* tests/test-vprintf-gnu.sh: New file, based on
tests/test-vprintf-posix.sh.
* tests/test-vprintf-gnu.c: New file, based on
tests/test-vprintf-posix.c.
* tests/test-printf-gnu.h: New file, based on
tests/test-vasnprintf-gnu.c.
* modules/vprintf-gnu-tests: New file, based on
modules/vprintf-posix-tests.
Bruno Haible [Fri, 24 Mar 2023 10:46:24 +0000 (11:46 +0100)]
vprintf-gnu: New module.
* m4/vprintf-posix.m4 (gl_FUNC_VPRINTF_IS_POSIX): New macro.
(gl_FUNC_VPRINTF_POSIX): Require it. Don't require
gl_FUNC_VFPRINTF_POSIX. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
and gl_REPLACE_VASNPRINTF.
* m4/vprintf-gnu.m4: New file, based on m4/vfprintf-posix.m4.
* modules/vprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/vprintf.texi: Mention the new module.
Bruno Haible [Fri, 24 Mar 2023 10:41:10 +0000 (11:41 +0100)]
fprintf-gnu: Add tests.
* tests/test-fprintf-gnu.sh: New file, based on
tests/test-fprintf-posix.sh.
* tests/test-fprintf-gnu.c: New file, based on
tests/test-fprintf-posix.c.
* modules/fprintf-gnu-tests: New file, based on
modules/fprintf-posix-tests.
Bruno Haible [Fri, 24 Mar 2023 10:39:47 +0000 (11:39 +0100)]
fprintf-gnu: New module.
* m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_FPRINTF_POSIX.
(gl_FUNC_FPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/fprintf-gnu.m4: New file, based on m4/fprintf-posix.m4.
* modules/fprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/fprintf.texi: Mention the new module.
Bruno Haible [Fri, 24 Mar 2023 10:36:53 +0000 (11:36 +0100)]
vfprintf-gnu: Add tests.
* tests/test-vfprintf-gnu.sh: New file, based on
tests/test-vfprintf-posix.sh.
* tests/test-vfprintf-gnu.c: New file, based on
tests/test-vfprintf-posix.c.
* tests/test-fprintf-gnu.h: New file, based on
tests/test-vasnprintf-gnu.c.
* tests/test-printf-gnu.output: New file, based on
tests/test-vasnprintf-gnu.c.
* modules/vfprintf-gnu-tests: New file, based on
modules/vfprintf-posix-tests.
Bruno Haible [Fri, 24 Mar 2023 10:35:26 +0000 (11:35 +0100)]
vfprintf-gnu: New module.
* m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_VFPRINTF_POSIX.
(gl_FUNC_VFPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/vfprintf-gnu.m4: New file, based on m4/vfprintf-posix.m4.
* modules/vfprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/vfprintf.texi: Mention the new module.
Bruno Haible [Fri, 24 Mar 2023 10:29:58 +0000 (11:29 +0100)]
vasprintf-gnu: Add tests.
* tests/test-vasprintf-gnu.c: New file, based on
tests/test-vasprintf-posix.c and tests/test-vasnprintf-gnu.c.
* modules/vasprintf-gnu-tests: New file, based on
modules/vasprintf-posix-tests.
Bruno Haible [Fri, 24 Mar 2023 10:28:38 +0000 (11:28 +0100)]
vasprintf-gnu: New module.
* m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_VASPRINTF_POSIX.
(gl_FUNC_VASPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/vasprintf-gnu.m4: New file, based on m4/vasprintf-posix.m4.
* modules/vasprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/glibc-functions/vasprintf.texi: Mention the new module.
* doc/glibc-functions/asprintf.texi: Likewise.
Bruno Haible [Fri, 24 Mar 2023 10:23:51 +0000 (11:23 +0100)]
sprintf-gnu: Add tests.
* tests/test-sprintf-gnu.c: New file, based on
tests/test-sprintf-posix.c.
* modules/sprintf-gnu-tests: New file, based on
modules/sprintf-posix-tests.
Bruno Haible [Fri, 24 Mar 2023 10:22:20 +0000 (11:22 +0100)]
sprintf-gnu: New module.
* m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_SPRINTF_POSIX.
(gl_FUNC_SPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/sprintf-gnu.m4: New file, based on m4/sprintf-posix.m4.
* modules/sprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/sprintf.texi: Mention the new module.
Bruno Haible [Fri, 24 Mar 2023 10:19:18 +0000 (11:19 +0100)]
vsprintf-gnu: Add tests.
* tests/test-vsprintf-gnu.c: New file, based on
tests/test-vsprintf-posix.c.
* tests/test-sprintf-gnu.h: New file, based on
tests/test-vasnprintf-gnu.c.
* modules/vsprintf-gnu-tests: New file, based on
modules/vsprintf-posix-tests.
Bruno Haible [Fri, 24 Mar 2023 10:17:22 +0000 (11:17 +0100)]
vsprintf-gnu: New module.
* m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_VSPRINTF_POSIX.
(gl_FUNC_VSPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/vsprintf-gnu.m4: New file, based on m4/vsprintf-posix.m4.
* modules/vsprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/vsprintf.texi: Mention the new module.
Bruno Haible [Fri, 24 Mar 2023 10:13:47 +0000 (11:13 +0100)]
snprintf-gnu: Add tests.
* tests/test-snprintf-gnu.c: New file, based on
tests/test-snprintf-posix.c.
* modules/snprintf-gnu-tests: New file, based on
modules/snprintf-posix-tests.
Bruno Haible [Fri, 24 Mar 2023 10:12:47 +0000 (11:12 +0100)]
snprintf-gnu: New module.
* m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_SNPRINTF_POSIX.
(gl_FUNC_SNPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/snprintf-gnu.m4: New file, based on m4/snprintf-posix.m4.
* modules/snprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/snprintf.texi: Mention the new module.
Bruno Haible [Fri, 24 Mar 2023 10:06:44 +0000 (11:06 +0100)]
vsnprintf-gnu: Add tests.
* tests/test-vsnprintf-gnu.c: New file, based on
tests/test-vsnprintf-posix.c.
* tests/test-snprintf-gnu.h: New file, based on
tests/test-vasnprintf-gnu.c.
* modules/vsnprintf-gnu-tests: New file, based on
modules/vsnprintf-posix-tests.
Bruno Haible [Fri, 24 Mar 2023 10:05:38 +0000 (11:05 +0100)]
vsnprintf-gnu: New module.
* m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): New macro,
extracted from gl_FUNC_VSNPRINTF_POSIX.
(gl_FUNC_VSNPRINTF_POSIX): Require it. Invoke
gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
* m4/vsnprintf-gnu.m4: New file, based on m4/vsnprintf-posix.m4.
* modules/vsnprintf-gnu: New file, based on modules/vasnprintf-gnu.
* doc/posix-functions/vsnprintf.texi: Mention the new module.
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
Bruno Haible [Wed, 22 Mar 2023 20:43:23 +0000 (21:43 +0100)]
*printf-posix: Fix implementation of %b directive.
* lib/vasnprintf.c (VASNPRINTF): In the %b directive implementation, fix
the precision handling, and ignore the '0' flag when a width and a
precision are both present.
* tests/test-snprintf-posix.h (test_function): Add test cases for the %x
directive and more test cases for the %b directive.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-vasnprintf-posix.c (test_function): Likewise.
* tests/test-vasnwprintf-posix.c (test_function): Likewise.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* modules/vasnwprintf-posix-tests (Files): Add m4/musl.m4.
(configure.ac): Invoke gl_MUSL_LIBC.
Bruno Haible [Wed, 22 Mar 2023 20:33:24 +0000 (21:33 +0100)]
vasnwprintf: Fix a warning: implicit declaration of function ‘wcsnlen’.
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test also whether wcsnlen is
declared.
* lib/vasnprintf.c (local_wcsnlen): Together with HAVE_WCSNLEN, test
also HAVE_DECL_WCSNLEN.
Bruno Haible [Wed, 22 Mar 2023 18:39:33 +0000 (19:39 +0100)]
vasnwprintf: Fix test failures on FreeBSD, NetBSD, AIX, mingw.
* m4/printf.m4 (gl_SWPRINTF_WORKS): New macro.
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke it and define
HAVE_WORKING_SWPRINTF accordingly.
* lib/vasnprintf.c: Together with HAVE_SWPRINTF, test also
HAVE_WORKING_SWPRINTF.
(VASNPRINTF): If WIDE_CHAR_VERSION && !DCHAR_IS_TCHAR, don't pass a
wchar_t[] to snprintf. Add a workaround against mingw's snwprintf
function.
* doc/posix-functions/swprintf.texi: Document the null wide character
bug.
Bruno Haible [Wed, 22 Mar 2023 13:42:58 +0000 (14:42 +0100)]
vasnwprintf tests: Fix link errors on AIX.
* modules/vasnwprintf (Link): New section.
* modules/vasnwprintf-posix (Link): New section.
* modules/vasnwprintf-tests (Makefile.am): Link test-vasnwprintf with
$(MBRTOWC_LIB).
* modules/vasnwprintf-posix-tests (Makefile.am): Link
test-vasnwprintf-posix, test-vasnwprintf-posix2, test-vasnwprintf-posix3
with $(MBRTOWC_LIB).
Bruno Haible [Tue, 21 Mar 2023 16:47:04 +0000 (17:47 +0100)]
vasnwprintf: Fix for older platforms without swprintf.
* lib/vasnprintf.c (VASNPRINTF): In the %lc handling, ignore the
precision. Convert the snprintf result to a wchar_t[] not by mbsrtowcs,
but by a loop that does not stop at NUL characters.
* tests/test-vasnwprintf-posix.c (test_function): Add more tests for the
%c and %lc directives.
* modules/vasnwprintf (Depends-on): Add mbrtowc. Remove mbsrtowcs.
Bruno Haible [Mon, 20 Mar 2023 18:18:02 +0000 (19:18 +0100)]
vasnwprintf: Port to older platforms without swprintf.
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test for swprintf.
* lib/vasnprintf.c (TCHAR_T, DCHAR_IS_TCHAR, SNPRINTF): When
WIDE_CHAR_VERSION and swprintf does not exist, use TCHAR_T = char,
SNPRINTF = snprintf, and !DCHAR_IS_TCHAR.
(VASNPRINTF): In this case, implement %ls and %lc directly. Adjust a
couple of #if conditions. For the conversion from TCHAR_T[] to
DCHAR_T[], use mbsrtowcs.
* modules/vasnwprintf (Depends-on): Add mbsrtowcs.
Bruno Haible [Mon, 20 Mar 2023 02:26:44 +0000 (03:26 +0100)]
vasnwprintf: Fix test failures on musl libc.
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke gl_MUSL_LIBC.
* lib/vasnprintf.c (VASNPRINTF): On musl libc, when WIDE_CHAR_VERSION,
- force pad_ourselves to be 1,
- don't use %n.
Fix zero-padding when the result starts with a prefix "0x" or "0b".
* modules/vasnwprintf (Files): Add musl.m4.
* doc/posix-functions/swprintf.texi: Mention two musl libc bugs.
Paul Eggert [Sun, 19 Mar 2023 23:06:34 +0000 (16:06 -0700)]
test-pselect, test-select: use different ports
I have served 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 Mar 2023 00:19:32 +0000 (17:19 -0700)]
Update MODULES.html.sh
* MODULES.html.sh: Add some recently-added modules.
This is by no means a complete update. I needed to point
to something about ‘time’ so I added ‘time’, and then added
more modules until I ran out of, errr, time.
Assuming MODULES.html.sh is still useful,
at some point a more-complete update should be done.
Bruno Haible [Fri, 17 Mar 2023 12:31:11 +0000 (13:31 +0100)]
time: Fix test failure on native Windows.
* m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on native
Windows.
* modules/time (Depends-on): Add gettimeofday.
* doc/posix-functions/time.texi: Mention the bug on Windows.
Bruno Haible [Fri, 17 Mar 2023 11:53:05 +0000 (12:53 +0100)]
vasnwprintf-posix: Add tests.
* tests/test-vasnwprintf-posix.c: New file, based on
tests/test-vasnprintf-posix.c.
* tests/test-vasnwprintf-posix2.sh: New file, based on
tests/test-vasnprintf-posix2.sh.
* tests/test-vasnwprintf-posix2.c: New file, based on
tests/test-vasnprintf-posix2.c.
* tests/test-vasnwprintf-posix3.c: New file, based on
tests/test-vasnprintf-posix3.c.
* modules/vasnwprintf-posix-tests: New file, based on
modules/vasnprintf-posix-tests.
Bruno Haible [Fri, 17 Mar 2023 11:25:37 +0000 (12:25 +0100)]
vasnwprintf: New module.
* lib/vasnprintf.c: Enable more code for WIDE_CHAR_VERSION, because
snwprintf()/_snwprintf() (Windows) and swprintf() (Unix) don't return
the needed buffer size, like snprintf does.
* lib/wprintf-parse.h: New file, based on lib/printf-parse.h and
gettext/gettext-runtime/intl/wprintf-parse.h.
* lib/wprintf-parse.c: New file, based on
gettext/gettext-runtime/intl/printf.c.
* lib/vasnwprintf.h: New file, based on lib/vasnprintf.h and
gettext/gettext-runtime/intl/vasnwprintf.h.
* lib/vasnwprintf.c: New file.
* lib/asnwprintf.c: New file, based on lib/asnprintf.c.
* m4/vasnprintf.m4 (gl_FUNC_VASNWPRINTF): New macro.
(gl_PREREQ_VASNXPRINTF): New macro, extracted from gl_PREREQ_VASNPRINTF.
(gl_PREREQ_VASNPRINTF): Invoke it. Don't test for wcsnlen and mbrtowc.
(gl_PREREQ_VASNWPRINTF): New macro.
* modules/vasnwprintf: New file, based on modules/vasnprintf.
Bruno Haible [Thu, 16 Mar 2023 12:45:40 +0000 (13:45 +0100)]
stddef: Define 'unreachable', for ISO C 23 compliance.
* lib/verify.h (_GL_HAS_BUILTIN_UNREACHABLE): Don't define if already
defined.
* lib/stddef.in.h (_GL_HAS_BUILTIN_UNREACHABLE, unreachable): New
macros.
(abort): Declare if needed for unreachable.
* m4/stddef_h.m4 (gl_STDDEF_H): Test for unreachable.
* tests/test-stddef.c (test_unreachable_optimization,
test_unreachable_noreturn): New functions, based on tests/test-verify.c.
* doc/posix-headers/stddef.texi: Mention unreachable.
Jim Meyering [Thu, 9 Mar 2023 17:58:35 +0000 (09:58 -0800)]
bootstrap: correct last change
* top/bootstrap-funclib.sh (autogen) [AUTORECONFFLAGS]: Do always
apply the --no-recursive option.
* build-aux/bootstrap: Regenerate.
Spotted by Bruno Haible.
Jim Meyering [Thu, 9 Mar 2023 16:41:07 +0000 (08:41 -0800)]
bootstrap: remove code that accommodated RHEL5's old autoreconf
* top/bootstrap-funclib.sh (autogen) [AUTORECONFFLAGS]: RHEL5 has not
been supported since 2017. It included (and this code worked around)
a version of autoreconf that was so old it did not accept the
--no-recursive option. Drop that workaround.
* build-aux/bootstrap: Regenerate.
Bruno Haible [Wed, 8 Mar 2023 16:00:48 +0000 (17:00 +0100)]
time: New module.
* lib/time.in.h (time): New declaration.
* lib/time.c: New file.
* m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS): Initialize GNULIB_TIME.
(gl_TIME_H_DEFAULTS): Initialize REPLACE_TIME.
* m4/time.m4: New file.
* modules/time-h (Makefile.am): Substitute GNULIB_TIME, REPLACE_TIME.
* modules/time: New file.
* tests/test-time-h-c++.cc: Check the signature of
GNULIB_NAMESPACE::time.
* doc/posix-functions/time.texi: Mention the glibc problem and the
'time' module.
Bruno Haible [Wed, 8 Mar 2023 09:14:00 +0000 (10:14 +0100)]
gettimeofday tests: Enhance test.
* tests/test-gettimeofday.c: Include <stdlib.h> and macros.h.
(test_clobber): New function, extracted from main.
(test_consistency): New function, based on tests/test-timespec_get.c.
(main): Invoke both functions.
* modules/gettimeofday-tests (Files): Add macros.h.
Paul Eggert [Mon, 6 Mar 2023 00:25:49 +0000 (16:25 -0800)]
stdio: suppress macOS 13 sprintf warnings
* lib/stdio.in.h (_POSIX_C_SOURCE, _GL_DEFINED__POSIX_C_SOURCE):
Suppress deprecation warnings for sprintf and vsprintf
that were introduced in macOS 13. These are not useful
for Gnulib itself, and are more likely than not to be
merely an annoyance for Gnulib-using code.
Bruno Haible [Tue, 28 Feb 2023 04:46:19 +0000 (05:46 +0100)]
perl: Allow this module to be used with 'gnulib-tool --lgpl'.
Reported by Reuben Thomas <rrt@sc3d.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00191.html>.
* modules/perl (License): Relax to 'GPLed build tool'.
Approved by Jim Meyering in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00198.html>.
Bruno Haible [Tue, 28 Feb 2023 04:59:25 +0000 (05:59 +0100)]
dfa: Tweak the last patch.
Suggested by Alexei Podtelezhnikov <apodtele@gmail.com>.
* lib/dfa.c (FALLTHROUGH): Assume that Apple clang, in C mode, supports
__attribute__ ((__fallthrough__)) starting with version 1200.
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
Jim Meyering [Sat, 25 Feb 2023 21:20:43 +0000 (13:20 -0800)]
announce-gen: add more info the auto-generated announce template
* build-aux/announce-gen (readable_interval, readable_interval0):
New functions.
(digest_file_base64_wrap): New function to add padding to the
base64-encoded SHA256 checksums.
(print_checksums): Use that wrapper. Indent each line by two spaces.
(main): Emit new sections, e.g., these lines from grep-3.8's release:
- There have been 104 commits by 6 people in the 55 weeks since 3.7.
- The following people contributed changes to this release: (and list)
I tested with this, running from a sibling cloned grep directory:
../gnulib/build-aux/announce-gen --release-type=stable \
--package-name=grep --previous-version=3.7 --current-version=3.8 \
--gpg-key-id=0x7FD9FCCB000BEEEE --url-directory=https://testing
Also, reference the cksum programs from coreutils-9.2 and from OpenBSD.
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 [Sat, 18 Feb 2023 15:59:22 +0000 (16:59 +0100)]
configmake: Add support for $build_os != $host_os.
* m4/build-to-host.m4: New file.
* m4/configmake.m4 (gl_CONFIGMAKE_PREP): Provide a configure-time
definition for pkgdatadir, pkgincludedir, pkglibdir.
(gl_CONFIGMAKE): New macro.
* modules/configmake (Files): Add m4/build-to-host.m4.
(configure.ac): Invoke gl_CONFIGMAKE instead of gl_CONFIGMAKE_PREP.
(Makefile.am): For creating configmake.h, use the various *prefix_c_make
and *dir_c_make variables.
Bruno Haible [Sat, 11 Feb 2023 20:12:00 +0000 (21:12 +0100)]
error-h: Make less fragile.
* lib/error.in.h: Use #include_next if the system has an <error.h>. Use
a split double-inclusion guard.
* m4/error_h.m4 (gl_ERROR_H): Invoke gl_CHECK_NEXT_HEADERS. Set
HAVE_ERROR_H.
* modules/error-h (Makefile.am): Substitute GUARD_PREFIX, HAVE_ERROR_H,
INCLUDE_NEXT, PRAGMA_SYSTEM_HEADER, NEXT_ERROR_H.