Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug

2020-12-31 Thread Bruno Haible
Tom G. Christensen wrote: > FWIW lib/utime.c now fails to build on Solaris < 10 because of > 0003-stat-failing-with-EOVERFLOW-implies-existence.patch > (340dcbd879d050aebcd7081ec5f2208f0e2418b6) > > gcc -std=gnu11 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\"

Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug

2020-12-31 Thread Tom G. Christensen
tat-failing-with-EOVERFLOW-implies-existence.patch (340dcbd879d050aebcd7081ec5f2208f0e2418b6) gcc -std=gnu11 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC -DEXEEXT=\"\" -I. -I.. -DGNULIB_STRICT_CHECKING=1 -I/usr/tgcware/include -D_REENTRANT -fvisibility=h

Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug

2020-12-24 Thread Paul Eggert
ectory, false (setting errno) otherwise. + DIREND points to the NUL byte at the end of the DIR string. + Store garbage into DIREND[0] and DIREND[1]. */ + +static bool +dir_check (char *dir, char *dirend) +{ + /* Append "/"; otherwise EOVERFLOW would be ambiguous. */ + strcpy (dir

Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug

2020-12-18 Thread Paul Eggert
On 12/18/20 6:13 AM, Adhemerval Zanella wrote: The same tests I pointed out on BZ#24970 comment #2 still fails with gnulib version 0aa8ef424. I am not sure if it would be better to adapt my original patchset to use scratch_buffer (which seems originally a better idea) or if we can work towards f

Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug

2020-12-18 Thread Adhemerval Zanella
On 18/12/2020 09:30, Adhemerval Zanella wrote: > > > On 17/12/2020 07:55, Paul Eggert wrote: >> On 12/11/20 5:03 AM, Adhemerval Zanella wrote: >> >>> I have sent a similar fix to reviews for this very issue for glibc >>> (which is based on the canonicalize-lgpl) along with other fixes that >>>

Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug

2020-12-18 Thread Adhemerval Zanella
On 17/12/2020 07:55, Paul Eggert wrote: > On 12/11/20 5:03 AM, Adhemerval Zanella wrote: > >> I have sent a similar fix to reviews for this very issue for glibc >> (which is based on the canonicalize-lgpl) along with other fixes that >> you might take a look at [1]. > > Thanks, I looked at tha

Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug

2020-12-17 Thread Paul Eggert
On 12/11/20 5:03 AM, Adhemerval Zanella wrote: I have sent a similar fix to reviews for this very issue for glibc (which is based on the canonicalize-lgpl) along with other fixes that you might take a look at [1]. Thanks, I looked at that when composing the patches I just now installed into G

Re: [PATCH 2/6] canonicalize: fix EOVERFLOW bug

2020-12-17 Thread Paul Eggert
1; - extra_buf = xrealloc (extra_buf, extra_len); + if (!scratch_buffer_grow_preserve (&extra_buffer)) + xalloc_die (); + extra_buf = extra_buffer.data; } + if (end_in_extra_buffer) +end = e

Re: [PATCH 2/6] canonicalize: fix EOVERFLOW bug

2020-12-14 Thread Bruno Haible
Paul Eggert wrote: > > This patch introduced a unit test regression on AIX 7.2 > > ../../gltests/test-canonicalize.c:112: assertion 'result1 == NULL' failed > > FAIL test-canonicalize (exit status: 134) > ... > I installed the attached patches to work around these issues, along with > other st

Re: [PATCH 2/6] canonicalize: fix EOVERFLOW bug

2020-12-13 Thread Paul Eggert
doc/posix-functions/readlinkat.texi: ERANGE problem is mostly fixed now. Mention AIX problem with trailing / and EINVAL. Lessen differences between these two files. * lib/readlink.c (rpl_readlink): * lib/readlinkat.c (rpl_readlinkat): If stat ("FILE/", ...) reports EOVERFLOW, treat FILE/

Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug

2020-12-11 Thread Adhemerval Zanella
On 02/12/2020 19:39, Paul Eggert wrote: > * lib/canonicalize-lgpl.c: Do not include . > (__realpath): Do not use lstat. Just use readlink, as this > suffices and it avoids the EOVERFLOW problem that lstat has. > * modules/canonicalize-lgpl (Depends-on): Remove lstat, sys_stat. I

Re: [PATCH 2/6] canonicalize: fix EOVERFLOW bug

2020-12-11 Thread Bruno Haible
Hi Paul, > 2020-12-02 Paul Eggert > > + canonicalize: fix EOVERFLOW bug > + * lib/canonicalize.c (canonicalize_filename_mode): > + When testing whether a directory entry is a symbolic link, or a > + directory or other, do not use lstat or stat or > +

[PATCH 4/6] canonicalize: fix most of another EOVERFLOW issue

2020-12-02 Thread Paul Eggert
* lib/canonicalize.c (canonicalize_filename_mode): Do not call stat if fewer than 20 symlinks have been traversed. This avoids EOVERFLOW failure in the common case where there are not that many symlinks, while continuing to catch loops (or fail due to EOVERFLOW) in the unusual case when there are

[PATCH 2/6] canonicalize: fix EOVERFLOW bug

2020-12-02 Thread Paul Eggert
* lib/canonicalize.c (canonicalize_filename_mode): When testing whether a directory entry is a symbolic link, or a directory or other, do not use lstat or stat or areadlink_with_size. Just use areadlink, as this suffices and it avoids the EOVERFLOW problem that lstat and stat have. * modules

[PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug

2020-12-02 Thread Paul Eggert
* lib/canonicalize-lgpl.c: Do not include . (__realpath): Do not use lstat. Just use readlink, as this suffices and it avoids the EOVERFLOW problem that lstat has. * modules/canonicalize-lgpl (Depends-on): Remove lstat, sys_stat. --- ChangeLog | 8 +++ lib/canonicalize

Re: [PATCH] Don't interpret EOVERFLOW to mean nonexistence

2017-07-30 Thread Paul Eggert
Thanks, fixed with the attached. >From b2a1529ee656ed12c0420b6293c8f284821403ba Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 30 Jul 2017 15:38:56 -0700 Subject: [PATCH] canonicalize: fix EOVERFLOW commentary Problem reported by Bruno Haible in: http://lists.gnu.org/archive/html/

Re: [PATCH] Don't interpret EOVERFLOW to mean nonexistence

2017-07-30 Thread Bruno Haible
Hi Paul, > --- a/lib/canonicalize-lgpl.c > +++ b/lib/canonicalize-lgpl.c > @@ -270,6 +270,8 @@ __realpath (const char *name, char *resolved) > #endif >*dest = '\0'; > > + /* FIXME: if lstat fails with errno == EOVERFILE, Spelling: This shoul

[PATCH] Don't interpret EOVERFLOW to mean nonexistence

2017-07-30 Thread Paul Eggert
* lib/fts.c (fts_stat): If lstat fails, report its errno, which may be EOVERFLOW; this is likely more useful than reporting the stat errno. * lib/glob.c (link_stat): Rename from link_exists2_p and return -1/0 instead of 0/1. Caller changed. * lib/glob.c (link_exists_p): * lib/renameat2.c

Re: Remove module 'EOVERFLOW'

2008-09-26 Thread Bruno Haible
Addendum to this patch: 2008-09-26 Bruno Haible <[EMAIL PROTECTED]> * doc/posix-headers/errno.texi: Remove mention of module 'EOVERFLOW'. --- doc/posix-headers/errno.texi.orig 2008-09-26 20:08:01.0 +0200 +++ doc/posix-headers/errno.texi2008-09-26 20

Remove module 'EOVERFLOW'

2008-09-13 Thread Bruno Haible
Now, with the module 'errno' providing all POSIX errno values, the module 'EOVERFLOW' is obsolete. I'm removing it: 2008-09-13 Bruno Haible <[EMAIL PROTECTED]> * modules/EOVERFLOW: Remove file. * m4/eoverflow.m4: Remove file. * modul

Re: EOVERFLOW

2008-03-30 Thread Bruno Haible
Jim Meyering wrote: > > Jim, is it ok to do the same for the 'getugroups' module? > > Sure. Applied: * lib/getugroups.c (EOVERFLOW): Remove fallback. * modules/getugroups (Depends-on): Add EOVERFLOW. *** lib/getugroups.c.orig 2008-03-30 15:55:05.0

Re: EOVERFLOW

2008-03-30 Thread Bruno Haible
Eric Blake wrote: > I saw your new EOVERFLOW module - but you missed adding m4/eoverflow.m4. Huh? I don't understand what you mean. I tested the module on OSF/1 and mingw. What did I miss? Bruno

Re: EOVERFLOW

2008-03-30 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > Eric Blake wrote: >> Hmm - should we provide a gnulib that guarantees all of the >> standard errors, rather than doing an ad-hoc definition of EOVERFLOW and >> others in every place where they are used? > > We already ha

Re: EOVERFLOW

2008-03-30 Thread Bruno Haible
Eric Blake wrote: > Hmm - should we provide a gnulib that guarantees all of the > standard errors, rather than doing an ad-hoc definition of EOVERFLOW and > others in every place where they are used? We already have an EOVERFLOW replacement macro in m4/eoverflow.m4. It would be better