Re: NetBSD dup3

2024-05-19 Thread Collin Funk
Hi Bruno, On 5/18/24 5:03 PM, Bruno Haible wrote: > And it's a good idea to reference the bug report in a comment: > @c https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=58266 > So that in the future it helps us to understand what the bug is > about and how to reproduce it in newer versio

getusershell: Split file by lines instead of spaces.

2024-05-19 Thread Collin Funk
On 5/19/24 7:48 PM, Collin Funk wrote: > It looks like the current code wants drive-prefixes accepted, i.e. > 'c:/ugly/windows/stuff'. > > That sort of breaks the behavior of glibc and BSD where: > > input -> getusershell () output > 'bin/bash' -> '/bash' > > Since it seems silly to ac

Re: [PATCH] getusershell: Work around musl bugs.

2024-05-19 Thread Collin Funk
On 5/19/24 7:17 PM, Bruno Haible wrote: > You don't need an Alpine Linux machine to debug this. You can debug it > on a glibc system like this: > 1. create a testdir for the module getusershell, > 2. configure through >ac_cv_func_getusershell=no ./configure > 3. use the unit test, or

Re: [PATCH] getusershell: Work around musl bugs.

2024-05-19 Thread Bruno Haible
Collin Funk wrote: > Sadly, it looks like this uncovered that the gnulib version is buggy > too. You don't need an Alpine Linux machine to debug this. You can debug it on a glibc system like this: 1. create a testdir for the module getusershell, 2. configure through ac_cv_func_getusersh

Re: [PATCH] getusershell: Work around musl bugs.

2024-05-19 Thread Collin Funk
Hi Bruno, On 5/19/24 5:03 PM, Bruno Haible wrote: > Perfect. Thanks a lot! Sadly, it looks like this uncovered that the gnulib version is buggy too. Given this etc/shells: # valid login shells /bin/sh # abc /bin/ash # 123 /bin/bash # def ===

Re: [PATCH] getusershell: Work around musl bugs.

2024-05-19 Thread Bruno Haible
Collin Funk wrote: > + getusershell: Work around musl bugs. > + Reported by Bruno Haible in > + . > + * doc/glibc-functions/getusershell.texi: Mention the musl bug. > + * lib/unistd.in.h (getusershell, setusers

[PATCH] getusershell: Work around musl bugs.

2024-05-19 Thread Collin Funk
Reported by Bruno Haible in . * doc/glibc-functions/getusershell.texi: Mention the musl bug. * lib/unistd.in.h (getusershell, setusershell, endusershell): Allow the functions to be declared with the rpl_ prefix. * m4/getusershell

Re: [PATCH] sha512-buffer: port back to 32-bit-only hosts

2024-05-19 Thread Paul Eggert
On 2024-05-19 14:37, Bruno Haible wrote: uintN_t arithmetic is overflow-free, just like 'unsigned int' arithmetic. Not exactly. For example, this: uint16_t a = 46341, b = a * a; has undefined behavior on typical platforms with 32-bit int, because 46341*46341 exceeds 2**31 - 1. Although man

Re: [PATCH] sha512-buffer: port back to 32-bit-only hosts

2024-05-19 Thread Bruno Haible
Hi Paul, > > Out of personal interest, do you happen to know what platforms Emacs > > builds on that lack 64-bit types? > > Emacs is a bit of a special case as it builds on verrry ooold platforms, > including platforms no longer supported by their suppliers, and we're > reasonably reluctant to

Re: [PATCH] sha512-buffer: port back to 32-bit-only hosts

2024-05-19 Thread Paul Eggert
On 2024-05-18 20:42, Collin Funk wrote: Out of personal interest, do you happen to know what platforms Emacs builds on that lack 64-bit types? Emacs is a bit of a special case as it builds on verrry ooold platforms, including platforms no longer supported by their suppliers, and we're reasona

abort-debug: Prefer libbacktrace to execinfo

2024-05-19 Thread Bruno Haible
The stack traces that I get on the CI machines are not always useful, in particular because no line number information is included. With this patch, the abort-debug module uses the libbacktrace instead of the execinfo facility. The output (on a Debian-based system) before: ../../gltests/test-floo

mkfifoat: Work around a macOS 14 bug

2024-05-19 Thread Bruno Haible
While the GCC compilefarm gives us access to a macOS 12 machine, GitHub actions give us access to all of macOS 11, 12, 13, 14. A continuous integration that I have set up [1] lists a test failure of test-mkfifoat on macOS 13 and 14. With the combination of the 'abort-debug' and the CONTINUE_AFTER_

Re: NetBSD utimens, utimensat, etc. failures

2024-05-19 Thread Collin Funk
On 5/19/24 2:29 AM, Collin Funk wrote: > With that those two test cases seem to fail for the same reason as the > others: > > $ ./gltests/test-fdutimensat > test-utimens.h:149: assertion 'ctime_compare (&st3, &st2) < 0' failed > $ ./gltests/test-utimensat > test-utimens.h:149:

Re: getusershell, configure tests vs. explicit platform lists

2024-05-19 Thread Bruno Haible
Collin Funk wrote: > I still think that the Musl behavior is unexpected enough that it > warrants overriding though. OK. > I don't see a way to check the behavior of getusershell () in > configure checks though. Typically /etc/shells can only be written by > root and a administrator can change it

NetBSD utimens, utimensat, etc. failures

2024-05-19 Thread Collin Funk
Hi Bruno, On your NetBSD test failures you had these: > FAIL: test-fdutimensat > == > > ../../gltests/test-utimens.h:75: assertion 'func (BASE "file", ts) == -1' > failed > FAIL test-fdutimensat (exit status: 134) > > FAIL: test-futimens > === > > ../../gltest

Re: [PATCH] sha512-buffer: port back to 32-bit-only hosts

2024-05-19 Thread Bruno Haible
Collin Funk wrote: > Out of personal interest, do you happen to know what platforms Emacs > builds on that lack 64-bit types? This would have been my question as well. Because we are assuming the presence of 'long long' since 2019-12-22 [1], and 'long long' is 64-bits wide everywhere. I thought th

Re: dup3: Update documentation and expected test results.

2024-05-19 Thread Bruno Haible
Hi Collin, > Added documentation and removed the xfail stuff in the attached patch. Nice! Thanks. One less failure. > Now that gnulib-tool.py is working, outside of a > few minor bugs (e.g. gl_DOC_BASE issue in gnulib-tool.py.TODO), I can > help investigate bugs and make improvements elsewhere t