]> Savannah Git Hosting - gnulib.git/log
gnulib.git
9 months agoxstrtol: remove the base-checking changes
Paul Eggert [Fri, 26 Jul 2024 00:24:20 +0000 (17:24 -0700)]
xstrtol: remove the base-checking changes

* lib/xstrtol.c (__xstrtol): Stop worrying about hypothetical
implementations that are causing more confusion than the code is
worth.  Instead, go back more to old way of doing things.
None of this matters for practical applications.
* lib/xstrtol.h: Document that behavior is undefined
if the base is negative, 1, or greater than 36.
* modules/xstrtol (Depends-on): Remove nullptr; no longer needed.

9 months agoxstrtol, xstrtoll tests: Avoid test failure on FreeBSD.
Bruno Haible [Thu, 25 Jul 2024 21:45:23 +0000 (23:45 +0200)]
xstrtol, xstrtoll tests: Avoid test failure on FreeBSD.

* tests/test-xstrtol.c (main): Adjust expected results for FreeBSD.

9 months agoxstrtol, xstrtoll tests: Test behaviour for an invalid base.
Bruno Haible [Thu, 25 Jul 2024 20:05:18 +0000 (22:05 +0200)]
xstrtol, xstrtoll tests: Test behaviour for an invalid base.

Reported by Alejandro Colomar <alx@kernel.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00249.html>.

* modules/xstrtol-tests (Files): Add tests/macros.h.
* modules/xstrtoll-tests (Files): Likewise.
* tests/test-xstrtol.c: Include macros.h.
(main): If no arguments are given on the command line, perform
miscellaneous tests.
* tests/test-xstrtol.sh: Also invoke test-xstrtol without arguments.
* tests/test-xstrtoll.sh: Also invoke test-xstrtoll without arguments.

9 months agosys_un: Add C++ tests.
Collin Funk [Thu, 25 Jul 2024 03:27:46 +0000 (20:27 -0700)]
sys_un: Add C++ tests.

* modules/sys_un-c++-tests: New file.
* tests/test-sys_un-c++.cc: New file.
* modules/sys_un-tests (Depends-on): Add sys_un-c++-tests.

9 months agosys_un: Add tests.
Collin Funk [Thu, 25 Jul 2024 03:16:26 +0000 (20:16 -0700)]
sys_un: Add tests.

* modules/sys_un-tests: New file.
* tests/test-sys_un.c: New file.

9 months agosys_un: New module.
Collin Funk [Thu, 25 Jul 2024 03:14:49 +0000 (20:14 -0700)]
sys_un: New module.

* doc/posix-headers/sys_un.texi (sys/un.h): Mention it.
* lib/sys_un.in.h: New file.
* m4/sys_un_h.m4: New file.
* modules/sys_un: New file.

9 months agoxstrtol: improve xstrtol.h comment
Paul Eggert [Thu, 25 Jul 2024 00:00:13 +0000 (17:00 -0700)]
xstrtol: improve xstrtol.h comment

9 months agoAvoid false select_used_without_requesting_gnulib_module_select.
Bruno Haible [Wed, 24 Jul 2024 23:29:22 +0000 (01:29 +0200)]
Avoid false select_used_without_requesting_gnulib_module_select.

* modules/select (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_select.in.h (select): Don't define to
select_used_without_requesting_gnulib_module_select if the gnulib module
'select' is in use under the same configure.ac.

9 months agoAvoid false shutdown_used_without_requesting_gnulib_module_shutdown.
Bruno Haible [Wed, 24 Jul 2024 23:27:32 +0000 (01:27 +0200)]
Avoid false shutdown_used_without_requesting_gnulib_module_shutdown.

* modules/shutdown (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (shutdown): Don't define to
shutdown_used_without_requesting_gnulib_module_shutdown if the gnulib
module 'shutdown' is in use under the same configure.ac.

9 months agoAvoid false setsockopt_used_without_requesting_gnulib_module_setsockopt.
Bruno Haible [Wed, 24 Jul 2024 23:23:52 +0000 (01:23 +0200)]
Avoid false setsockopt_used_without_requesting_gnulib_module_setsockopt.

* modules/setsockopt (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (setsockopt): Don't define to
setsockopt_used_without_requesting_gnulib_module_setsockopt if the
gnulib module 'setsockopt' is in use under the same configure.ac.

9 months agoAvoid false sendto_used_without_requesting_gnulib_module_sendto.
Bruno Haible [Wed, 24 Jul 2024 23:21:45 +0000 (01:21 +0200)]
Avoid false sendto_used_without_requesting_gnulib_module_sendto.

* modules/sendto (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (sendto): Don't define to
sendto_used_without_requesting_gnulib_module_sendto if the gnulib module
'sendto' is in use under the same configure.ac.

9 months agoAvoid false recvfrom_used_without_requesting_gnulib_module_recvfrom.
Bruno Haible [Wed, 24 Jul 2024 23:19:20 +0000 (01:19 +0200)]
Avoid false recvfrom_used_without_requesting_gnulib_module_recvfrom.

* modules/recvfrom (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (recvfrom): Don't define to
recvfrom_used_without_requesting_gnulib_module_recvfrom if the gnulib
module 'recvfrom' is in use under the same configure.ac.

9 months agoAvoid false send_used_without_requesting_gnulib_module_send.
Bruno Haible [Wed, 24 Jul 2024 23:17:33 +0000 (01:17 +0200)]
Avoid false send_used_without_requesting_gnulib_module_send.

* modules/send (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (send): Don't define to
send_used_without_requesting_gnulib_module_send if the gnulib module
'send' is in use under the same configure.ac.

9 months agoAvoid false recv_used_without_requesting_gnulib_module_recv.
Bruno Haible [Wed, 24 Jul 2024 23:16:05 +0000 (01:16 +0200)]
Avoid false recv_used_without_requesting_gnulib_module_recv.

* modules/recv (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (recv): Don't define to
recv_used_without_requesting_gnulib_module_recv if the gnulib module
'recv' is in use under the same configure.ac.

9 months agoAvoid false listen_used_without_requesting_gnulib_module_listen.
Bruno Haible [Wed, 24 Jul 2024 23:14:25 +0000 (01:14 +0200)]
Avoid false listen_used_without_requesting_gnulib_module_listen.

* modules/listen (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (listen): Don't define to
listen_used_without_requesting_gnulib_module_listen if the gnulib module
'listen' is in use under the same configure.ac.

9 months agoAvoid false getsockopt_used_without_requesting_gnulib_module_getsockopt.
Bruno Haible [Wed, 24 Jul 2024 23:12:43 +0000 (01:12 +0200)]
Avoid false getsockopt_used_without_requesting_gnulib_module_getsockopt.

* modules/getsockopt (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (getsockopt): Don't define to
getsockopt_used_without_requesting_gnulib_module_getsockopt if the
gnulib module 'getsockopt' is in use under the same configure.ac.

9 months agoAvoid false getsockname_used_without_requesting_gnulib_module_getsockname.
Bruno Haible [Wed, 24 Jul 2024 22:53:05 +0000 (00:53 +0200)]
Avoid false getsockname_used_without_requesting_gnulib_module_getsockname.

* modules/getsockname (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (getsockname): Don't define to
getsockname_used_without_requesting_gnulib_module_getsockname if the
gnulib module 'getsockname' is in use under the same configure.ac.

9 months agoAvoid false getpeername_used_without_requesting_gnulib_module_getpeername.
Bruno Haible [Wed, 24 Jul 2024 22:51:27 +0000 (00:51 +0200)]
Avoid false getpeername_used_without_requesting_gnulib_module_getpeername.

* modules/getpeername (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (getpeername): Don't define to
getpeername_used_without_requesting_gnulib_module_getpeername if the
gnulib module 'getpeername' is in use under the same configure.ac.

9 months agoAvoid false bind_used_without_requesting_gnulib_module_bind.
Bruno Haible [Wed, 24 Jul 2024 22:49:21 +0000 (00:49 +0200)]
Avoid false bind_used_without_requesting_gnulib_module_bind.

* modules/bind (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (bind): Don't define to
bind_used_without_requesting_gnulib_module_bind if the gnulib module
'bind' is in use under the same configure.ac.

9 months agoAvoid false accept_used_without_requesting_gnulib_module_accept.
Bruno Haible [Wed, 24 Jul 2024 22:47:45 +0000 (00:47 +0200)]
Avoid false accept_used_without_requesting_gnulib_module_accept.

* modules/accept (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (accept): Don't define to
accept_used_without_requesting_gnulib_module_accept if the gnulib module
'accept' is in use under the same configure.ac.

9 months agoAvoid false socket_used_without_requesting_gnulib_module_connect.
Bruno Haible [Wed, 24 Jul 2024 22:41:00 +0000 (00:41 +0200)]
Avoid false socket_used_without_requesting_gnulib_module_connect.

* modules/connect (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (connect): Don't define to
socket_used_without_requesting_gnulib_module_connect if the gnulib
module 'connect' is in use under the same configure.ac. Fix typo.

9 months agoAvoid false socket_used_without_requesting_gnulib_module_socket.
Bruno Haible [Wed, 24 Jul 2024 22:38:08 +0000 (00:38 +0200)]
Avoid false socket_used_without_requesting_gnulib_module_socket.

* modules/socket (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (socket): Don't define to
socket_used_without_requesting_gnulib_module_socket if the gnulib module
'socket' is in use under the same configure.ac.

9 months agoAvoid false lstat_used_without_requesting_gnulib_module_lstat.
Bruno Haible [Wed, 24 Jul 2024 22:36:01 +0000 (00:36 +0200)]
Avoid false lstat_used_without_requesting_gnulib_module_lstat.

* modules/lstat (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_stat.in.h (lstat): Don't define to
lstat_used_without_requesting_gnulib_module_lstat if the gnulib module
'lstat' is in use under the same configure.ac.

9 months agoAvoid false fstatat_used_without_requesting_gnulib_module_fstatat.
Bruno Haible [Wed, 24 Jul 2024 22:34:09 +0000 (00:34 +0200)]
Avoid false fstatat_used_without_requesting_gnulib_module_fstatat.

* modules/fstatat (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_stat.in.h (fstatat): Don't define to
fstatat_used_without_requesting_gnulib_module_fstatat if the gnulib
module 'fstatat' is in use under the same configure.ac.

9 months agoAvoid false fstat_used_without_requesting_gnulib_module_fstat.
Bruno Haible [Wed, 24 Jul 2024 22:32:26 +0000 (00:32 +0200)]
Avoid false fstat_used_without_requesting_gnulib_module_fstat.

* modules/fstat (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_stat.in.h (fstat): Don't define to
fstat_used_without_requesting_gnulib_module_fstat if the gnulib module
'fstat' is in use under the same configure.ac.

9 months agoAvoid false stat_used_without_requesting_gnulib_module_stat.
Bruno Haible [Wed, 24 Jul 2024 22:30:26 +0000 (00:30 +0200)]
Avoid false stat_used_without_requesting_gnulib_module_stat.

* modules/stat (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_stat.in.h (stat): Don't define to
stat_used_without_requesting_gnulib_module_stat if the gnulib module
'stat' is in use under the same configure.ac.

9 months agoAvoid false ioctl_used_without_requesting_gnulib_module_ioctl.
Bruno Haible [Wed, 24 Jul 2024 21:59:15 +0000 (23:59 +0200)]
Avoid false ioctl_used_without_requesting_gnulib_module_ioctl.

* modules/ioctl (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_ioctl.in.h (ioctl): Don't define to
ioctl_used_without_requesting_gnulib_module_ioctl if the gnulib module
'ioctl' is in use under the same configure.ac.

9 months agoAvoid false localeconv_used_without_requesting_gnulib_module_localeconv.
Bruno Haible [Wed, 24 Jul 2024 21:56:33 +0000 (23:56 +0200)]
Avoid false localeconv_used_without_requesting_gnulib_module_localeconv.

* modules/localeconv (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/locale.in.h (localeconv): Don't define to
localeconv_used_without_requesting_gnulib_module_localeconv if the
gnulib module 'localeconv' is in use under the same configure.ac.

9 months agoAvoid false gethostname_used_without_requesting_gnulib_module_gethostname.
Bruno Haible [Wed, 24 Jul 2024 21:53:53 +0000 (23:53 +0200)]
Avoid false gethostname_used_without_requesting_gnulib_module_gethostname.

* modules/gethostname (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/unistd.in.h (gethostname): Don't define to
gethostname_used_without_requesting_gnulib_module_gethostname if the
gnulib module 'gethostname' is in use under the same configure.ac.

9 months agoAvoid false error close_used_without_requesting_gnulib_module_close.
Bruno Haible [Wed, 24 Jul 2024 21:35:53 +0000 (23:35 +0200)]
Avoid false error close_used_without_requesting_gnulib_module_close.

Reported by Frédéric at <https://savannah.gnu.org/bugs/?65958>.

* modules/close (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/unistd.in.h (close): Don't define to
close_used_without_requesting_gnulib_module_close if the gnulib module
'close' is in use under the same configure.ac.

9 months agoxstrtod, xstrtold: Don't treat gradual underflow as an error.
Bruno Haible [Wed, 24 Jul 2024 17:46:44 +0000 (19:46 +0200)]
xstrtod, xstrtold: Don't treat gradual underflow as an error.

* lib/xstrtod.c (XSTRTOD): Upon gradual underflow, return true with
errno = 0.
* lib/xstrtod.h (xstrtod, xstrtold): Update specification.
* tests/test-xstrtod.c (main): For gradual underflow, expect ok &&
errno == 0.
* tests/test-xstrtold.c (main): Likewise.

9 months agoDetect UNIX domain sockets supported by recent Windows versions.
Collin Funk [Wed, 24 Jul 2024 04:31:06 +0000 (21:31 -0700)]
Detect UNIX domain sockets supported by recent Windows versions.

* m4/sockpfaf.m4 (gl_SOCKET_FAMILY_UNIX): Check for afunix.h if
winsock2.h is found. Include it in the compile check.

9 months agosys_socket tests: Fix mistake in previous commit.
Collin Funk [Wed, 24 Jul 2024 04:22:16 +0000 (21:22 -0700)]
sys_socket tests: Fix mistake in previous commit.

* modules/sys_socket-tests (configure.ac): Invoke gl_SOCKET_FAMILY_UNIX.

9 months agosys_socket tests: Define macros necessary for tests (regr. 2024-07-22).
Collin Funk [Wed, 24 Jul 2024 02:31:22 +0000 (19:31 -0700)]
sys_socket tests: Define macros necessary for tests (regr. 2024-07-22).

* modules/sys_socket-tests (configure.ac): Invoke gl_SOCKET_FAMILIES.

9 months agosys_socket tests: Improve checks for socklen_t and sa_family_t.
Collin Funk [Wed, 24 Jul 2024 02:00:28 +0000 (19:00 -0700)]
sys_socket tests: Improve checks for socklen_t and sa_family_t.

* modules/sys_socket-tests (Depends-on): Add intprops.
* tests/test-sys_socket.c: Check that socklen_t is at least 32 bits
wide. Check that sa_family_t is unsigned.

9 months agogetopt-posix, getopt-gnu tests: Avoid test failure on mingw.
Bruno Haible [Wed, 24 Jul 2024 00:02:45 +0000 (02:02 +0200)]
getopt-posix, getopt-gnu tests: Avoid test failure on mingw.

* tests/test-getopt.h (test_getopt): Don't special-case mingw.

9 months agoxstrtod, xstrtold: Add documentation.
Bruno Haible [Tue, 23 Jul 2024 18:58:45 +0000 (20:58 +0200)]
xstrtod, xstrtold: Add documentation.

* lib/xstrtod.h (xstrtod, xstrtold): Add comments.
* lib/xstrtod.c (XSTRTOD): Improve comments.

9 months agoxstrtold: Add tests.
Bruno Haible [Tue, 23 Jul 2024 17:11:00 +0000 (19:11 +0200)]
xstrtold: Add tests.

* tests/test-xstrtold.c: New file, based on tests/test-strtold.h.
* modules/xstrtold-tests: New file.

9 months agoxstrtod: Add tests.
Bruno Haible [Tue, 23 Jul 2024 17:10:34 +0000 (19:10 +0200)]
xstrtod: Add tests.

* tests/test-xstrtod.c: New file, based on tests/test-strtod.h.
* modules/xstrtod-tests: New file.

9 months agostrtof, strtod, strtold tests: Strengthen tests.
Bruno Haible [Tue, 23 Jul 2024 18:16:22 +0000 (20:16 +0200)]
strtof, strtod, strtold tests: Strengthen tests.

* tests/test-strtof.h (test_function): Strengthen the flush-to-zero
underflow tests.
* tests/test-strtod.h (test_function): Likewise.
* tests/test-strtold.h (test_function): Likewise.

9 months agodoc: Update for glibc 2.40.
Bruno Haible [Tue, 23 Jul 2024 12:49:18 +0000 (14:49 +0200)]
doc: Update for glibc 2.40.

* doc/posix-headers/utmpx.texi: Update.
* doc/posix-functions/*.texi: Likewise.

9 months agostrtof, strtod, strtold tests: Strengthen tests.
Bruno Haible [Tue, 23 Jul 2024 10:41:12 +0000 (12:41 +0200)]
strtof, strtod, strtold tests: Strengthen tests.

* tests/test-strtof.h (test_function): Add another overflow test.
* tests/test-strtod.h (test_function): Likewise.
* tests/test-strtold.h (test_function): Likewise.

9 months agostrtold: Revisit underflow behaviour.
Bruno Haible [Tue, 23 Jul 2024 10:40:58 +0000 (12:40 +0200)]
strtold: Revisit underflow behaviour.

* doc/posix-functions/strtold.texi: Mention broken mingw 5.0. Mention
that gradual underflow does not count as an error on MSVC.
* tests/test-strtold.h (test_function): Add a gradual underflow test.
Check the sign in case of flush-to-zero underflow.

9 months agostrtod: Revisit underflow behaviour.
Bruno Haible [Tue, 23 Jul 2024 10:40:37 +0000 (12:40 +0200)]
strtod: Revisit underflow behaviour.

* doc/posix-functions/strtod.texi: Mention the macOS bug. Mention that
gradual underflow does not count as an error on Cygwin 2.9 and MSVC.
* m4/strtod.m4 (gl_FUNC_STRTOD): Update comment.
* tests/test-strtod.h (test_function): Add a gradual underflow test.
Check the sign in case of flush-to-zero underflow.

9 months agostrtof: Revisit underflow behaviour.
Bruno Haible [Tue, 23 Jul 2024 10:40:33 +0000 (12:40 +0200)]
strtof: Revisit underflow behaviour.

* doc/posix-functions/strtof.texi: Mention the macOS bug. Mention the
mingw overflow bug. Mention the underflow bugs on Cygwin 2.9 and mingw.
Mention that gradual underflow does not count as an error on Cygwin 2.9,
mingw, MSVC.
* m4/strtof.m4 (gl_FUNC_STRTOF): Test against the mingw overflow bug.
* tests/test-strtof.h (test_function): Add a gradual underflow test.
Check the sign in case of flush-to-zero underflow.

9 months agostrtof, strtod, strtold: Fix underflow behaviour of system function.
Bruno Haible [Tue, 23 Jul 2024 10:40:19 +0000 (12:40 +0200)]
strtof, strtod, strtold: Fix underflow behaviour of system function.

* m4/strtof.m4 (gl_FUNC_STRTOF): Test for strtof's behaviour upon
underflow. Conditionally define STRTOF_HAS_UNDERFLOW_BUG,
STRTOF_HAS_GRADUAL_UNDERFLOW_PROBLEM.
* m4/strtod.m4 (gl_FUNC_STRTOD): Test for strtod's behaviour upon
underflow. Conditionally define STRTOD_HAS_UNDERFLOW_BUG,
STRTOD_HAS_GRADUAL_UNDERFLOW_PROBLEM.
* m4/strtold.m4 (gl_FUNC_STRTOLD): Test for strtold's behaviour upon
gradual underflow. Conditionally define
STRTOLD_HAS_GRADUAL_UNDERFLOW_PROBLEM.
* lib/strtod.c (HAVE_UNDERLYING_STRTOD): Test STRTOF_HAS_UNDERFLOW_BUG,
STRTOD_HAS_UNDERFLOW_BUG.
(HAS_GRADUAL_UNDERFLOW_PROBLEM): New macro.
(SET_ERRNO_UPON_GRADUAL_UNDERFLOW): New macro.
(STRTOD): Use it.

9 months agostrtof: Use the system's strtof() if available.
Bruno Haible [Tue, 23 Jul 2024 10:40:15 +0000 (12:40 +0200)]
strtof: Use the system's strtof() if available.

* m4/strtof.m4 (gl_FUNC_STRTOF): Define HAVE_STRTOF if strtof exists.

9 months agostrtof, strtod, strtold: Set errno upon gradual underflow.
Bruno Haible [Tue, 23 Jul 2024 08:39:28 +0000 (10:39 +0200)]
strtof, strtod, strtold: Set errno upon gradual underflow.

* lib/strtod.c (scale_radix_exp): If the result is a denormalized
number, set errno to ERANGE.

9 months agosys_socket tests: Improve tests for macro definitions.
Collin Funk [Tue, 23 Jul 2024 03:54:17 +0000 (20:54 -0700)]
sys_socket tests: Improve tests for macro definitions.

* modules/sys_socket-tests (Depends-on): Add assert-h.
* tests/test-sys_socket.c (a): Remove variable.
(main): Test that each supported address family is defined to a distinct
value. Test that each constant passed as the second argument of
'shutdown' is defined to a distinct value.

9 months agognulib-tool: Omit the logs of skipped tests from test-suite.log.
Bruno Haible [Mon, 22 Jul 2024 13:05:30 +0000 (15:05 +0200)]
gnulib-tool: Omit the logs of skipped tests from test-suite.log.

* gnulib-tool.sh (func_emit_tests_Makefile_am): Emit an assignment to
IGNORE_SKIPPED_LOGS.
* pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Likewise.

9 months agobootstrap: Avoid failure when gnulib-tool removed gettext.m4.
Bruno Haible [Sun, 21 Jul 2024 12:02:58 +0000 (14:02 +0200)]
bootstrap: Avoid failure when gnulib-tool removed gettext.m4.

* top/bootstrap-funclib.sh (autogen): When gnulib-tool has removed
gettext.m4 but the package needs gettext.m4, repeat the autopoint and
gnulib-tool invocations.
* build-aux/bootstrap: Regenerated.

9 months agostack-trace: Don't use libasan by default.
Bruno Haible [Sat, 20 Jul 2024 23:19:01 +0000 (01:19 +0200)]
stack-trace: Don't use libasan by default.

* m4/stack-trace.m4 (gl_STACK_TRACE_EARLY): Remove libasan as second
choice.

9 months agodoc: Sort the ISO C and POSIX Function Substitutes by header file.
Bruno Haible [Sat, 20 Jul 2024 18:02:14 +0000 (20:02 +0200)]
doc: Sort the ISO C and POSIX Function Substitutes by header file.

* doc/gnulib.texi (Function Substitutes): Add one section per header
file.
* doc/posix-functions/*.texi: Each of these files is now a subsection.

9 months agogetpayload*: Do use glibc's implementation when it works.
Bruno Haible [Sat, 20 Jul 2024 14:38:11 +0000 (16:38 +0200)]
getpayload*: Do use glibc's implementation when it works.

Reported by Andreas K. Huettel <dilfridge@gentoo.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00206.html>.

* m4/getpayload.m4 (gl_FUNC_GETPAYLOADF, gl_FUNC_GETPAYLOAD,
gl_FUNC_GETPAYLOADL): Link the test program with -lm if needed.

9 months agodoc: Reference POSIX for functions that are added in POSIX:2024.
Bruno Haible [Sat, 20 Jul 2024 14:22:50 +0000 (16:22 +0200)]
doc: Reference POSIX for functions that are added in POSIX:2024.

* doc/posix-functions/_Fork.texi etc: Reference POSIX:2024, not the LSB
and not the Austin Group tracker.

9 months agodoc: Update status of functions that are added in POSIX:2024.
Bruno Haible [Sat, 20 Jul 2024 13:34:55 +0000 (15:34 +0200)]
doc: Update status of functions that are added in POSIX:2024.

* doc/posix-functions/_Fork.texi: Moved here from doc/glibc-functions/.
* doc/posix-functions/accept4.texi: Likewise.
* doc/posix-functions/asprintf.texi: Likewise.
* doc/posix-functions/bind_textdomain_codeset.texi: Likewise.
* doc/posix-functions/bindtextdomain.texi: Likewise.
* doc/posix-functions/dcgettext.texi: Likewise.
* doc/posix-functions/dcngettext.texi: Likewise.
* doc/posix-functions/dgettext.texi: Likewise.
* doc/posix-functions/dladdr.texi: Likewise.
* doc/posix-functions/dngettext.texi: Likewise.
* doc/posix-functions/dup3.texi: Likewise.
* doc/posix-functions/ffsl.texi: Likewise.
* doc/posix-functions/ffsll.texi: Likewise.
* doc/posix-functions/getentropy.texi: Likewise.
* doc/posix-functions/getresgid.texi: Likewise.
* doc/posix-functions/getresuid.texi: Likewise.
* doc/posix-functions/gettext.texi: Likewise.
* doc/posix-functions/in6addr_any.texi: Likewise.
* doc/posix-functions/in6addr_loopback.texi: Likewise.
* doc/posix-functions/memmem.texi: Likewise.
* doc/posix-functions/mkostemp.texi: Likewise.
* doc/posix-functions/ngettext.texi: Likewise.
* doc/posix-functions/pipe2.texi: Likewise.
* doc/posix-functions/ppoll.texi: Likewise.
* doc/posix-functions/pthread_cond_clockwait.texi: Likewise.
* doc/posix-functions/pthread_mutex_clocklock.texi: Likewise.
* doc/posix-functions/pthread_rwlock_clockrdlock.texi: Likewise.
* doc/posix-functions/pthread_rwlock_clockwrlock.texi: Likewise.
* doc/posix-functions/ptsname_r.texi: Likewise.
* doc/posix-functions/qsort_r.texi: Likewise.
* doc/posix-functions/secure_getenv.texi: Likewise.
* doc/posix-functions/sem_clockwait.texi: Likewise.
* doc/posix-functions/setresgid.texi: Likewise.
* doc/posix-functions/setresuid.texi: Likewise.
* doc/posix-functions/textdomain.texi: Likewise.
* doc/posix-functions/timespec_get.texi: Likewise.
* doc/posix-functions/vasprintf.texi: Likewise.
* doc/posix-functions/reallocarray.texi: Likewise. Improve text.
* doc/gnulib.texi (Function Substitutes): Include them here.
(Glibc Function Substitutes): Don't include them here.
(Glibc libintl.h): Remove section.
(Glibc poll.h): Remove section.
(Glibc semaphore.h): Remove section.

9 months agodoc: Reference POSIX:2024 instead of POSIX:2018.
Bruno Haible [Sat, 20 Jul 2024 11:50:52 +0000 (13:50 +0200)]
doc: Reference POSIX:2024 instead of POSIX:2018.

* doc/*.texi: Change URL to POSIX.
* doc/posix-headers/*.texi: Likewise.
* doc/posix-functions/*.texi: Likewise.

9 months agodoc: Update status of functions that are removed from POSIX:2024.
Bruno Haible [Sat, 20 Jul 2024 11:44:43 +0000 (13:44 +0200)]
doc: Update status of functions that are removed from POSIX:2024.

* doc/pastposix-functions/_longjmp.texi: Moved here
fromdoc/posix-functions/.
* doc/pastposix-functions/_setjmp.texi: Likewise.
* doc/pastposix-functions/_tolower.texi: Likewise.
* doc/pastposix-functions/_toupper.texi: Likewise.
* doc/pastposix-functions/fattach.texi: Likewise.
* doc/pastposix-functions/fdetach.texi: Likewise.
* doc/pastposix-functions/ftw.texi: Likewise.
* doc/pastposix-functions/getitimer.texi: Likewise.
* doc/pastposix-functions/getmsg.texi: Likewise.
* doc/pastposix-functions/getpmsg.texi: Likewise.
* doc/pastposix-functions/gets.texi: Likewise.
* doc/pastposix-functions/gettimeofday.texi: Likewise.
* doc/pastposix-functions/ioctl.texi: Likewise.
* doc/pastposix-functions/isascii.texi: Likewise.
* doc/pastposix-functions/isastream.texi: Likewise.
* doc/pastposix-functions/posix_trace_*.texi: Likewise.
* doc/pastposix-functions/pthread_getconcurrency.texi: Likewise.
* doc/pastposix-functions/pthread_setconcurrency.texi: Likewise.
* doc/pastposix-functions/putmsg.texi: Likewise.
* doc/pastposix-functions/putpmsg.texi: Likewise.
* doc/pastposix-functions/setitimer.texi: Likewise.
* doc/pastposix-functions/setpgrp.texi: Likewise.
* doc/pastposix-functions/sighold.texi: Likewise.
* doc/pastposix-functions/sigignore.texi: Likewise.
* doc/pastposix-functions/siginterrupt.texi: Likewise.
* doc/pastposix-functions/sigpause.texi: Likewise.
* doc/pastposix-functions/sigrelse.texi: Likewise.
* doc/pastposix-functions/sigset.texi: Likewise.
* doc/pastposix-functions/tempnam.texi: Likewise.
* doc/pastposix-functions/toascii.texi: Likewise.
* doc/pastposix-functions/ulimit.texi: Likewise.
* doc/pastposix-functions/utime.texi: Likewise.
* doc/gnulib.texi (Function Substitutes): Don't include them here.
(Legacy Function Substitutes): Include them here.

9 months agogitlog-to-changelog: Improve output of pdf documentation.
Collin Funk [Sat, 20 Jul 2024 02:24:17 +0000 (19:24 -0700)]
gitlog-to-changelog: Improve output of pdf documentation.

* doc/gitlog-to-changelog.texi (gitlog-to-changelog): Reformat code to
use shorter lines and avoid overfull hboxes.

9 months agodoc: Reference a newer ISO C23 draft.
Bruno Haible [Sat, 20 Jul 2024 02:05:32 +0000 (04:05 +0200)]
doc: Reference a newer ISO C23 draft.

Suggested by Alejandro Colomar <alx@kernel.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00191.html>.

* doc/*/*.texi: Refer to n3220.pdf (February 2024) instead of
n3096.pdf (April 2023).

9 months agodoc: Add documentation about math_errhandling.
Bruno Haible [Fri, 19 Jul 2024 17:49:20 +0000 (19:49 +0200)]
doc: Add documentation about math_errhandling.

* doc/posix-functions/math_errhandling.texi: New file.
* doc/gnulib.texi (Function Substitutes): Include it.

9 months agoxstrtol: be more robust against odd failures
Paul Eggert [Fri, 19 Jul 2024 17:39:58 +0000 (10:39 -0700)]
xstrtol: be more robust against odd failures

* lib/xstrtol.c (__xstrtol): Don’t update *endptr if strtol doesn’t.
Also, if the underlying strtol gives an unusual error number and
sets *endpnr = nptr, assume that’s an error not a missing number.
Problems reported by Alejandro Colomar in:
https://lists.gnu.org/r/bug-gnulib/2024-07/msg00175.html
https://lists.gnu.org/r/bug-gnulib/2024-07/msg00176.html
* modules/xstrtol (Depends-on): Add nullptr.

9 months agodoc: Mention <math.h> function that were added in ISO C23.
Bruno Haible [Fri, 19 Jul 2024 17:21:05 +0000 (19:21 +0200)]
doc: Mention <math.h> function that were added in ISO C23.

* doc/posix-functions/acospi.texi: New file.
* doc/posix-functions/acospif.texi: New file.
* doc/posix-functions/acospil.texi: New file.
* doc/posix-functions/asinpi.texi: New file.
* doc/posix-functions/asinpif.texi: New file.
* doc/posix-functions/asinpil.texi: New file.
* doc/posix-functions/atanpi.texi: New file.
* doc/posix-functions/atanpif.texi: New file.
* doc/posix-functions/atanpil.texi: New file.
* doc/posix-functions/atan2pi.texi: New file.
* doc/posix-functions/atan2pif.texi: New file.
* doc/posix-functions/atan2pil.texi: New file.
* doc/posix-functions/compoundn.texi: New file.
* doc/posix-functions/compoundnf.texi: New file.
* doc/posix-functions/compoundnl.texi: New file.
* doc/posix-functions/cospi.texi: New file.
* doc/posix-functions/cospif.texi: New file.
* doc/posix-functions/cospil.texi: New file.
* doc/posix-functions/exp10.texi: Moved here from doc/glibc-functions/.
* doc/posix-functions/exp10f.texi: Moved here from doc/glibc-functions/.
* doc/posix-functions/exp10l.texi: Moved here from doc/glibc-functions/.
* doc/posix-functions/exp10m1.texi: New file.
* doc/posix-functions/exp10m1f.texi: New file.
* doc/posix-functions/exp10m1l.texi: New file.
* doc/posix-functions/exp2m1.texi: New file.
* doc/posix-functions/exp2m1f.texi: New file.
* doc/posix-functions/exp2m1l.texi: New file.
* doc/posix-functions/log10p1.texi: New file.
* doc/posix-functions/log10p1f.texi: New file.
* doc/posix-functions/log10p1l.texi: New file.
* doc/posix-functions/log2p1.texi: New file.
* doc/posix-functions/log2p1f.texi: New file.
* doc/posix-functions/log2p1l.texi: New file.
* doc/posix-functions/logp1.texi: New file.
* doc/posix-functions/logp1f.texi: New file.
* doc/posix-functions/logp1l.texi: New file.
* doc/posix-functions/pown.texi: New file.
* doc/posix-functions/pownf.texi: New file.
* doc/posix-functions/pownl.texi: New file.
* doc/posix-functions/powr.texi: New file.
* doc/posix-functions/powrf.texi: New file.
* doc/posix-functions/powrl.texi: New file.
* doc/posix-functions/rootn.texi: New file.
* doc/posix-functions/rootnf.texi: New file.
* doc/posix-functions/rootnl.texi: New file.
* doc/posix-functions/rsqrt.texi: New file.
* doc/posix-functions/rsqrtf.texi: New file.
* doc/posix-functions/rsqrtl.texi: New file.
* doc/posix-functions/sinpi.texi: New file.
* doc/posix-functions/sinpif.texi: New file.
* doc/posix-functions/sinpil.texi: New file.
* doc/posix-functions/tanpi.texi: New file.
* doc/posix-functions/tanpif.texi: New file.
* doc/posix-functions/tanpil.texi: New file.
* doc/gnulib.texi (Function Substitutes): Include them.
(Glibc math.h): Don't include glibc-functions/exp10*.texi.

9 months agodoc: Add references to ISO C23.
Bruno Haible [Fri, 19 Jul 2024 15:03:19 +0000 (17:03 +0200)]
doc: Add references to ISO C23.

* doc/posix-functions/totalorder*.texi: Reference ISO C23.
* doc/posix-functions/getpayload*.texi: Likewise.
* doc/posix-functions/setpayload*.texi: Likewise.

9 months agodoc: Mention a bug in NetBSD's *gettext functions.
Bruno Haible [Fri, 19 Jul 2024 14:51:01 +0000 (16:51 +0200)]
doc: Mention a bug in NetBSD's *gettext functions.

* doc/glibc-functions/gettext.texi: Mention buggy handling of empty
LANGUAGE environment variable.
* doc/glibc-functions/dgettext.texi: Likewise.
* doc/glibc-functions/dcgettext.texi: Likewise.
* doc/glibc-functions/ngettext.texi: Likewise.
* doc/glibc-functions/dngettext.texi: Likewise.
* doc/glibc-functions/dcngettext.texi: Likewise.

9 months agoxstrtol: Improve documentation.
Bruno Haible [Fri, 19 Jul 2024 16:45:28 +0000 (18:45 +0200)]
xstrtol: Improve documentation.

* lib/xstrtol.h: Don't test _STRTOL_ERROR, left-over from 2007-08-08.
(_DECLARE_XSTRTOL): Add the parameter names, referenced by the comments.

9 months ago* ChangeLog: Fix misspelling
Paul Eggert [Fri, 19 Jul 2024 00:33:47 +0000 (17:33 -0700)]
* ChangeLog: Fix misspelling

9 months agoxstrtol: document and stray less from strtol
Paul Eggert [Fri, 19 Jul 2024 00:28:36 +0000 (17:28 -0700)]
xstrtol: document and stray less from strtol

This patch alters xstrtol behavior slightly, in areas are not
likely to affect any real callers, by making xstrtol behave more
like the system strtol.  In particular, it lets xstrtol support
bases other than those required by POSIX, if the underlying
implementation does; this removes the need for an ‘assert’.
It also uses ‘restrict’ like the underlying strtol does.
The patch also documents xstrtol in xstrtol.h.
Problems reported by AlejandroColomar in:
https://lists.gnu.org/r/bug-gnulib/2024-07/msg00159.html
* lib/xstrtol.c: Do not include stdio.h or assure.h.
(__xstrtol): Use same parameter names as POSIX, to make it
easier for outsiders to follow.  Assume C99 decls after statement.
Do not require the base to be 0, or 2-36, as the underlying
implementation is allowed to support other bases.
Do not assume isspace preserves errno.
* lib/xstrtol.h (_DECLARE_XSTRTOL): Declare pointers to be
‘restrict’, for compatibility with C.
* m4/xstrtol.m4 (gl_XSTRTOL): Require AC_C_RESTRICT.
* modules/xstrtol (Depends-on): Remove ‘assure’.

9 months agoabort-debug: Don't assume that signal SIGABRT is unmasked and unhandled.
Bruno Haible [Thu, 18 Jul 2024 20:45:41 +0000 (22:45 +0200)]
abort-debug: Don't assume that signal SIGABRT is unmasked and unhandled.

* lib/abort-debug.c (rpl_abort): At the end, call the original abort
function.

9 months agoabort-debug: Document better.
Bruno Haible [Thu, 18 Jul 2024 20:40:07 +0000 (22:40 +0200)]
abort-debug: Document better.

Suggested by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00154.html>.

* lib/stdlib.in.h (abort): Add comment.
* doc/stack-trace.texi: Document what to do in signal handlers.

9 months agoxstrtol: Strengthen sanity check.
Alejandro Colomar [Thu, 18 Jul 2024 17:58:55 +0000 (19:58 +0200)]
xstrtol: Strengthen sanity check.

* lib/xstrtol.c (__xstrtol): Don't allow strtol_base to be 1.

Copyright-paperwork-exempt: Yes

9 months agodoc: Document the stack-trace and abort-debug modules.
Bruno Haible [Thu, 18 Jul 2024 12:23:23 +0000 (14:23 +0200)]
doc: Document the stack-trace and abort-debug modules.

* doc/stack-trace.texi: New file.
* doc/gnulib.texi (Particular Modules): Include it.

9 months agostdlib: Don't define print_stack_trace unconditionally.
Bruno Haible [Thu, 18 Jul 2024 11:06:27 +0000 (13:06 +0200)]
stdlib: Don't define print_stack_trace unconditionally.

* modules/stack-trace (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/stdlib.in.h (print_stack_trace): Don't define if module
'stack-trace' is not present.
* tests/macros.h (print_stack_trace): Define as a fallback if module
'stack-trace' is not present.

9 months agostack-trace: Don't use NetBSD's broken libasan.
Bruno Haible [Thu, 18 Jul 2024 11:03:31 +0000 (13:03 +0200)]
stack-trace: Don't use NetBSD's broken libasan.

* m4/stack-trace.m4 (gl_STACK_TRACE_EARLY): Test whether a program
linked with libasan even minimally works.

9 months agostack-trace: Use libasan as an alternative to libbacktrace.
Bruno Haible [Thu, 18 Jul 2024 02:58:39 +0000 (04:58 +0200)]
stack-trace: Use libasan as an alternative to libbacktrace.

* m4/stack-trace.m4 (gl_STACK_TRACE_EARLY): As a second choice, use
libasan.
* lib/stack-trace-impl.h (print_stack_trace_to) [HAVE_LIBASAN]:
Implement using libasan.
* lib/stack-trace.c (print_stack_trace): Test also HAVE_LIBASAN.
* lib/abort-debug.c (rpl_abort): Likewise.

9 months agostack-trace: Add tests.
Bruno Haible [Thu, 18 Jul 2024 02:15:34 +0000 (04:15 +0200)]
stack-trace: Add tests.

* tests/test-stack-trace.c: New file.
* modules/stack-trace-tests: New file.

9 months agostack-trace: New module.
Bruno Haible [Thu, 18 Jul 2024 02:04:23 +0000 (04:04 +0200)]
stack-trace: New module.

* lib/stdlib.in.h (print_stack_trace): Make part of the stack-trace
module.
* lib/stack-trace-impl.h: New file, based on lib/abort-debug.c.
* lib/stack-trace.c: New file, based on lib/abort-debug.c.
* lib/abort-debug.c: Include stack-trace-impl.h. Remove definitions
moved to stack-trace-impl.h.
(print_stack_trace): Remove function.
* m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize
GNULIB_STACK_TRACE.
(gl_STDLIB_H_DEFAULTS): Initialize CAN_PRINT_STACK_TRACE.
* m4/stack-trace.m4: New file, based on m4/abort-debug.m4.
* m4/abort-debug.m4 (gl_ABORT_DEBUG_EARLY): Remove macro.
(gl_ABORT_DEBUG): Require gl_STDLIB_H_DEFAULTS, gl_STACK_TRACE_EARLY.
Set REPLACE_ABORT here.
* modules/stdlib (Makefile.am): Substitute GNULIB_STACK_TRACE,
CAN_PRINT_STACK_TRACE.
* modules/stack-trace: New file.
* modules/abort-debug (Depends-on): Add stack-trace. Remove execinfo.
(configure.ac-early): Remove section.
* DEPENDENCIES: Update.

9 months agoabort-debug: Export the print_stack_trace function.
Bruno Haible [Thu, 18 Jul 2024 01:07:30 +0000 (03:07 +0200)]
abort-debug: Export the print_stack_trace function.

* lib/stdlib.in.h (print_stack_trace): Renamed from _gl_pre_abort.
* lib/abort-debug.c (print_stack_trace_to): Renamed from
print_stack_trace.
(print_stack_trace): Renamed from _gl_pre_abort.
(rpl_abort): Update.
* tests/macros.h (ASSERT, ASSERT_NO_STDIO): Update.

9 months agodoc: List library dependencies.
Bruno Haible [Wed, 17 Jul 2024 15:33:12 +0000 (17:33 +0200)]
doc: List library dependencies.

* DEPENDENCIES: List the library dependencies.

9 months agogitlog-to-changelog: Improve --version and --help output.
Collin Funk [Wed, 17 Jul 2024 02:21:51 +0000 (19:21 -0700)]
gitlog-to-changelog: Improve --version and --help output.

* build-aux/gitlog-to-changelog (usage): Add bug reporting address.
(print_version): New function.

9 months agoannounce-gen: Add bug reporting address to --help.
Collin Funk [Wed, 17 Jul 2024 02:18:22 +0000 (19:18 -0700)]
announce-gen: Add bug reporting address to --help.

* build-aux/announce-gen (usage): Add bug reporting address.

9 months agouseless-if-before-free: Add bug reporting address to --help.
Collin Funk [Wed, 17 Jul 2024 02:15:10 +0000 (19:15 -0700)]
useless-if-before-free: Add bug reporting address to --help.

* build-aux/useless-if-before-free (usage): Add bug reporting address.

9 months agostrnlen: port to Android 5.0 (API 21)
Paul Eggert [Mon, 15 Jul 2024 21:14:55 +0000 (14:14 -0700)]
strnlen: port to Android 5.0 (API 21)

This is needed for GNU Emacs, which attempts to port to these
old Android versions.
* m4/strnlen.m4 (AC_FUNC_STRNLEN): Replace if Autoconf 2.72 or
earlier, with code that detects the Android problem with strnlen.
This version works around some further bugs in the test, notably,
misplaced 'volatile' and need for volatile in the AIX 4.3 bug
check too.

9 months agomanywarnings: Don't enable -Wsystem-headers.
Bruno Haible [Mon, 15 Jul 2024 21:02:58 +0000 (23:02 +0200)]
manywarnings: Don't enable -Wsystem-headers.

* build-aux/gcc-warning.spec: Add -Wsystem-headers.
* build-aux/g++-warning.spec: Likewise.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Don't enable
-Wsystem-headers.
* m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL): Likewise.

9 months agoqcopy-acl: Fix copying of ACLs on CentOS 7 (regression 2023-01-12).
Bruno Haible [Mon, 15 Jul 2024 12:48:41 +0000 (14:48 +0200)]
qcopy-acl: Fix copying of ACLs on CentOS 7 (regression 2023-01-12).

* lib/qcopy-acl.c: Include <string.h>, <linux/xattr.h>.
(XATTR_NAME_NFSV4_ACL, XATTR_NAME_POSIX_ACL_ACCESS,
XATTR_NAME_POSIX_ACL_DEFAULT): New macros, from file-has-acl.c.
(is_attr_permissions): Test for these names explicitly.
* m4/acl.m4 (gl_QCOPY_ACL): New macro.
* modules/qcopy-acl (Files): Add m4/acl.m4.
(configure.ac): Invoke gl_QCOPY_ACL.

9 months agostdlib: Fix last commit on macOS, OpenBSD, mingw.
Bruno Haible [Mon, 15 Jul 2024 02:32:04 +0000 (04:32 +0200)]
stdlib: Fix last commit on macOS, OpenBSD, mingw.

* lib/stdlib.in.h: Don't include <string> with clang, and don't include
it on platforms other than Solaris.

9 months agostdlib: Avoid syntax errors in libstdc++ header files.
Bruno Haible [Sun, 14 Jul 2024 18:45:46 +0000 (20:45 +0200)]
stdlib: Avoid syntax errors in libstdc++ header files.

* lib/stdlib.in.h: Include <string> before strtol, strtoll, strtoul, or
strtoull gets defined as a macro.

9 months agoActivate strtold workarounds.
Bruno Haible [Sun, 14 Jul 2024 16:39:29 +0000 (18:39 +0200)]
Activate strtold workarounds.

* modules/c-strtold-tests (Depends-on): Add strtold.
* modules/ldtoastr (Depends-on): Add strtold.

9 months agostrtold: Work around major mingw bugs.
Bruno Haible [Sun, 14 Jul 2024 16:38:16 +0000 (18:38 +0200)]
strtold: Work around major mingw bugs.

* lib/strtod.c (HAVE_UNDERLYING_STRTOD) [USE_LONG_DOUBLE]: Set to 0 on
mingw versions before 10.0.
* doc/posix-functions/strtold.texi: Mention the mingw bugs.

9 months agouseless-if-before-free: Fix copyright year in --version output.
Collin Funk [Sun, 14 Jul 2024 03:14:22 +0000 (20:14 -0700)]
useless-if-before-free: Fix copyright year in --version output.

* build-aux/useless-if-before-free (copyright_year): Derive from
time-stamp.

9 months agoannounce-gen: Fix copyright year in --version output.
Collin Funk [Sun, 14 Jul 2024 03:10:46 +0000 (20:10 -0700)]
announce-gen: Fix copyright year in --version output.

* build-aux/announce-gen (copyright_year): Derive from time-stamp.

9 months agostdlib: Support use of clang++ on Ubuntu.
Bruno Haible [Sat, 13 Jul 2024 22:53:57 +0000 (00:53 +0200)]
stdlib: Support use of clang++ on Ubuntu.

* lib/stdlib.in.h: Ignore __need_system_stdlib_h when GCC's
c++/11/stdlib.h is being included or has been included.

9 months agodoc: Revamp list of dependencies.
Bruno Haible [Sat, 13 Jul 2024 15:32:07 +0000 (17:32 +0200)]
doc: Revamp list of dependencies.

* DEPENDENCIES: Clarify that GNU make is only needed on OpenBSD and
Solaris. Mark GNU tar as optional, not recommended. Add note about
Solaris 10. Add a second section "Dependencies for building the imported
code". Document the needed locales.

9 months agotests: Don't depend on the exact locale name.
Bruno Haible [Sat, 13 Jul 2024 15:26:37 +0000 (17:26 +0200)]
tests: Don't depend on the exact locale name.

* tests/test-c-ctype.c: Include <stdlib.h>.
(main): Test the return value of setlocale(). Try not only de_DE, but
also de_DE.ISO-8859-1.
* tests/test-vasnprintf-posix3.c (main): Try not only fa_IR.UTF-8, but
also fa_IR.
* tests/test-vasnwprintf-posix3.c (main): Likewise.

9 months agoUpdate last ChangeLog entry.
Bruno Haible [Fri, 12 Jul 2024 20:44:23 +0000 (22:44 +0200)]
Update last ChangeLog entry.

9 months agotimespec-sub: Fix compilation error on clang.
Pip Cet [Wed, 10 Jul 2024 15:56:34 +0000 (15:56 +0000)]
timespec-sub: Fix compilation error on clang.

* lib/timespec-sub.c (timespec_sub): Use 'int' as type of variable.
Copyright-paperwork-exempt: Yes

9 months agopthread-cond: Fix compilation error on native Windows.
Bruno Haible [Sun, 7 Jul 2024 00:53:37 +0000 (02:53 +0200)]
pthread-cond: Fix compilation error on native Windows.

* lib/pthread-cond.c: Include windows-cond.h, not windows-thread.h.

10 months agognulib-tool: simplify/speed startup
Paul Eggert [Sat, 6 Jul 2024 14:41:44 +0000 (16:41 +0200)]
gnulib-tool: simplify/speed startup

* gnulib-tool, gnulib-tool.py (prog): New var.  Use it to simplify
and speed up startup in common cases.

10 months agogitlog-to-changelog: Tweak documentation.
Bruno Haible [Thu, 4 Jul 2024 21:09:30 +0000 (23:09 +0200)]
gitlog-to-changelog: Tweak documentation.

* doc/gitlog-to-changelog.texi (gitlog-to-changelog): Omit irrelevant
detail.

10 months agoMake time-stamp after-save-hooks buffer-local.
Collin Funk [Thu, 4 Jul 2024 11:04:11 +0000 (04:04 -0700)]
Make time-stamp after-save-hooks buffer-local.

* build-aux/announce-gen: Pass optional arguments to 'add-hook'.
* build-aux/bootstrap: Likewise.
* build-aux/do-release-commit-and-tag: Likewise.
* build-aux/gendocs.sh: Likewise.
* build-aux/git-version-gen: Likewise.
* build-aux/gitlog-to-changelog: Likewise.
* build-aux/gnu-web-doc-update: Likewise.
* build-aux/gnupload: Likewise.
* build-aux/move-if-change: Likewise.
* build-aux/prefix-gnulib-mk: Likewise.
* build-aux/update-copyright: Likewise.
* build-aux/useless-if-before-free: Likewise.
* build-aux/vc-list-files: Likewise.
* top/bootstrap: Likewise.
* top/bootstrap-funclib.sh: Likewise.