Re: Integer overflows in memchr

2024-06-30 Thread Po Lu
Paul Eggert writes: > Autoconf's existing AC_FUNC_STRNLEN uses AC_RUN_IFELSE so this > wouldn't work as-is. > > Perhaps you could write up a patch against Autoconf? That wouldn't > count against the Gnulib quota Sure, but Gnulib (and by extension Emacs) does not invoke the Autoconf test: A

Re: doc: Remove references to POSIX 202x.

2024-06-30 Thread Bruno Haible
Hi Collin, > I removed the remaining references of "POSIX 202x" and made sure the > commentary was still accurate to POSIX 2024. Thanks! > I'm not sure when the removed functions should be moved to > doc/pastposix-functions/ . Maybe when the HTML pages are released? Yes. We need the list of rem

doc: Remove references to POSIX 202x.

2024-06-30 Thread Collin Funk
I removed the remaining references of "POSIX 202x" and made sure the commentary was still accurate to POSIX 2024. I'm not sure when the removed functions should be moved to doc/pastposix-functions/ . Maybe when the HTML pages are released? Collin >From 0ba13435a9362bec0ff5fd0830907b9fac723e41 Mo

Re: Integer overflows in memchr

2024-06-30 Thread Paul Eggert
On 6/30/24 13:18, Po Lu wrote: How many lines remain of my 15-line quota of contributions to Gnulib? I wouldn't worry about the quota; we can solve that problem later as need be. #if defined __ANDROID_API__ && (__ANDROID_API__ < 21) you lose #endif /* defined __ANDROID_API__ && (__ANDROID

some *printf* tests tweaks

2024-06-30 Thread Bruno Haible
Two cosmetic patches for the existing *printf* tests: 2024-06-30 Bruno Haible *printf* tests: Remove unused includes. * tests/test-fprintf-gnu.c: Don't include . * tests/test-fprintf-posix.c: Likewise. * tests/test-szprintf-gnu.c: Likewise. * tests/test

new *fzprintf* modules

2024-06-30 Thread Bruno Haible
This patch series implements new modules fprintf -> vfzprintf fzprintf -> vasnprintf printf -> vzprintf zprintf -> vfzprintf vfprintf -> vfzprintf vfzprintf -> vasnprintf vprintf -> vzprintf vzprintf -> vfzprintf and the -posix and -gnu variants that go with

new *dzprintf* modules

2024-06-30 Thread Bruno Haible
This patch series implements new modules dprintf -> vdzprintf dzprintf -> vasnprintf vdprintf -> vdzprintf vdzprintf -> vasnprintf and the -posix and -gnu variants that go with them. 2024-06-30 Bruno Haible dzprintf-gnu: Add tests. * tests/test-dprintf-gnu.

*printf-tests: Correct test file descriptions

2024-06-30 Thread Bruno Haible
Some .h files are used by multiple tests. Reflect the functions tested in the title line. 2024-06-30 Bruno Haible *printf-tests: Correct test file descriptions. * tests/test-fprintf-gnu.h: Fix title line. * tests/test-fprintf-posix.h: Likewise. * tests/test-pri

*printf-posix-tests: Strengthen tests

2024-06-30 Thread Bruno Haible
Since 2023-03-22, Gnulib implements the %b directive in the *printf-posix modules. This patch updates some unit tests to also test the %b directive. 2024-06-30 Bruno Haible *printf-posix-tests: Strengthen tests. * tests/test-fprintf-posix.h (test_function): Test %b directive.

*printf-{posix,gnu}: Tweak module descriptions

2024-06-30 Thread Bruno Haible
Strictly speaking, the Gnulib *printf-posix and *printf-gnu modules are not POSIX compliant any more, since they don't implement the %n directive any more, since 2024-02-21. 2024-06-30 Bruno Haible *printf-{posix,gnu}: Tweak module descriptions. * modules/c-snzprintf-gnu (Desc

Re: Integer overflows in memchr

2024-06-30 Thread Po Lu
Paul Eggert writes: > Please feel free to write that. It's not something that would be easy > for me to do, as I don't know Android. Also, I don't know that it'd be > that trivial, as it might involve replacing the AC_FUNC_STRNLEN macro > of Autoconf (and we should propagate that fix into Autocon

Re: Integer overflows in memchr

2024-06-30 Thread Paul Eggert
On 6/30/24 12:14, Po Lu wrote: I think there should be a trivial test for a functional strnlen in strnlen.m4 Please feel free to write that. It's not something that would be easy for me to do, as I don't know Android. Also, I don't know that it'd be that trivial, as it might involve replacing

Re: Integer overflows in memchr

2024-06-30 Thread Po Lu
Paul Eggert writes: > On 6/27/24 01:55, Po Lu wrote: >> Google continue to support SDKs from 19 onwards in the standard support >> library: >> >> https://android-developers.googleblog.com/2023/10/androidx-minsdkversion-19.html >> which is the real threshold at which official support ends. > >

Re: Integer overflows in memchr

2024-06-30 Thread Po Lu
Paul Eggert writes: > On 6/27/24 02:37, Po Lu wrote: > >> Btw, doesn't this also mean that lib/strnlen.c (in Emacs, at least) is >> incorrect? > > Thanks for pointing that out. I installed the attached into Gnulib and > propagated it into Emacs master. Although I don't know of any > practical, su

Re: Integer overflows in memchr

2024-06-30 Thread Paul Eggert
On 6/27/24 01:55, Po Lu wrote: Google continue to support SDKs from 19 onwards in the standard support library: https://android-developers.googleblog.com/2023/10/androidx-minsdkversion-19.html which is the real threshold at which official support ends. Thanks, I don't know all the ins and

Re: Integer overflows in memchr

2024-06-30 Thread Paul Eggert
On 6/27/24 02:37, Po Lu wrote: Btw, doesn't this also mean that lib/strnlen.c (in Emacs, at least) is incorrect? Thanks for pointing that out. I installed the attached into Gnulib and propagated it into Emacs master. Although I don't know of any practical, supported platform where this matte