fclose: Fix test failure on AIX 7.2

2021-01-05 Thread Bruno Haible
On AIX 7.2, I see this test failure: FAIL: test-fclose = ../../gltests/test-fclose.c:74: assertion 'lseek (fd, 0, SEEK_CUR) == 3' failed FAIL test-fclose (exit status: 134) The cause is that while POSIX specify a certain behaviour regarding the position of the underlying file des

expm1f-ieee: Work around AIX 7.2 bug

2021-01-05 Thread Bruno Haible
On AIX 7.2 I see a test failure: FAIL: test-expm1f-ieee == ../../gltests/test-expm1-ieee.h:37: assertion '!!signbit (z) == !!signbit (MINUS_ZERO)' failed FAIL test-expm1f-ieee (exit status: 134) The cause is that expm1f (-0.0f) return +0.0f instead of -0.0f. This patch fixes

pipe-filter-gi: Fix test failure on AIX 7.2

2021-01-05 Thread Bruno Haible
On AIX 7.2, I see a test failure: FAIL: test-pipe-filter-gi1.sh = test-pipe-filter-gi1: write to tr subprocess failed: Resource temporarily unavailable FAIL test-pipe-filter-gi1.sh (exit status: 1) What happens is: While writing to a pipe, through a file descriptor i

utimens, utimensat, fdutimensat: Avoid test failures on AIX 7.2

2021-01-05 Thread Bruno Haible
On AIX 7.2, on a jfs2 file system, I observe test failures: FAIL: test-fdutimensat == ../../gltests/test-utimens.h:136: assertion '0 <= utimecmp (BASE "file", &st3, &st1, UTIMECMP_TRUNCATE_SOURCE)' failed FAIL test-fdutimensat (exit status: 134) FAIL: test-utimens ==

utimensat: Work around trailing slash bug in utimensat() on AIX 7.2

2021-01-05 Thread Bruno Haible
On AIX 7.2, I see these test failures: FAIL: test-utimens == ../../gltests/test-utimens.h:94: assertion 'func (BASE "file/", ts) == -1' failed FAIL test-utimens (exit status: 134) FAIL: test-utimensat ../../gltests/test-utimens.h:94: assertion 'func (BASE "

Re: [PATCH] * modules/filename, modules/idx (Maintainer): Add glibc.

2021-01-05 Thread Bruno Haible
> + * modules/filename, modules/idx (Maintainer): Add glibc. That's a good idea to note it here. Thanks. Otherwise we could easily forget about the need to collaborate with glibc on these modules. Bruno

Re: [PATCH] Merge glibc ieee128 ldbl redirect support into cdefs.h

2021-01-05 Thread Bruno Haible
Hi Paul, > I think I see a way to do that: include glibc only on > platforms where is not good enough for Gnulib. This is better than what we had yesterday; thanks. However, this is still making bets that undocumented internals of glibc won't change. Such bets bring big trouble onto the cons

ptsname_r, ptsname: Avoid test failures on AIX 7.2

2021-01-05 Thread Bruno Haible
This patch fixes test failures on AIX 7.1 and 7.2: FAIL: test-ptsname == FAIL test-ptsname (exit status: 142) FAIL: test-ptsname_r FAIL test-ptsname_r (exit status: 142) 2021-01-05 Bruno Haible ptsname_r, ptsname: Avoid test failures on AIX 7.2

Re: [PATCH] Merge glibc ieee128 ldbl redirect support into cdefs.h

2021-01-05 Thread Paul E Murphy
On 1/5/21 3:18 PM, Paul Eggert wrote: years. I installed the attached patch to try to do that. A good chunk of it is simple reindenting, and you can use "git diff -w" to narrow it down. -#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH +#if __LDOUBLE_REDIRECTS_TO_FLOA

[PATCH] * modules/filename, modules/idx (Maintainer): Add glibc.

2021-01-05 Thread Paul Eggert
--- ChangeLog| 1 + modules/filename | 2 +- modules/idx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3d4d5f260..e58f9ff9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -41,6 +41,7 @@ * config/srclist.txt: filename.h, idx.h, sc

Re: [PATCH] Merge glibc ieee128 ldbl redirect support into cdefs.h

2021-01-05 Thread Paul Eggert
On 1/4/21 7:28 PM, Bruno Haible wrote: Yes, there is the potential for redefinition warnings here. If they occur, we should consider where in the compilation unit to include standard headers like and where to include . And maybe add a header which undefines all of ? I'm hoping we don't need

Re: syntax-checks with names containing the letter w not invoked

2021-01-05 Thread Jim Meyering
On Mon, Jan 4, 2021 at 2:44 PM Jim Meyering wrote: > > On Mon, Jan 4, 2021 at 2:22 PM Simon Josefsson via Gnulib discussion > list wrote: > > Hi. I noticed that 'make syntax-check' never ran syntax checks whose > > name contained 'w' on my local machine, but did so on CICD builds. I > > tracked

[PATCH] maint: note syncs to glibc

2021-01-05 Thread Paul Eggert
* config/srclist.txt: filename.h, idx.h, scratch_buffer.h and scratch_buffer_dupfree.c are now identical to glibc. Add commentary about some other syncs we’d like. --- ChangeLog | 7 +++ config/srclist.txt | 8 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/

[PATCH 8/8] posix: Remove all alloca usage in glob

2021-01-05 Thread Adhemerval Zanella
With alloca usage removal from glob this patch wraps it up by removing all the alloca defines and macros usage. Checked on x86_64-linux-gnu. --- posix/glob.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/posix/glob.c b/posix/glob.c index b6727ee884..

[PATCH 4/8] posix: Remove alloca usage on glob dirname

2021-01-05 Thread Adhemerval Zanella
This patch replaces the alloca/malloc usage for dirname creation by the char_array struct. Checked on x86_64-linux-gnu. --- posix/glob.c | 28 +--- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/posix/glob.c b/posix/glob.c index 41e1aeacad..d734ca977c 10064

[PATCH 5/8] posix: Use dynarray for globname in glob

2021-01-05 Thread Adhemerval Zanella
This patch uses dynarray at glob internal glob_in_dir function to manage the various matched patterns. It simplify and removes all the boilerplate buffer managements required. It also removes the glob_use_alloca, since it is not used anymore. Checked on x86_64-linux-gnu. --- posix/glob.c | 126

[PATCH 2/8] posix: Use char_array for internal glob dirname

2021-01-05 Thread Adhemerval Zanella
This is the first patch of the set to remove alloca usage on glob implementation. Internal path to search for file might expand to a non static directory derived from pattern for some difference cases (GLOB_NOESCAPE, GNU GLOB_TILDE) and to allow a non-static dirname path glob uses a lot of boilerp

[PATCH 3/8] posix: Remove alloca usage for GLOB_BRACE on glob

2021-01-05 Thread Adhemerval Zanella
GNU GLOB_BRACE internal implementation constructs a new expression and calls glob recursively. It then requires a possible large temporary buffer place the new pattern. This patch removes the alloca/malloc usage and replaces it with char_array. Checked on x86_64-linux-gnu. --- posix/glob.c | 53

[PATCH 7/8] posix: Use char_array for home_dir in glob

2021-01-05 Thread Adhemerval Zanella
This patch uses dynarray at glob internal home directory ame manipulation for GLOB_TILDE. It simplifies it and removes all the boilerplate buffer managements required. Checked x86_64-linux-gnu. --- posix/glob.c | 69 1 file changed, 42 inserti

[PATCH 1/8] malloc: Add specialized dynarray for C strings

2021-01-05 Thread Adhemerval Zanella
This patch adds an specialized dynarray to manage C strings using the dynarray internal implementation. It uses some private fields from dynarray and thus it provided specific files to access and manage the internal string buffer. For instance: struct char_array str; // str == "testing

[PATCH 6/8] posix: Remove alloca usage on glob user_name

2021-01-05 Thread Adhemerval Zanella
This patch uses dynarray at glob internal user name manipulation for GLOB_TILDE. It simplifies it and removes all the boilerplate buffer managements required. It also removes the glob_use_alloca, since it is not used anymore. Checked on x86_64-linux-gnu. --- posix/glob.c | 86 --

[PATCH 0/8] Remove alloca usage from glob

2021-01-05 Thread Adhemerval Zanella
This is a respin on an old patchset [1] which is no longer on patchwork. The main change is just a rebase against master since glibc version is now on sync with gnulib. I am sending it also to gnulib to get feedback from the project, specifically for the part not specific for the system support by

Re: [PATCH 1/2] posix: User scratch_buffer on fnmatch

2021-01-05 Thread Adhemerval Zanella
On 04/01/2021 17:35, Florian Weimer wrote: > * Adhemerval Zanella via Libc-alpha: > >> It removes the alloca usage on the string convertion to wide characters >> before calling the internal function. > > We have a downstream-only patch to fall back the single byte handling in > case of multiby