sethostname tests: Avoid test failure on Cygwin

2021-01-19 Thread Bruno Haible
On Cygwin 2.9, I see this test failure: FAIL: test-sethostname2 === error setting valid hostname. FAIL test-sethostname2.exe (exit status: 1) This patch fixes it. Now the test reports Skipping test: insufficient permissions. 2021-01-20 Bruno Haible

ptsname_r on Cygwin

2021-01-19 Thread Bruno Haible
Hi Ken, On Cygwin 2.9 (64-bit) I see a test failure in test-ptsname_r.c, here: { char buffer[256]; int result; result = ptsname_r (-1, buffer, sizeof buffer); ASSERT (result != 0); // < HERE ASSERT (result == EBADF || result == ENOTTY); } While

Re: [PATCH 1/5] posix: Sync regex code with gnulib

2021-01-19 Thread Paul Eggert
On 1/19/21 7:43 AM, Bruno Haible wrote: Adhemerval Zanella wrote: -# if (__GNUC__ >= 7) || (__clang_major__ >= 10) +# if (__GNUC__ >= 7) || (defined __clang_major__ &&__clang_major__ >= 10) I would write it as: +# if (__GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10) This line

Re: Portability issues with scractch_buffer

2021-01-19 Thread Paul Eggert
On 1/19/21 10:22 AM, Akim Demaille wrote: Clang 3.3 and 3.4 cannot compile the new scratch-buffer module. On Bison's CI (Clang 3.4: https://api.travis-ci.org/v3/job/755133481/log.txt), there is: ... CC lib/lib_libbison_a-canonicalize.o In file included from ../lib/canonicalize.c:31:

Portability issues with scractch_buffer

2021-01-19 Thread Akim Demaille
Hi all, Clang 3.3 and 3.4 cannot compile the new scratch-buffer module. On Bison's CI (Clang 3.4: https://api.travis-ci.org/v3/job/755133481/log.txt), there is: > make[2]: Entering directory `/home/travis/build/bison-3.7.4.285-a7d1a/_build' > CC lib/lib_libbison_a-bitsetv.o > CC

Re: [PATCH 1/7] spawn: Use special invocation for on OS/2 kLIBC

2021-01-19 Thread Bruno Haible
Hi KO, Thanks, I applied patches 1, 2, 3, 5, 6, 7, slightly modified. Some of the things that you put into the git commit message actually better belong in the code, as a comment. Bruno

Re: [PATCH 5/7] zerosize-ptr: Fix compilation on OS/2 kLIBC

2021-01-19 Thread Bruno Haible
Applied with modifications: > -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT > +#if HAVE_SYS_MMAN_H && HAVE_MPROTECT && (!defined __KLIBC__ || HAVE_MMAP) There's a comment two lines above, that explains why HAVE_MMAP is not the right test here. And since you write "OS/2 kLIBC has and mprotect() but not

Re: [PATCH 4/7] stdlib: putenv() needs a cast on OS/2 kLIBC

2021-01-19 Thread Bruno Haible
Hi KO, > On OS/2 kLIBC, the first parameter of putenv () is `const char *string' > not `char *string'. Can't you fix that in OS/2 kLIBC? Then a workaround in Gnulib would not be needed. Bruno

Re: [PATCH 1/5] posix: Sync regex code with gnulib

2021-01-19 Thread Adhemerval Zanella
On 19/01/2021 14:16, Florian Weimer wrote: > * Adhemerval Zanella: > >> On 19/01/2021 13:52, Florian Weimer wrote: >>> * Adhemerval Zanella via Libc-alpha: >>> Paul, this seemed to a common pattern scatter on multiple file in gnulib. Wouldn't be better to consolidate it on cdefs.h?

Re: [PATCH 1/5] posix: Sync regex code with gnulib

2021-01-19 Thread Florian Weimer
* Adhemerval Zanella: > On 19/01/2021 13:52, Florian Weimer wrote: >> * Adhemerval Zanella via Libc-alpha: >> >>> Paul, this seemed to a common pattern scatter on multiple file in gnulib. >>> Wouldn't be better to consolidate it on cdefs.h? >> >> gnulib shouldn't be using cdefs.h on glibc

Re: [PATCH 1/5] posix: Sync regex code with gnulib

2021-01-19 Thread Adhemerval Zanella
On 19/01/2021 13:52, Florian Weimer wrote: > * Adhemerval Zanella via Libc-alpha: > >> Paul, this seemed to a common pattern scatter on multiple file in gnulib. >> Wouldn't be better to consolidate it on cdefs.h? > > gnulib shouldn't be using cdefs.h on glibc systems, so I think a > separate

Re: [PATCH 1/5] posix: Sync regex code with gnulib

2021-01-19 Thread Florian Weimer
* Adhemerval Zanella via Libc-alpha: > Paul, this seemed to a common pattern scatter on multiple file in gnulib. > Wouldn't be better to consolidate it on cdefs.h? gnulib shouldn't be using cdefs.h on glibc systems, so I think a separate header would be needed. Thanks, Florian -- Red Hat GmbH,

Re: [PATCH 1/5] posix: Sync regex code with gnulib

2021-01-19 Thread Bruno Haible
Adhemerval Zanella wrote: > -# if (__GNUC__ >= 7) || (__clang_major__ >= 10) > +# if (__GNUC__ >= 7) || (defined __clang_major__ &&__clang_major__ >= 10) I would write it as: +# if (__GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10) because 'defined __clang__' is the widely known

Re: [PATCH 1/5] posix: Sync regex code with gnulib

2021-01-19 Thread Vaseeharan Vinayagamoorthy
After this commit [1], I am seeing -Werror=undef when bootstapping glibc on aarch64-none-linux-gnu : In file included from regex.c:70:0: regex_internal.h:852:26: error: "__clang_major__" is not defined [-Werror=undef] # if (__GNUC__ >= 7) || (__clang_major__ >= 10)

Re: [PATCH 1/5] posix: Sync regex code with gnulib

2021-01-19 Thread Adhemerval Zanella
On 19/01/2021 11:16, Vaseeharan Vinayagamoorthy wrote: > After this commit [1], I am seeing -Werror=undef when bootstapping glibc on > aarch64-none-linux-gnu : > > In file included from regex.c:70:0: > regex_internal.h:852:26: error: "__clang_major__" is not defined > [-Werror=undef] > #