Re: port freadahead.c & fseeko.c

2020-12-28 Thread Bruno Haible
Ron Eggler wrote: > I have downloaded, extracted & copied the new directory (m4-2020-12-26/) Yes, this tarball works fine. Unlike the m4-1.4.17 one. Bruno

havelib: Fix for Solaris 11 OpenIndiana and Solaris 11 OmniOS

2020-12-28 Thread Bruno Haible
The ELF class detection of shared libraries is not working on Solaris 11 OpenIndiana and Solaris 11 OmniOS, leading to executables linked without rpath. The cause is that on these platforms, the 'od' program prints decimal values of bytes as 3-digit integers, padded with zeroes, instead of padded

Re: port freadahead.c & fseeko.c

2020-12-28 Thread Ron Eggler
On 2020-12-28 2:08 p.m., Bruno Haible wrote: Ron Eggler wrote: On 2020-12-23 4:17 p.m., Paul Eggert wrote: On 12/23/20 1:56 PM, Ron Eggler wrote: How can I patch these files to work with my platform? Look in your stdio.h (commonly /usr/include/stdio.h), and the files it includes, to see how

gnulib-tool: Fix logic whether to add a dummy.c

2020-12-28 Thread Bruno Haible
A testdir created through ./gnulib-tool --create-testdir --dir=... --single-configure unistr/u8-uctomb libunistring-optional fails to build on Solaris 11 OpenIndiana when a libunistring is already installed, because the gltests/Makefile references a gllib/libgnu.a which has not been built: The

Re: port freadahead.c & fseeko.c

2020-12-28 Thread Bruno Haible
Ron Eggler wrote: > On 2020-12-23 4:17 p.m., Paul Eggert wrote: > > On 12/23/20 1:56 PM, Ron Eggler wrote: > >> How can I patch these files to work with my platform? > > > > Look in your stdio.h (commonly /usr/include/stdio.h), and the files it > > includes, to see how it defines ungetc etc. Then

Re: [PATCH v2 6/6] stdlib: Assume FACCESSAT_NEVER_EOVERFLOWS on realpath

2020-12-28 Thread Adhemerval Zanella
On 28/12/2020 18:14, Paul Eggert wrote: > On 12/28/20 5:59 AM, Adhemerval Zanella wrote: >> The faccessat (..., AT_EACCESS) on Linux fallback will either use >> __NR_faccessat for __libc_enable_secure or LFS  fstatat call.  Neither >> fallbacks returns EOVERFLOW in failure case. > Argh, I had mi

Re: port freadahead.c & fseeko.c

2020-12-28 Thread Ron Eggler
On 2020-12-23 4:17 p.m., Paul Eggert wrote: On 12/23/20 1:56 PM, Ron Eggler wrote: How can I patch these files to work with my platform? Look in your stdio.h (commonly /usr/include/stdio.h), and the files it includes, to see how it defines ungetc etc. Then use that knowledge to update lib/f

Re: [PATCH v2 6/6] stdlib: Assume FACCESSAT_NEVER_EOVERFLOWS on realpath

2020-12-28 Thread Paul Eggert
On 12/28/20 5:59 AM, Adhemerval Zanella wrote: The faccessat (..., AT_EACCESS) on Linux fallback will either use __NR_faccessat for __libc_enable_secure or LFS fstatat call. Neither fallbacks returns EOVERFLOW in failure case. Argh, I had misread the glibc source code in this area. So I install

Re: [PATCH v2 4/6] stdlib: Sync canonicalize with gnulib [BZ #10635] [BZ #26592] [BZ #26341] [BZ #24970]

2020-12-28 Thread Paul Eggert
On 12/28/20 5:59 AM, Adhemerval Zanella wrote: It sync with gnulib version bbaba6ce5 with the following difference require fix a glibc build: --- stdlib/canonicalize.c +++ lib/canonicalize-lgpl.c @@ -52,7 +52,6 @@ # endif # define GCC_LINT 1 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pu

Re: [PATCH 5/5] stdlib: Remove lstat usage from realpath [BZ #24970]

2020-12-28 Thread Paul Eggert
On 12/28/20 3:42 AM, Adhemerval Zanella wrote: On 24/12/2020 21:27, Paul Eggert wrote: Also, shouldn't we merge the already-existing Gnulib scratch_buffer changes into glibc, along with this new change? Which changes are you referring? Checking against bbaba6ce5 I see all glibc files for s

Re: port freadahead.c & fseeko.c

2020-12-28 Thread Paul Eggert
On 12/28/20 9:39 AM, Ron Eggler wrote: I cannot find any function that is called "rpl_fseeko" Presumably an earlier "#define fseeko rpl_fseeko" means that when you see a definition of the fseeko function, it's really defining rpl_fseeko.

Re: port freadahead.c & fseeko.c

2020-12-28 Thread Ron Eggler
Paul, Mind, I'm I am cross compiling So I cd-ed to: /home/ron/novax-prs/tmp/work/x86_64-linux/m4-native/1.4.17-r0/build/lib/ and opened: ../../m4-1.4.17/lib/fseeko.c but funny enough, I cannot find any function that is called "rpl_fseeko" even though the error states: | make[3]: Entering dire

[PATCH v2 6/6] stdlib: Assume FACCESSAT_NEVER_EOVERFLOWS on realpath

2020-12-28 Thread Adhemerval Zanella
The faccessat (..., AT_EACCESS) on Linux fallback will either use __NR_faccessat for __libc_enable_secure or LFS fstatat call. Neither fallbacks returns EOVERFLOW in failure case. Checked on x86_64-linux-gnu. --- stdlib/canonicalize.c | 12 ++-- 1 file changed, 2 insertions(+), 10 delet

[PATCH v2 5/6] stdlibc: Simplify realpath via scratch_buffer_dupfree

2020-12-28 Thread Adhemerval Zanella
From: Paul Eggert Checked on x86_64-linux-gnu. --- stdlib/canonicalize.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c index 24a027b83f..69f978da78 100644 --- a/stdlib/canonicalize.c +++ b/stdlib/canonicali

[PATCH v2 4/6] stdlib: Sync canonicalize with gnulib [BZ #10635] [BZ #26592] [BZ #26341] [BZ #24970]

2020-12-28 Thread Adhemerval Zanella
It sync with gnulib version bbaba6ce5 with the following difference require fix a glibc build: --- stdlib/canonicalize.c +++ lib/canonicalize-lgpl.c @@ -52,7 +52,6 @@ # endif # define GCC_LINT 1 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# define FUNC_REALPATH_WORKS 1 #else # def

[PATCH v2 2/6] Import filename.h from gnulib

2020-12-28 Thread Adhemerval Zanella
And use to simplify stdlib/canonicalize.c implementation. --- include/filename.h | 110 + 1 file changed, 110 insertions(+) create mode 100644 include/filename.h diff --git a/include/filename.h b/include/filename.h new file mode 100644 index 00

[PATCH v2 3/6] malloc: Add scratch_buffer_dupfree

2020-12-28 Thread Adhemerval Zanella
It returns a copy of the buffer up to a defined size. It will be used on realpath sync with gnulib. --- include/scratch_buffer.h| 16 + malloc/Makefile | 1 + malloc/Versions | 1 + malloc/scratch_buffer_dupfree.c | 41

[PATCH v2 1/6] Import idx.h from gnulib

2020-12-28 Thread Adhemerval Zanella
Changes from previous version: - Change idx.h comment to LGPLv2.1+. -- And use to simplify stdlib/canonicalize.c implementation. --- include/idx.h | 114 ++ 1 file changed, 114 insertions(+) create mode 100644 include/idx.h diff --git a/includ

Re: [PATCH 5/5] stdlib: Remove lstat usage from realpath [BZ #24970]

2020-12-28 Thread Adhemerval Zanella
On 28/12/2020 08:42, Adhemerval Zanella wrote: >>>   static idx_t >>> +readlink_scratch_buffer (const char *path, struct scratch_buffer *buf) >>> +{ >>> +  ssize_t r; >>> +  while (true) >>> +    { >>> +  ptrdiff_t bufsize = buf->length; >>> +  r = __readlink (path, buf->data, bufsize -

Re: [PATCH 1/5] warnings in canonicalize.c

2020-12-28 Thread Bruno Haible
Paul Eggert wrote: > On 12/24/20 4:44 PM, Bruno Haible wrote: > > Indeed, I don't see warnings in canonicalize-lgpl.c. But there are warnings > > in gnulib's canonicalize.c: > > Thanks, I fixed those Thanks. I'm not seeing these warnings any more. > Even though I didn't get these > warnings wit

Re: [PATCH 1/5] stdlib: Sync canonicalize with gnulib [BZ #10635] [BZ #26592] [BZ #26241]

2020-12-28 Thread Adhemerval Zanella
On 24/12/2020 19:45, Paul Eggert wrote: > On 12/24/20 7:16 AM, Adhemerval Zanella wrote: >> It sync with gnulib version d9c121346 with the following difference >> require fix a glibc build: > > As I mentioned today on bug-gnulib I installed some changes into Gnulib which > are related, and it'

Re: [PATCH 5/5] stdlib: Remove lstat usage from realpath [BZ #24970]

2020-12-28 Thread Adhemerval Zanella
On 24/12/2020 21:27, Paul Eggert wrote: > This email finishes the review of this proposed glibc patchset. (I didn't > look at patch 4/5 for test cases.) > > On 12/24/20 7:17 AM, Adhemerval Zanella wrote: > >> +/* Check if BUFFER is using the internal buffer.  */ >> +static __always_inline boo