gnulib-tool.py: Simplify joining paths.

2024-06-14 Thread Collin Funk
I never really looked at the joinpath() function so I just realized it essentially does os.path.normpath(os.path.join(...)) unlike what it's doc string says. I have applied this patch removing it and preferring os.path.join() which should help make things more clear IMO. The os.path.normpath() isn

Re: [PATCH 1/9] getpagesize: improve doc

2024-06-14 Thread Paul Eggert
On 2024-06-14 16:51, Bruno Haible wrote: getpagesize.texi:45: warning: accent command `@,' must not be followed by new line Thanks, fixed. I thought I had run 'makeinfo' but evidently I missed the warning.

Re: cppi

2024-06-14 Thread Paul Eggert
On 2024-06-14 15:45, Bruno Haible wrote: I propose to remove '.cppi-disable'. Sounds good to me. I don't use cppi.

doc: Update for glibc 2.35

2024-06-14 Thread Bruno Haible
This patch adds Gnulib documentation for the functions that were added in glibc 2.35. Many of them are specified in ISO C 23, which is why I add them under doc/posix-functions/. 2024-06-14 Bruno Haible doc: Update for glibc 2.35. * doc/glibc-functions/_dl_find_object.texi: New

Re: doc: More updates for glibc 2.34

2024-06-14 Thread Bruno Haible
> 2024-06-14 Bruno Haible > > doc: More updates for glibc 2.34. And some more. It's unlikely that we will ever have to deal with these functions. Just for completeness. 2024-06-14 Bruno Haible doc: More updates for glibc 2.34. * doc/glibc-functions/ns_name_compress.

doc: More updates for glibc 2.34

2024-06-14 Thread Bruno Haible
In the doc updates for glibc 2.34, I missed the added function 'close_range'. It exists in glibc ≥ 2.34, FreeBSD ≥ 13.0, Cygwin ≥ 3.5.0, Android API level ≥ 34. 2024-06-14 Bruno Haible doc: More updates for glibc 2.34. * doc/glibc-functions/close_range.texi: New file.

Re: [PATCH 1/9] getpagesize: improve doc

2024-06-14 Thread Bruno Haible
Paul Eggert wrote: > +On typical platforms this function's API limits page sizes to at most 1 GiB@, This produces a warning (with makeinfo version 6.8): getpagesize.texi:45: warning: accent command `@,' must not be followed by new line Bruno

Re: cppi

2024-06-14 Thread Bruno Haible
Paul Eggert did: > * lib/.cppi-disable: Remove getpagesize.h. This file had not been touched for more than 16 years. When I run $ cd lib $ cppi -c *.h *.c it emits 23812 diagnostics. So, clearly, 'cppi' does not reflect the indentation habits that we are using for many years. I propose to re

Re: [PATCH 0/9] getpagesize simplifications etc.

2024-06-14 Thread Paul Eggert
On 6/14/24 13:46, Collin Funk wrote: Isn't sysconf not available on Windows? Yes, it's not. But the sysconf uses in question should be protected by #ifdef and so not compiled on MS-Windows, so it shouldn't be a problem. Maybe implementing _SC_PAGESIZE and some other simple ones would work

[PATCH] xsize: port to SIZE_MAX <= INT_MAX

2024-06-14 Thread Paul Eggert
* lib/xsize.h (xsum): Port to oddball platforms where SIZE_MAX <= INT_MAX. Although no such platform is a current Gnulib porting problems, it’s easy enough to port to them. --- ChangeLog | 5 + lib/xsize.h | 18 ++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --g

Re: [PATCH 0/9] getpagesize simplifications etc.

2024-06-14 Thread Collin Funk
On 6/14/24 1:19 PM, Paul Eggert wrote: > I noticed when looking into something else that we can simplify > some getpagesize-using code by removing some dependencies > and using sysconf (_SC_PAGESIZE) where that might be safer. > While I was at it, I updated the getpagesize doc and > fixed what seem

[PATCH 4/9] memchr,strncat: prefer sysconf (_SC_PAGESIZE)

2024-06-14 Thread Paul Eggert
* m4/memchr.m4 (gl_FUNC_MEMCHR): * m4/strncat.m4 (gl_FUNC_STRNCAT): Use sysconf (_SC_PAGESIZE) instead of getpagesize, as it’s in POSIX and there’s no point to worrying about getpagesize performance advantages here. --- ChangeLog | 7 +++ m4/memchr.m4 | 4 ++-- m4/strncat.m4 | 4 ++-- 3 f

[PATCH 8/9] sigsegv-tests: port to plain POSIX

2024-06-14 Thread Paul Eggert
* tests/test-sigsegv-catch-segv1.c, tests/test-sigsegv-catch-segv2.c: (SIGSEGV_FAULT_ADDRESS_ROUNDOFF_BITS): Use sysconf (_SC_PAGESIZE) instead of getpagesize, as this code is compiled only on platforms that have _SC_PAGESIZE and POSIX prefers the latter. --- ChangeLog| 11

[PATCH 7/9] free-posix-tests: port to plain POSIX

2024-06-14 Thread Paul Eggert
* tests/test-free.c (main): Use sysconf (_SC_PAGESIZE) instead of getpagesize, as this code is compiled only on platforms that have _SC_PAGESIZE and POSIX prefers the latter. --- ChangeLog | 5 + tests/test-free.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Ch

[PATCH 6/9] maint: avoid some test getpagesize dependencies

2024-06-14 Thread Paul Eggert
* modules/memcasecmp-tests, modules/memchr-tests: * modules/memchr2-tests, modules/memcmp-tests: * modules/memmem-tests, modules/memrchr-tests: * modules/rawmemchr-tests, modules/strncat-tests: * modules/strnlen-tests, modules/strstr-tests: * modules/unistr/u16-chr-tests, modules/unistr/u16-cmp-tes

[PATCH 9/9] ssfmalloc-tests: simplify by using sysconf

2024-06-14 Thread Paul Eggert
* tests/test-ssfmalloc.c (getpagesize) [__hpux]: Remove decl. (init_pagesize): Use sysconf instead of getpagesize. --- ChangeLog | 4 tests/test-ssfmalloc.c | 13 ++--- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8dcf7133a9

[PATCH 1/9] getpagesize: improve doc

2024-06-14 Thread Paul Eggert
* doc/glibc-functions/getpagesize.texi: Mention portability problems not fixed by Gnulib. --- ChangeLog| 6 ++ doc/glibc-functions/getpagesize.texi | 13 + 2 files changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index f44aab79f6..9d06cc7ea

[PATCH 0/9] getpagesize simplifications etc.

2024-06-14 Thread Paul Eggert
I noticed when looking into something else that we can simplify some getpagesize-using code by removing some dependencies and using sysconf (_SC_PAGESIZE) where that might be safer. While I was at it, I updated the getpagesize doc and fixed what seems to be an obvious porting bug (pointers do not a

[PATCH 2/9] getpagesize: remove outdated ref

2024-06-14 Thread Paul Eggert
* lib/.cppi-disable: Remove getpagesize.h. --- ChangeLog | 3 +++ lib/.cppi-disable | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9d06cc7eac..7b94a3ef80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2024-06-14 Paul Eggert +

[PATCH 3/9] getcwd: simplify abort bug checking

2024-06-14 Thread Paul Eggert
* m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Don’t invoke gl_CHECK_FUNC_GETPAGESIZE or #define or use HAVE_GETPAGESIZE. Protect ‘bug_possible’ with ‘defined _SC_PAGESIZE’ instead. That’s good enough as the buggy platforms all define _SC_PAGESIZE. * modules/getcwd (Files): Remove m4/getpages

[PATCH 5/9] mprotect: don’t assume pointers fit in long

2024-06-14 Thread Paul Eggert
* m4/mprotect.m4 (gl_FUNC_MPROTECT_WORKS): Don’t assume pointers fit into unsigned long, as this is not true on CheriBSD. Prefer sysconf (_SC_PAGESIZE) to getpagesize. --- ChangeLog | 5 + m4/mprotect.m4 | 24 ++-- 2 files changed, 15 insertions(+), 14 deletions(-)

vasnprintf: Reject a width > INT_MAX

2024-06-14 Thread Bruno Haible
I'm still working on allowing *printf results of size > 2 GiB. One of the issues here is what to do when a width > INT_MAX is specified directly in the format string, for example "%030d". ISO C § 7.23.6.1 only says that this should be a "nonnegative decimal integer", but doesn't give a li

Re: upstream of various programs

2024-06-14 Thread Bruno Haible
Hi Collin, > The following file is mentioned in "Information for maintainers of GNU > software": > > announce-gen [1] > > The following files are mentioned "GNU coding standards" [2]: > > gitlog-to-changelog [2] > vcs-to-changelog.py [2] > > It reads like they are maintained by Gnu

Re: upstream of various programs

2024-06-14 Thread Bruno Haible
I wrote: > config.libpath --help -> Bruno > config.rpath --help-> Bruno > declared.sh --help -> Bruno > install-reloc --help -> Bruno > libtool-next-version --help-> Bruno > libtool-reloc --help -> Bruno > reloc-ldflags --help