bug#18932: string->number errors on e.g. "1e400xyz"

2024-08-09 Thread Bug reports for GUILE, GNU's Ubiquitous Extension Language
still happens on the latest guile. trying to (write) a symbol that starts with large scientific notation also causes this problem. (write (string->symbol "1e400xyz"))

bug#72547: [PATCH 5/9] tests: Skip mkdtemp test for invalid template on Darwin.

2024-08-09 Thread Tomas Volf
Darwin accepts any template, as demonstrated here: #include #include int main(void) { char template[] = {'T', '-', 'A', 'A', 'A', 'A', 'A', 'A', '\0'}; char *res = mkdtemp(template); puts(res ? res : "(null)"); perror("mkdtemp"); } Output

bug#72547: [PATCH 4/9] filesys.c: Fix readlink for ports on Darwin.

2024-08-09 Thread Tomas Volf
When passed a port, `readlink' relies on the Linux specific behavior of empty c_path meaning "the fd itself". That does not work on Darwin. Since there is no branch that would yield both fd and c_path, fallback to freadlink when __APPLE__ is defined. * libguile/filesys.c (do_readlink): Call fread

bug#72547: [PATCH 8/9] Do not depend on tmpnam in posix.test.

2024-08-09 Thread Tomas Volf
`tmpnam' is a deprecated procedure that can be excluded during a configure (`--disable-tmpnam'). There currently was a single test relying on it, and therefore failing is such configuration. This commit switches to mkstemp instead. * test-suite/tests/posix.test ("system*"): Use mkstemp instead o

bug#72547: [PATCH 9/9] posix.c: Set errno when pipe2 is not available and flags provided.

2024-08-09 Thread Tomas Volf
If pipe2 is not available (e.g. on MacOS) and flags are set, SCM_SYSERROR was correctly signaled, however errno was not set, so it reported as: Undefined error: 0 That sucks both in tests (the test is not skipped) and in actual usage (user has no idea what went wrong). So set errno to ENOSYS

bug#72547: [PATCH 7/9] tests: Fix spawn if file not found with Gnulib.

2024-08-09 Thread Tomas Volf
On Darwin posix_spawnp is not considered secured and therefore we fallback to Gnulib's version. That one however does not return ENOENT when the file does not exist, but PID of the child process. This seems to be allowed by the standard. * test-suite/tests/posix.test (skip-on-darwin): New proced

bug#72547: [PATCH 1/9] tests: Check TCP_NODELAY for non-zero instead of 1.

2024-08-09 Thread Tomas Volf
POSIX does not explicitly say that stored value using setsockopt will be returned by getsockopt. At least for TCP_NODELAY on Darwin they do differ. Darwin returns internal define TF_NODELAY (4) instead of 1 the test expected. Since for boolean flags "non-zero is true", rewrite the test to check

bug#72547: [PATCH 6/9] tests: Fix spawn with #:environment on MacOS.

2024-08-09 Thread Tomas Volf
MacOS adds __CF_USER_TEXT_ENCODING to every program, in similar way GNU Hurd prepends LD_ORIGIN_PATH (based on the comment). So extend the logic to do similar stripping on MacOS. * test-suite/tests/posix.test ("spawn") ["env with #:environment and #:output"]: Strip trailing __CF_USER_TEXT_ENCODIN

bug#72547: [PATCH 3/9] tests: Skip hole-related port tests on Darwin.

2024-08-09 Thread Tomas Volf
Hole are itself a file-system specific feature and they are not mandated. While APFS does support sparse files, they do not behave like on Linux. I did not discover exact rules, but the file needs to be large (100s of kB at least) and the holes are not aligned as the test code expects. So just d

bug#72547: [PATCH 2/9] tests: Skip tests of abstract Unix sockets on Darwin.

2024-08-09 Thread Tomas Volf
Darwin does not support abstract Unix sockets, so mark the tests as skipped. * test-suite/tests/00-socket.test (skip-on-darwin): New procedure. ("bind abstract", "listen abstract", "connect abstract") ("accept abstract"): Skip on Darwin. --- test-suite/tests/00-socket.test | 8 1 file ch

bug#72547: [PATCH 0/9] Make test suite pass on macOS.

2024-08-09 Thread Tomas Volf
In my new work I sadly got a MacBook Pro. I obviously want to use Guile on it, however while trying to package it, I discovered that the test suite is not passing. This series remedies that. Most of the fixes are just in tests, but two are actual bug fixes. With this series applied, 3.0.10 test