xstrtol-error: Improve comments

2023-01-11 Thread Bruno Haible
The description of the function xstrtol_fatal mentions parameters ERR, LONG_OPTION, OPT_IDX, etc. But the function's declaration lacks the parameter names. So, in order to understand a comment in the .h file, one needs to look into the declaration in the .c file. Weird! This patch fixes it. 2023

spawn-pipe tests: Fix test failure on Android

2023-01-11 Thread Bruno Haible
On Android 11, I'm seeing this test failure: FAIL: test-spawn-pipe.sh ../../gltests/test-spawn-pipe-child.c:134: assertion '! is_open (STDERR_FILENO)' failed test-spawn-pipe.sh: iteration 4 failed ../../gltests/test-spawn-pipe-child.c:134: assertion '! is_open (STDERR_F

perror: Fix "perror clobbers strerror's buffer" problem on Android

2023-01-11 Thread Bruno Haible
In a testdir on Android 11, I see this test failure: FAIL: test-perror2 == ../../gltests/test-perror2.c:82: assertion 'STREQ (msg4, str4)' failed Aborted FAIL test-perror2 (exit status: 134) When I print the values of msg4 and str4, I get: msg4="Unknown error -5" str4="Unknown er

posix_spawn_file_actions_addfchdir tests: Fix test failure on Android

2023-01-11 Thread Bruno Haible
On Android 11 with Termux, I see this test failure: FAIL: test-posix_spawn-fchdir = cannot open directory: Permission denied FAIL test-posix_spawn-fchdir (exit status: 1) The reason is that the "/" directory cannot be opened. But other directories, like "/proc" or "/m

rename, renameat, renameatu: Fix test failures on Android/Termux

2023-01-11 Thread Bruno Haible
Similar tests failures are seen on Android 11 with Termux: FAIL: test-rename = link: Permission denied FAIL test-rename (exit status: 1) FAIL: test-renameat === link: Permission denied ../../gltests/test-rename.h:80: assertion 'mkdir (BASE "dir", 0700) == 0' fail

link, linkat tests: Fix test failures on Android/Termux

2023-01-11 Thread Bruno Haible
On Android 11, within the Termux app, these tests fail: FAIL: test-link === link: Permission denied FAIL test-link (exit status: 1) FAIL: test-linkat = link: Permission denied ../../gltests/test-link.h:32: assertion '0 <= fd' failed Aborted FAIL test-linkat (exit sta

Re: Fix link errors on Android 4.3

2023-01-11 Thread Bruno Haible
> 2023-01-11 Bruno Haible > > Fix link errors on Android 4.3. > * lib/asyncsafe-spin.c: Don't use the GCC >= 4.1 builtins on Android. > * lib/pthread-spin.c: Likewise. > * lib/simple-atomic.c: Likewise. Actually there's no problem when building with clang, because clang

Re: [PATCH] better explain functions [q]set-acl.c

2023-01-11 Thread Bruno Haible
Ondrej Valousek wrote: > +/* Set the access control lists of a file to match EXACTLY mode (this might In function comments, by convention we refer to parameters by uppercasing their name. So, this line should probably better read /* Set the access control lists of a file to match *exactly* MOD

Fix link errors on Android 4.3

2023-01-11 Thread Bruno Haible
Building a testdir on Android 4.3, I see these link errors: terminal-gcc -mandroid -D__ANDROID__ -std=gnu99 -Wno-error -O2 -L/data/data/com.spartacusrex.spartacuside/files/local/lib -o test-asyncsafe-spin1 test-asyncsafe-spin1.o libtests.a ../gllib/libgnu.a libtests.a ../gllib/libgnu.a libtes

RE: [PATCH] Use xattr (Linux) in qcopy-acl.c

2023-01-11 Thread Ondrej Valousek
Hi Bruno/Paul, Are we going to commit the proposed changes there or is there still anything missing? I am asking because I'd like to file a RFE for redhat coreutils improvement and this change depends on it. Thanks, Ondrej -Original Message- From: Paul Eggert Sent: čtvrtek 5. ledna 2