]> Savannah Git Hosting - gnulib.git/log
gnulib.git
2 years agostdnoreturn: Mark as deprecated, not obsolete. (Regression 2022-12-24.)
Bruno Haible [Tue, 27 Dec 2022 10:13:05 +0000 (11:13 +0100)]
stdnoreturn: Mark as deprecated, not obsolete. (Regression 2022-12-24.)

* modules/stdnoreturn (Status): Remove.
(Notice): Say that it is deprecated, not obsolete.
* doc/noreturn.texi: Fix a typo.

2 years agostdbool-c99: fix typo
Paul Eggert [Mon, 26 Dec 2022 18:17:17 +0000 (10:17 -0800)]
stdbool-c99: fix typo

Reported against Autoconf by Todd C. Miller in:
https://lists.gnu.org/r/autoconf/2022-12/msg00001.html
* m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Sync from Autoconf master.

2 years agoctime: Mark as deprecated, not obsolete. (Regression 2022-12-21.)
Bruno Haible [Mon, 26 Dec 2022 17:12:45 +0000 (18:12 +0100)]
ctime: Mark as deprecated, not obsolete. (Regression 2022-12-21.)

* modules/ctime (Status): Remove.
(Notice): Say that it is deprecated, not obsolete.

2 years agolargefile: sync from Autoconf master
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.

2 years agoextensions: enable some C23 Annex F functions
Paul Eggert [Sun, 25 Dec 2022 07:39:41 +0000 (23:39 -0800)]
extensions: enable some C23 Annex F functions

* m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
Also define __STDC_WANT_IEC_60559_EXT__, for C23 Annex F
functions like totalorder.  This syncs from Autoconf master.

2 years agostdnoreturn: deprecate
Paul Eggert [Sat, 24 Dec 2022 09:29:29 +0000 (01:29 -0800)]
stdnoreturn: deprecate

C23 says <stdnoreturn.h> is obsolescent, so deprecate the
stdnoreturn module.  I don't think it was being used anyway
as it had too many problems.
* modules/stdnoreturn: Mark as obsolete.

2 years agodoc: C2x → C23
Paul Eggert [Sat, 24 Dec 2022 08:10:23 +0000 (00:10 -0800)]
doc: C2x → C23

2 years agofile-has-acl: improve recent NFSv4 support
Paul Eggert [Fri, 23 Dec 2022 23:18:29 +0000 (15:18 -0800)]
file-has-acl: improve recent NFSv4 support

This fixes a link failure with emacsclient on GNU/Linux.  This
program wants file_has_acl but none of the other ACL primitives,
so it doesn’t link acl-internal.o; this way it doesn’t need to
link with -lacl.  While I was at it I reviewed the recent changes,
fixed some unlikely overflow bugs, and adjusted to GNU style.
* doc/acl-nfsv4.txt: Remove.  Its contents are now in a
comment in lib/file-has-acl.c.
* lib/acl-internal.c, lib/acl-internal.h: Move recent changes
relating to acl_nfs4_nontrivial to lib/file-has-acl.c, so that
there is no trouble linking programs that need only file_has_acl.
* lib/file-has-acl.c (acl_nfs4_nontrivial): Move here from
lib/acl-internal.c, so that we needn't link -lacl in
programs that want only file_has_acl, such as emacsclient.
Do not assume a char buffer is aligned for uint32_t.
Check more carefully for buffer read overrun.
Allow up to 6 ACEs, since other code does; but check
that they’re distinct.  Avoid integer overflow.
Use memcmp rather than strncmp to compare memory blocks.
(file_has_acl): Preserve initial errno instead of setting to 0.
Allocate a bit more room for trivial ACL buffer.
Use EINVAL for botchedk NFSv4 ACLs (which shouldn’t happen).

2 years agoposix_spawnp-tests: fix filename typo
Paul Eggert [Fri, 23 Dec 2022 05:19:34 +0000 (21:19 -0800)]
posix_spawnp-tests: fix filename typo

Problem reported for GNU m4 by Mitchell Dorrell in:
https://lists.gnu.org/r/bug-m4/2022-12/msg00000.html
* tests/test-posix_spawnp-script.c (DATA_FILENAME):
Fix typo in file name that caused race with
test-posix_spawn-script.c.

2 years agofile-has-acl: Basic support for checking NFSv4 ACLs in Linux.
Ondrej Valousek [Fri, 2 Dec 2022 12:40:19 +0000 (13:40 +0100)]
file-has-acl: Basic support for checking NFSv4 ACLs in Linux.

* lib/acl-internal.h (acl_nfs4_nontrivial): New declaration.
* lib/acl-internal.c (acl_nfs4_nontrivial): New function.
* lib/file-has-acl.c: Include <arpa/inet.h>.
(XATTR_NAME_NFSV4_ACL, TRIVIAL_NFS4_ACL_MAX_LENGTH): New macros.
(file_has_acl): Test for NFSv4 ACLs.
* doc/acl-nfsv4.txt: New file.

2 years agoPort __has_c_attribute to strict C23
Paul Eggert [Thu, 22 Dec 2022 05:45:18 +0000 (21:45 -0800)]
Port __has_c_attribute to strict C23

* m4/gnulib-common.m4 (_GL_HAS_C_ATTRIBUTE): Remove, as C23 says
behavior is undefined if __has_c_attribute appears anywhere other
than at the top level of an #if or #ifdef.  All uses replaced by
wordier invocations of __has_c_attribute.

2 years agoasctime, ctime: deprecate
Paul Eggert [Wed, 21 Dec 2022 21:25:39 +0000 (13:25 -0800)]
asctime, ctime: deprecate

C23 deprecates asctime and ctime, so deprecate them in Gnulib too.
* NEWS, doc/posix-functions/asctime.texi:
* doc/posix-functions/ctime.texi: Mention this.
* lib/time.in.h (ctime): Deprecate any ctime replacement.
* modules/ctime: Now obsolete.

2 years agoautoupdate
Karl Berry [Tue, 20 Dec 2022 21:03:38 +0000 (13:03 -0800)]
autoupdate

2 years agomemset_explicit: port to older MS-Windows
Paul Eggert [Sun, 18 Dec 2022 07:45:56 +0000 (23:45 -0800)]
memset_explicit: port to older MS-Windows

* lib/memset_explicit.c (memset_explicit):
Remove special case for C==0 and MS-Windows.  The code isn’t
needed for correctness and it’s more trouble than it’s worth as it
prevents this module from being used with GNU Emacs, which wants
to port to MS-Windows versions so old that they lack
SecureZeroMemory.

2 years agoUpdate users.txt.
Bruno Haible [Fri, 9 Dec 2022 23:58:37 +0000 (00:58 +0100)]
Update users.txt.

* users.txt: Add lbzip2.

2 years agofts: make debug version compilable again
Paul Eggert [Fri, 9 Dec 2022 23:31:33 +0000 (15:31 -0800)]
fts: make debug version compilable again

This fixes things in what I hope is a better way than the
fd-only approach proposed by Kamil Dudka here:
https://lists.gnu.org/archive/html/bug-gnulib/2018-03/msg00079.html
https://lists.gnu.org/archive/html/bug-gnulib/2018-03/msg00080.html
* lib/fts.c (GNULIB_FTS_DEBUG): Rename from FTS_DEBUG,
to avoid collision with coreutils symbol.
Do not include <stdint.h> (not needed, since we include <stdint.h>)
or "getcwdat.h" (no longer exists).
(fd_ring_check, fd_ring_print): Add forward decls.
(struct devino): New type.
(PRINT_DEVINO): New macro.
(getdevino): New static function.
(fd_ring_print): Do nothing if not debugging.
(fd_ring_print, fd_ring_check): Use getdevino instead of getcwdat.
The output isn’t as good, but at least it compiles and runs.

2 years agoverify: update __STDC_VERSION__ as per C23
Paul Eggert [Thu, 8 Dec 2022 00:34:26 +0000 (16:34 -0800)]
verify: update __STDC_VERSION__ as per C23

This shouldn’t affect anything; it’s merely a refactoring.
* lib/verify.h (_GL_HAVE__STATIC_ASSERT1): Require
__STDC_VERSION__ to be at least 202311, instead of at least
202000.  The latter number was put in in 2019 because we didn’t
yet know C23’s __STDC_VERSION__ value.

2 years agofts: fix race + mishandling of fstatat failure
Paul Eggert [Tue, 6 Dec 2022 18:27:43 +0000 (10:27 -0800)]
fts: fix race + mishandling of fstatat failure

I hope this fixes a Luke Dashjr coreutils bug report about ext4
ramdisks; see “9.1: du Aborted (corrupt filesystem)”
<https://debbugs.gnu.org/59821>.
* lib/fts.c (fts_build): Fix two bugs.  First, fts_stat was being
called without checking its return value, causing a later abort.
Second, there was a race between opening a directory and statting
it, fixed by using fstat on the file descriptor rather than
fstatat on the directory name.

2 years agofts: omit goto break_without_closedir
Paul Eggert [Tue, 6 Dec 2022 18:03:56 +0000 (10:03 -0800)]
fts: omit goto break_without_closedir

* lib/fts.c (fts_build): Refactor to omit goto.

2 years agofts: clarify ISSET
Paul Eggert [Tue, 6 Dec 2022 17:56:55 +0000 (09:56 -0800)]
fts: clarify ISSET

* lib/fts.c (ISSET): Refactor to clarify boolean usage.

2 years agoargp: Correct documentation.
Bruno Haible [Mon, 5 Dec 2022 23:25:34 +0000 (00:25 +0100)]
argp: Correct documentation.

Reported by José E. Marchesi <jemarch@gnu.org>.

* doc/glibc-functions/argp_*.texi: Mention the 'argp' module.

2 years agodoc: poll: document poll of special files not supported on macOS
Pádraig Brady [Fri, 2 Dec 2022 14:45:23 +0000 (14:45 +0000)]
doc: poll: document poll of special files not supported on macOS

* doc/posix-functions/poll.texi: Reinstate (updated) macOS info,
removed in recent cleanup re removal of support for Mac OS X <= 10.4.
* m4/poll.m4: Update macOS to latest tested version.

2 years agoadd new ronna and quetta SI prefixes
Pádraig Brady [Tue, 29 Nov 2022 15:05:07 +0000 (15:05 +0000)]
add new ronna and quetta SI prefixes

As voted for in Nov 2022 by the BIPM:
https://www.bipm.org/en/cgpm-2022/resolution-3

* lib/human.c: Add Ronna (10^27), and Quetta (10^30) to the prefix list.
* lib/xstrtol.c (__xstrtol): Likewise.

2 years agoUpdate users.txt.
Bruno Haible [Tue, 29 Nov 2022 12:31:13 +0000 (13:31 +0100)]
Update users.txt.

* users.txt: Add 4ti2, ale, amanda, binfmt-support, cgminer, collectd,
complexity, dc3dd, dico, enchant-2, fuse-overlayfs, gsequencer, idutils,
libu2f-host, licenseutils, mmv, pacemaker, trader, ttfautohint.

2 years agoexplicit_bzero: implement via memset_explicit
Paul Eggert [Mon, 28 Nov 2022 04:52:05 +0000 (20:52 -0800)]
explicit_bzero: implement via memset_explicit

* lib/explicit_bzero.c (explicit_bzero):
Simplify by just calling memset_explicit.
* m4/explicit_bzero.m4 (gl_PREREQ_EXPLICIT_BZERO): Remove.
All uses removed.
* modules/explicit_bzero (Depends-on): Add memset_explicit.

2 years agoexplicit_bzero: memset_explicit is standard
Paul Eggert [Mon, 28 Nov 2022 04:52:04 +0000 (20:52 -0800)]
explicit_bzero: memset_explicit is standard

* doc/glibc-functions/explicit_bzero.texi:
Say that memset_explicit is preferred in new code.

2 years agoread-file: use memset_explicit
Paul Eggert [Mon, 28 Nov 2022 04:52:04 +0000 (20:52 -0800)]
read-file: use memset_explicit

* lib/read-file.c (fread_file, read_file):
Use memset_explicit instead of explicit_bzero.
* modules/read-file (Depends-on): Depend on memset_explicit
instead of on explicit_bzero.

2 years agomemset_explicit: new module
Paul Eggert [Mon, 28 Nov 2022 04:52:04 +0000 (20:52 -0800)]
memset_explicit: new module

* doc/posix-functions/memset_explicit.texi, lib/memset_explicit.c:
* m4/memset_explicit.m4, modules/memset_explicit:
* modules/memset_explicit-tests, tests/test-memset_explicit.c:
New files.
* lib/string.in.h (memset_explict): New decl.
* m4/string_h.m4 (gl_STRING_H, gl_STRING_H_REQUIRE_DEFAULTS)
(gl_STRING_H_DEFAULTS):
* modules/string (string.h):
Support memset_explicit.

2 years agoexplicit_bzero: add poison
Paul Eggert [Mon, 28 Nov 2022 01:15:24 +0000 (17:15 -0800)]
explicit_bzero: add poison

* m4/string_h.m4 (gl_STRING_H): Poison explicit_bzero.
This was inadvertently omitted when explicit_bzero was added.

2 years agobootstrap: Fix --help output.
Arsen Arsenović [Sun, 27 Nov 2022 19:45:06 +0000 (20:45 +0100)]
bootstrap: Fix --help output.

* build-aux/bootstrap (usage): Regenerate.

2 years agoexplicit_bzero: work with gcc -std=c99
Paul Eggert [Sun, 27 Nov 2022 17:59:32 +0000 (09:59 -0800)]
explicit_bzero: work with gcc -std=c99

* lib/explicit_bzero.c (explicit_bzero) [__GNUC__ && !__clang__]:
Use __asm__ instead of asm.

2 years agoPrefer "kill -INT" to killing with a number
Paul Eggert [Sat, 26 Nov 2022 18:43:24 +0000 (10:43 -0800)]
Prefer "kill -INT" to killing with a number

* m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
* tests/test-login_tty.c (main):
* tests/test-pthread_sigmask1.c (main):
* tests/test-sigprocmask.c (main):
Prefer "kill -INT" to "kill -N" where N is SIGINT’s value.
Don’t assume pid_t fits in int.

2 years agoIn 'trap' commands, prefer symbolic to numeric signal names.
Bruno Haible [Sat, 26 Nov 2022 14:25:44 +0000 (15:25 +0100)]
In 'trap' commands, prefer symbolic to numeric signal names.

Reported by Mike Fulton <fultonm@ca.ibm.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00130.html>.

* gnulib-tool: Use symbolic signal names.
* posix-modules: Likewise.
* MODULES.html.sh: Likewise.
* build-aux/bootstrap (prepare_GNULIB_SRCDIR): Likewise.
* build-aux/csharpcomp.sh.in: Likewise.
* build-aux/gnu-web-doc-update: Likewise.
* top/autogen.sh: Likewise.
* top/bootstrap-funclib.sh: Likewise.
* top/gitsub.sh: Likewise.
* lib/t-idcache: Likewise.
* tests/havelib/rpath-1: Likewise.
* tests/havelib/rpath-2_a: Likewise.
* tests/havelib/rpath-2_b: Likewise.
* tests/havelib/rpath-3_a: Likewise.
* tests/havelib/rpath-3_b: Likewise.
* tests/init.sh: Likewise.
* tests/test-binary-io.sh: Likewise.
* tests/test-c-stack.sh: Likewise.
* tests/test-c-stack2.sh: Likewise.
* tests/test-dprintf-posix.sh: Likewise.
* tests/test-fpending.sh: Likewise.
* tests/test-fprintf-posix.sh: Likewise.
* tests/test-lseek.sh: Likewise.
* tests/test-printf-posix.sh: Likewise.
* tests/test-select-in.sh: Likewise.
* tests/test-select-out.sh: Likewise.
* tests/test-sigpipe.sh: Likewise.
* tests/test-tsearch.sh: Likewise.
* tests/test-update-copyright.sh: Likewise.
* tests/test-vdprintf-posix.sh: Likewise.
* tests/test-vfprintf-posix.sh: Likewise.
* tests/test-vprintf-posix.sh: Likewise.
* tests/test-xprintf-posix.sh: Likewise.
* tests/uniwidth/test-uc_width2.sh: Likewise.

2 years agoposix_spawn-internal: Avoid warning on macOS.
Bruno Haible [Sun, 20 Nov 2022 11:47:20 +0000 (12:47 +0100)]
posix_spawn-internal: Avoid warning on macOS.

Suggested by Minsoo Choo in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00114.html>.

* lib/spawni.c: Ignore -Wdeprecated-declarations warnings.

2 years agoposix_spawn tests: Fix compilation error (regression 2022-09-14).
Bruno Haible [Sun, 20 Nov 2022 10:09:19 +0000 (11:09 +0100)]
posix_spawn tests: Fix compilation error (regression 2022-09-14).

* modules/posix_spawn-tests (Makefile.am): Augment DEFS, to define
EXEEXT.

2 years agoparse-datetime: improve doc formatting, timeliness
Paul Eggert [Tue, 15 Nov 2022 02:36:41 +0000 (21:36 -0500)]
parse-datetime: improve doc formatting, timeliness

* doc/parse-datetime.texi: Use @samp and @code in menus
for consistenty with how the Coreutils manual will do
this sort of thing.  Update examples to this year.

2 years agoautoupdate
Paul Eggert [Sun, 13 Nov 2022 18:44:49 +0000 (10:44 -0800)]
autoupdate

2 years agoautoupdate
Karl Berry [Sun, 13 Nov 2022 15:53:36 +0000 (07:53 -0800)]
autoupdate

2 years agovc-list-files-tests: Avoid OpenPGP private key operations.
Simon Josefsson [Sun, 13 Nov 2022 10:50:51 +0000 (11:50 +0100)]
vc-list-files-tests: Avoid OpenPGP private key operations.

* tests/test-vc-list-files-git.sh (GIT_CONFIG_GLOBAL): Set it to /dev/null.

2 years agoautoupdate
Karl Berry [Tue, 8 Nov 2022 21:39:40 +0000 (13:39 -0800)]
autoupdate

2 years agoautoupdate
Karl Berry [Sun, 6 Nov 2022 14:13:58 +0000 (06:13 -0800)]
autoupdate

2 years agodynarray: Rename to glibc-internal/dynarray.
Bruno Haible [Thu, 3 Nov 2022 12:32:42 +0000 (13:32 +0100)]
dynarray: Rename to glibc-internal/dynarray.

* modules/glibc-internal/dynarray: Renamed from modules/dynarray.
* modules/glibc-internal/dynarray-tests: Renamed from
modules/dynarray-tests.
* modules/regex (Depends-on): Update.
* NEWS: Mention this change and the previous one.

2 years agoscratch_buffer: Rename to glibc-internal/scratch_buffer.
Bruno Haible [Thu, 3 Nov 2022 12:30:04 +0000 (13:30 +0100)]
scratch_buffer: Rename to glibc-internal/scratch_buffer.

* modules/glibc-internal/scratch_buffer: Renamed from
modules/scratch_buffer.
* modules/glibc-internal/scratch_buffer-tests: Renamed from
modules/scratch_buffer-tests.
* modules/canonicalize (Depends-on): Update.
* modules/canonicalize-lgpl (Depends-on): Likewise.
* modules/glob (Depends-on): Likewise.

2 years agodoc: mention macOS war on sprintf
Paul Eggert [Thu, 3 Nov 2022 18:43:45 +0000 (11:43 -0700)]
doc: mention macOS war on sprintf

* doc/posix-functions/sprintf.texi, doc/posix-functions/vsnprintf.texi:
Mention that these functions are deprecated.

2 years agoscratch_buffer: Document last change.
Bruno Haible [Thu, 3 Nov 2022 02:17:37 +0000 (03:17 +0100)]
scratch_buffer: Document last change.

* NEWS: Mention last change.

2 years agoscratch_buffer: adjust to glibc changes
Paul Eggert [Thu, 3 Nov 2022 01:14:15 +0000 (18:14 -0700)]
scratch_buffer: adjust to glibc changes

Problem reported by Karl Berry in:
https://lists.gnu.org/r/bug-gnulib/2022-11/msg00004.html
* build-aux/depcomp, doc/make-stds.texi, lib/malloc/scratch_buffer.h:
Autoupdate.
* build-aux/install-reloc (func_create_wrapper):
Omit removed file scratch_buffer_dupfree.c.
* config/srclist.txt: Remove lib/malloc/scratch_buffer_dupfree.c
* lib/canonicalize-lgpl.c: Merge changes from glibc through its
commit ef0700004bf0dccf493a5e8e21f71d9e7972ea9f dated 2022-07-05
11:04:45 +0200.
(__strdup) [!_LIBC]: New macro.
(struct realpath_bufs): New type.
(realpath_stk): Use it as the extra argument.  All uses changed.
No longer any need for noinline or GCC_BOGUS_WRETURN_LOCAL_ADDR.
* lib/canonicalize.c (struct realpath_bufs)
(canonicalize_filename_mode_stk): Likewise.
* lib/malloc/scratch_buffer_dupfree.c:
Remove, since it was removed in glibc.
* lib/scratch_buffer.h (scratch_buffer_dupfree) [0]:
(__libc_scratch_buffer_dupfree): Remove decls.
* modules/relocatable-prog-wrapper (Files):
* modules/scratch_buffer (Files, lib_SOURCES):
Remove lib/malloc/scratch_buffer_dupfree.c.

2 years agorelocatable-script: Relax license.
Bruno Haible [Tue, 1 Nov 2022 22:23:16 +0000 (23:23 +0100)]
relocatable-script: Relax license.

* modules/relocatable-script (License): Change to GPLv2+.
* build-aux/relocatable.sh.in: Change copyright header to GPLv2+.

2 years agoautoupdate
Karl Berry [Tue, 1 Nov 2022 20:49:33 +0000 (13:49 -0700)]
autoupdate

2 years agomaintainer-makefile: Fix last sc_indent commit.
Simon Josefsson [Tue, 1 Nov 2022 08:09:02 +0000 (09:09 +0100)]
maintainer-makefile: Fix last sc_indent commit.

* top/maint.mk (sc_indent): Don't use grep -q.
Suggested by Bruno Haible.

2 years agomaintainer-makefile: Add syntax-check rule for unportable 'grep -q'.
Simon Josefsson [Tue, 1 Nov 2022 08:06:56 +0000 (09:06 +0100)]
maintainer-makefile: Add syntax-check rule for unportable 'grep -q'.

* top/maint.mk (sc_unportable_grep_q): Add.

2 years agomaintainer-makefile: Fix Apple Xcode 'make syntax-check'.
Simon Josefsson [Mon, 31 Oct 2022 08:42:42 +0000 (09:42 +0100)]
maintainer-makefile: Fix Apple Xcode 'make syntax-check'.

* top/maint.mk (sc_indent): Don't use non-GNU indent.

2 years agothread: pacify gcc -Wbad-function-cast
Paul Eggert [Sun, 30 Oct 2022 19:39:08 +0000 (12:39 -0700)]
thread: pacify gcc -Wbad-function-cast

* lib/glthread/thread.h (gl_thread_self_pointer): With POSIX
threads, cast the call to gl_thread_t before casting to void *.

2 years agotest-getlogin: pacify gcc -Wshadow
Paul Eggert [Sun, 30 Oct 2022 19:29:26 +0000 (12:29 -0700)]
test-getlogin: pacify gcc -Wshadow

* tests/test-getlogin.h (test_getlogin_result): Rename local.

2 years agogendocs: Output timestamp in English.
Simon Josefsson [Tue, 25 Oct 2022 21:39:15 +0000 (23:39 +0200)]
gendocs: Output timestamp in English.

* build-aux/gendocs.sh (SETLANG): Add LC_TIME= for "date".

2 years agoassert-h: Make static_assert work on Solaris 11.4.
Bruno Haible [Sun, 23 Oct 2022 14:43:06 +0000 (16:43 +0200)]
assert-h: Make static_assert work on Solaris 11.4.

* m4/assert_h.m4 (gl_ASSERT_H): After including <assert.h>, on Solaris,
redefine static_assert.

2 years agogetdelim: Work around buggy implementation on macOS 10.13.
Bruno Haible [Mon, 17 Oct 2022 00:44:54 +0000 (02:44 +0200)]
getdelim: Work around buggy implementation on macOS 10.13.

* doc/posix-functions/getdelim.texi: Mention the macOS bug.
* m4/getdelim.m4 (gl_FUNC_GETDELIM): Let the "checking for working
getdelim function" test answer 'no' on macOS.

2 years agoUpdate to Unicode 15.0.0.
Bruno Haible [Sat, 15 Oct 2022 22:46:24 +0000 (00:46 +0200)]
Update to Unicode 15.0.0.

* lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
Exclude 0x13439..0x1343F.
(get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.

* All generated files under lib/uni* and tests/uni*: Regenerate.
* tests/uniname/NameAliases.txt: Update.
* tests/uniname/UnicodeData.txt: Update.
* tests/uninorm/NormalizationTest.txt: Update.
* tests/unigbrk/GraphemeBreakTest.txt: Update.
* tests/uniwbrk/WordBreakTest.txt: Update.

* tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
0x0ECE, 0x10EFD..0x10EFF, 0x11241, 0x11F00..0x11F01, 0x11F36..0x11F3A,
0x11F40, 0x11F42, 0x13439..0x13440, 0x13447..0x13455, 0x1E08F,
0x1E4EC..0x1E4EF.

* All the affected modules: Bump required libunistring version.

2 years agogen-uni-tables: Temporarily revert last change.
Bruno Haible [Sat, 15 Oct 2022 17:59:51 +0000 (19:59 +0200)]
gen-uni-tables: Temporarily revert last change.

* lib/gen-uni-tables.c: Include <stdbool.h>, unless the C compiler
advertises compliance to ISO C 23.

2 years agodoc: improve intprops doc
Paul Eggert [Thu, 13 Oct 2022 00:18:20 +0000 (17:18 -0700)]
doc: improve intprops doc

* doc/intprops.texi: Tighten up wording, by saying that macros
"yield 1 if X, 0 otherwise" rather than the weaker "yield 1 if X".
Say "yield" rather than "return" since the macros are not
functions.  Say "1" and "0" rather than "true" and "false" since
the macros yield int.  Say that stdckdint.h is the standard
alternative to the _WRAPV macros.  Mention another source of
problems with the _OVERFLOW macros.

2 years agoautoupdate
Karl Berry [Wed, 12 Oct 2022 14:08:25 +0000 (07:08 -0700)]
autoupdate

2 years agotests: prefer stdckdint to intprops
Paul Eggert [Tue, 11 Oct 2022 01:45:03 +0000 (18:45 -0700)]
tests: prefer stdckdint to intprops

* modules/chown-tests, modules/fchownat-tests:
* modules/fdutimensat-tests, modules/futimens-tests:
* modules/lchown-tests, modules/stat-time-tests:
* modules/utime-tests, modules/utimens-tests:
* modules/utimensat-tests:
(Depends on): Depend on stdckint, not intprops.
* tests/nap.h: Include stdckdint.h, not intprops.h.
All macro uses changed.

2 years agostat-time: prefer stdckdint to intprops
Paul Eggert [Tue, 11 Oct 2022 01:26:05 +0000 (18:26 -0700)]
stat-time: prefer stdckdint to intprops

* lib/stat-time.h: Include stdckdint.h instead of intprops.h.
(stat_time_normalize): Use ckd_add instead of INT_ADD_WRAPV.
* modules/stat-time (Depends-on): Depend on stdckdint, not intprops.

2 years agoxalloc: remove stray includes + dependencies
Paul Eggert [Tue, 11 Oct 2022 01:17:02 +0000 (18:17 -0700)]
xalloc: remove stray includes + dependencies

These used to be needed, but are not needed now.
* lib/xalloc.h: Do not include stdlib.h.
[GNULIB_XALLOC]: Do not include "intprops.h".
* lib/xmalloc.c: Include stdint.h here instead, for SIZE_MAX.
* modules/xalloc-die, modules/xvasprintf (Depends-on): Remove stdint.

2 years agoautoupdate
Karl Berry [Sat, 8 Oct 2022 15:10:14 +0000 (08:10 -0700)]
autoupdate

2 years agoassert-h: suppress Apple clang 13 false alarms
Paul Eggert [Sat, 1 Oct 2022 00:35:18 +0000 (17:35 -0700)]
assert-h: suppress Apple clang 13 false alarms

* m4/assert_h.m4 (gl_ASSERT_H): Suppress bogus warnings from Apple
clang 13 (clang-1300.0.29.30).  Problem privately reported by
Mattias Engdegård for GNU Emacs.

2 years agolargefile: fix detection of time_t size on mingw32
Daiki Ueno [Mon, 26 Sep 2022 04:48:42 +0000 (13:48 +0900)]
largefile: fix detection of time_t size on mingw32

* modules/largefile (configure.ac-early): Ensure gl_YEAR2038_EARLY
is invoked before gl_YEAR2038_BODY.

2 years agofts: fix errno handling if dirfd fails
Paul Eggert [Mon, 26 Sep 2022 01:33:49 +0000 (18:33 -0700)]
fts: fix errno handling if dirfd fails

* lib/fts.c (fts_build): Use proper errno if dirfd failed.
Although I don’t know of any platform where dirfd can fail here,
we might as well get it right.

2 years agostdbool: Mostly revert last patch.
Bruno Haible [Sun, 25 Sep 2022 14:38:19 +0000 (16:38 +0200)]
stdbool: Mostly revert last patch.

* m4/c-bool.m4 (gl_C_BOOL): If stdbool.h does not exist, just err out.
* modules/stdbool (Files): Remove m4/stdbool.m4.

2 years agostdbool: Don't #include a gnulib-generated stdbool.h from config.h.
Bruno Haible [Sat, 24 Sep 2022 21:42:44 +0000 (23:42 +0200)]
stdbool: Don't #include a gnulib-generated stdbool.h from config.h.

* m4/c-bool.m4 (gl_C_BOOL): Check for stdbool.h and for _Bool. If
stdbool.h does not exist, don't #include <stdbool.h> but instead put the
substitute code into config.h.

2 years agostdalign: Don't #include a gnulib-generated stdalign.h from config.h.
Bruno Haible [Sat, 24 Sep 2022 17:56:31 +0000 (19:56 +0200)]
stdalign: Don't #include a gnulib-generated stdalign.h from config.h.

* m4/stdalign.m4 (gl_STDALIGN_H): Check for stdalign.h. If it does not
exist, don't #include <stdalign.h> but instead put the substitute code
into config.h.

2 years agostdalign: Fix compilation error with MSVC in C++ mode.
Bruno Haible [Sat, 24 Sep 2022 22:38:15 +0000 (00:38 +0200)]
stdalign: Fix compilation error with MSVC in C++ mode.

* lib/stdalign.in.h: Treat MSVC in C++ mode like C++11 compliant
compilers.
* tests/test-stdalign-c++.cc: Include some other header files.

2 years agostdalign: Avoid namespace pollution.
Bruno Haible [Sat, 24 Sep 2022 22:23:20 +0000 (00:23 +0200)]
stdalign: Avoid namespace pollution.

* lib/stdalign.in.h (_GL_STDALIGN_NEEDS_STDDEF): New macro.
Include <stddef.h> only when needed.

2 years agowarnings, manywarnings: Doc fixes.
Simon Josefsson [Fri, 23 Sep 2022 07:06:22 +0000 (09:06 +0200)]
warnings, manywarnings: Doc fixes.

* doc/manywarnings.texi (manywarnings): Improve usage instruction.
Start list of comments on particular warning flags, based on
comment from Paul Eggert <eggert@cs.ucla.edu>.
* doc/warnings.texi (warnings): Mention that it is often used with manywarnings.

2 years agoautoupdate
Karl Berry [Thu, 22 Sep 2022 14:22:59 +0000 (07:22 -0700)]
autoupdate

2 years agoassert-h: suppress clang false alarms
Paul Eggert [Wed, 21 Sep 2022 23:37:37 +0000 (16:37 -0700)]
assert-h: suppress clang false alarms

Suppress scads of annoying warnings from clang version 14.0.5
(Fedora 14.0.5-1.fc36) of the form "warning: '_Static_assert' with
no message is a C2x extension [-Wc2x-extensions]",
by refusing to use single-arg static_assert with older clang.
* m4/assert_h.m4 (gl_ASSERT_H): Turn -Wc2x-extensions from a
warning into an error when testing static_assert, so that the
annoying diagnostic causes the test to fail, which causes assert.h
to be replaced in a way that suppresses the diagnostic during
the real build.

2 years agoAdd another helper script for creating testdirs.
Bruno Haible [Tue, 20 Sep 2022 22:29:05 +0000 (00:29 +0200)]
Add another helper script for creating testdirs.

* all-modules: New file, based on posix-modules.

2 years agosnippet/warn-on-use: Don't cause wrong AC_CHECK_DECL results with clang.
Bruno Haible [Tue, 20 Sep 2022 21:31:19 +0000 (23:31 +0200)]
snippet/warn-on-use: Don't cause wrong AC_CHECK_DECL results with clang.

* m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Use the clang command-line
option that disables implicit built-in function declarations in clang.

2 years agostdbool, stdbool-c99 tests: Fix compilation error with clang/MSVC.
Bruno Haible [Mon, 19 Sep 2022 19:20:33 +0000 (21:20 +0200)]
stdbool, stdbool-c99 tests: Fix compilation error with clang/MSVC.

* tests/test-stdbool.c (WORKING_BOOL): Define to 0 on compilers that
define _MSC_VER.

2 years agostdbool: omit ‘#undef true’
Paul Eggert [Sun, 18 Sep 2022 18:26:36 +0000 (11:26 -0700)]
stdbool: omit ‘#undef true’

This is mostly just simplification.
* m4/c-bool.m4 (gl_C_BOOL): Test all preprocessors when
!HAVE_C_BOOL, not merely __SUNPRO_CC.  Use the slightly
more-elegant ‘!true’ instead of ‘true == 1’; this shouldn’t matter
in practice and if it does matter we want to know about it anyway.
Remove an unnecessary ‘#undef true’ that is simply commented out
by ‘configure’; again, if true is already #defined to be 0 the
system is so messed up we want to know about it anyway.

2 years agostdbool: Ensure that 'true' can be used in the preprocessor.
Bruno Haible [Sun, 18 Sep 2022 16:47:22 +0000 (18:47 +0200)]
stdbool: Ensure that 'true' can be used in the preprocessor.

* m4/c-bool.m4 (gl_C_BOOL): With Sun C++, redefine 'true' if it does not
evaluate to 1 in the preprocessor.

2 years agostdbool-c99: Ensure that 'true' can be used in the preprocessor.
Bruno Haible [Sun, 18 Sep 2022 16:45:39 +0000 (18:45 +0200)]
stdbool-c99: Ensure that 'true' can be used in the preprocessor.

* lib/stdbool.in.h (true): Redefine if it does not evaluate to 1 in the
preprocessor.

2 years agoautoupdate
Karl Berry [Sun, 18 Sep 2022 15:58:44 +0000 (08:58 -0700)]
autoupdate

2 years agouni{case,ctype,gbrk,str}/base: Fix installed .h file (regr. 2022-09-10).
Bruno Haible [Sun, 18 Sep 2022 13:33:09 +0000 (15:33 +0200)]
uni{case,ctype,gbrk,str}/base: Fix installed .h file (regr. 2022-09-10).

* lib/unicase.in.h: Do include <stdbool.h>.
* lib/unictype.in.h: Likewise.
* lib/unigbrk.in.h: Likewise.
* lib/unistr.in.h: Likewise.

2 years agosignal: Fix a C++ compilation error due to sched_yield on OpenBSD 6.0.
Bruno Haible [Sun, 18 Sep 2022 12:41:20 +0000 (14:41 +0200)]
signal: Fix a C++ compilation error due to sched_yield on OpenBSD 6.0.

* lib/signal.in.h: On OpenBSD, include <sys/param.h>. Don't include
<pthread.h> on OpenBSD ≥ 5.1.

2 years agoexplicit_bzero-tests: robustify a bit
Paul Eggert [Sun, 18 Sep 2022 02:59:26 +0000 (19:59 -0700)]
explicit_bzero-tests: robustify a bit

This is mostly to suppress GCC warnings, though I suppose it
might also improve the test.
* tests/test-explicit_bzero.c: Do not ignore -Wmaybe-uninitialized,
as this warning should no longer be generated given the other changes.
(test_heap): ASSERT that malloc succeeds, to suppress any GCC
warning about relying on malloc succeeding.  Declare addr to be
volatile, so that GCC does not deduce that it is heapbuf in
disguise and diagnose using it after freeing it.
(do_secret_stuff): Declare more things to be volatile, to avoid
optimizations that might disturb the stack and/or mess up the test
in other ways.  Pass last_stackbuf address as a parameter rather
than having last_stackbuf be static, to avoid GCC warning about
assigning address of a local to a static; all callers changed.

2 years agowchar: Fix compilation errors in C++ mode on Solaris 11.3.
Bruno Haible [Sun, 18 Sep 2022 01:05:21 +0000 (03:05 +0200)]
wchar: Fix compilation errors in C++ mode on Solaris 11.3.

* lib/wchar.in.h (wcsnlen, wcpcpy, wcpncpy, wcscasecmp, wcsncasecmp,
wcsdup): Force declaration in C++ mode on Solaris (which does not
declare these functions in the global namespace).

2 years agoswab: Fix compilation error with Sun C++ on Solaris 11.3.
Bruno Haible [Sun, 18 Sep 2022 00:32:13 +0000 (02:32 +0200)]
swab: Fix compilation error with Sun C++ on Solaris 11.3.

* lib/unistd.in.h (swab): For the C++ declaration, under Solaris 11 but
not under Solaris 10, test also __XOPEN_OR_POSIX.

2 years agotime C++ tests: Fix link error on CentOS 5.
Bruno Haible [Sat, 17 Sep 2022 19:31:53 +0000 (21:31 +0200)]
time C++ tests: Fix link error on CentOS 5.

* modules/time-c++-tests (Makefile.am): Link test-time-c++ against
$(LIB_CLOCK_GETTIME).

2 years agoautoupdate
Karl Berry [Fri, 16 Sep 2022 15:18:31 +0000 (08:18 -0700)]
autoupdate

2 years agotime: Fix compilation errors with clang/MSVC.
Bruno Haible [Wed, 14 Sep 2022 22:50:41 +0000 (00:50 +0200)]
time: Fix compilation errors with clang/MSVC.

* m4/time_h.m4 (gl_TIME_H): Test whether asctime_r and ctime_r are
declared.
* lib/time.in.h (asctime_r, ctime_r): Skip _GL_WARN_ON_USE invocations
when these functions are not declared.

2 years agoverify: Avoid syntax error due to static_assert with clang in C++ mode.
Bruno Haible [Wed, 14 Sep 2022 20:21:47 +0000 (22:21 +0200)]
verify: Avoid syntax error due to static_assert with clang in C++ mode.

* lib/verify.h (static_assert): Don't define in clang C++ 6 or newer.
* m4/assert_h.m4 (gl_ASSERT_H): If we don't need to define static_assert
with clang in C++ mode, don't include <assert.h>.

2 years agoassert-h: work around include confusion
Paul Eggert [Wed, 14 Sep 2022 18:44:19 +0000 (13:44 -0500)]
assert-h: work around include confusion

* m4/assert_h.m4 (gl_ASSERT_H): Arrange for <config.h> to not
include <assert.h> if assert is already defined.  This works
around bugs in packages that mistakenly include <config.h> after
including <assert.h> (typically due to double-inclusion of
<config.h>).  Found in coreutils, which I plan to fix.

2 years agostdbool: depend on C99
Paul Eggert [Wed, 14 Sep 2022 18:40:37 +0000 (13:40 -0500)]
stdbool: depend on C99

Record that stdbool depends on C99 these days.
This matters only for ancient compilers that need special
flags to support C99 features.
* modules/stdbool (Depends-on): Add c99.

2 years agoverify: Avoid syntax error due to static_assert with MSVC 14 in C++.
Bruno Haible [Wed, 14 Sep 2022 16:08:10 +0000 (18:08 +0200)]
verify: Avoid syntax error due to static_assert with MSVC 14 in C++.

* lib/verify.h (static_assert): For MSVC in C++ mode, use a definition
that supports both the two-arguments and the one-argument syntax.

2 years agoposix_spawn-* tests: Fix test failure on mingw when libtool is in use.
Bruno Haible [Wed, 14 Sep 2022 13:12:18 +0000 (15:12 +0200)]
posix_spawn-* tests: Fix test failure on mingw when libtool is in use.

* tests/test-posix_spawn-inherit0.c (CHILD_PROGRAM_FILENAME): Add the
EXEEXT suffix.
* tests/test-posix_spawn-inherit1.c (CHILD_PROGRAM_FILENAME): Likewise.
* tests/test-posix_spawn-open1.c (CHILD_PROGRAM_FILENAME): Likewise.
* tests/test-posix_spawn-open2.c (CHILD_PROGRAM_FILENAME): Likewise.

2 years agoverify: Avoid syntax error due to static_assert with MSVC 14.
Bruno Haible [Wed, 14 Sep 2022 11:35:14 +0000 (13:35 +0200)]
verify: Avoid syntax error due to static_assert with MSVC 14.

* lib/verify.h (_Static_assert): Pass only the first argument to
_GL_VERIFY.

2 years agoverify: treat GNU C++ 6 like recent C++
Paul Eggert [Wed, 14 Sep 2022 04:01:53 +0000 (23:01 -0500)]
verify: treat GNU C++ 6 like recent C++

* lib/verify.h (_GL_VERIFY):
* m4/assert_h.m4 (gl_ASSERT_H):
If we check __cpp_static_assert < 200410, also check __GNUG__ < 6,
for consistency with the previous change.

2 years agoverify: Avoid syntax error due to static_assert with GNU C++ 6.x.
Bruno Haible [Wed, 14 Sep 2022 01:04:10 +0000 (03:04 +0200)]
verify: Avoid syntax error due to static_assert with GNU C++ 6.x.

* lib/verify.h (static_assert): Don't define in GNU C++ 6 or newer.

2 years agoKeep ChangeLog entries order in sync with the git commit order.
Bruno Haible [Tue, 13 Sep 2022 23:17:54 +0000 (01:17 +0200)]
Keep ChangeLog entries order in sync with the git commit order.

2 years agostdalign: prefer to not include <stdalign.h>
Paul Eggert [Tue, 13 Sep 2022 22:29:36 +0000 (17:29 -0500)]
stdalign: prefer to not include <stdalign.h>

* lib/alignalloc.c, lib/argp-parse.c, lib/fts.c, lib/md4.c, lib/md5.c:
* lib/rawmemchr.c, lib/sha1.c, lib/sha256.c, lib/sha512.c, lib/sm3.c:
* lib/sys_socket.in.h:
In C23, <stdalign.h> is a no-op, so don’t include it.