same-inode.h and OpenVMS

2011-12-30 Thread Paul Eggert
On OpenVMS st_ino is an array of three ino_t values, so grep's a.st_ino == b.st_ino compares *pointers*, and yields 0. Ouch. For other GNU programs we often don't worry about OpenVMS, but grep is a special case, as it's actually used on OpenVMS and

Re: MS-Windows build of Grep [2/4]

2011-12-30 Thread Paul Eggert
On 12/30/11 07:43, Jim Meyering wrote: > Without useful stat.st_ino, there are some important tasks (e.g., dir > traversal) that simply cannot be performed safely/reliably. In general that's true, and on further thought I agree we should leave that part of grep's st_ino code alone. I proposed that

Re: [PATCH] canonicalize: add support for not resolving symlinks

2011-12-30 Thread Paul Eggert
On 12/30/11 08:36, Eric Blake wrote: > unless you can declare struct rpl_stat with the same layout > as struct stat, you have an API incompatibility that can cause > compilation errors in various circumstances. Ah, sorry, I was assuming that we '#define stat rpl_stat' before including the system

[PATCH] gitlog-to-changelog: don't malfunction when name contains %-directive

2011-12-30 Thread Jim Meyering
FYI, a minor bug fix: >From e15863f1ee27315eaa63e83ad2c17d832d64b951 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 30 Dec 2011 19:00:49 +0100 Subject: [PATCH] gitlog-to-changelog: don't malfunction when name contains %-directive * build-aux/gitlog-to-changelog (main): Don't let a %-dir

[PATCH] gitlog-to-changelog: Copyright-paperwork-exempt: yes == (tiny change)

2011-12-30 Thread Jim Meyering
I've decided to go ahead and make this change, in spite of the lack of policy anywhere else. I'll update --help with a note about this separately. Gary, it's based on the change from you and is still in your name, so I'll wait for an ACK before I push. Jim >From 9301160f1f63d1193402a4cecf17c33da

Re: [PATCH] canonicalize: add support for not resolving symlinks

2011-12-30 Thread Eric Blake
On 12/30/2011 09:10 AM, Paul Eggert wrote: > On 12/30/11 05:49, Eric Blake wrote: >> the gnulib replacement for stat on some platforms has to be a function-like >> macro (no thanks to 'struct stat') > > Why does the gnulib replacement do that? > If gnulib instead did "#define stat rpl_stat", > tha

Re: MS-Windows build of Grep [2/4]

2011-12-30 Thread Eli Zaretskii
> From: bastien ROUCARIES > Date: Fri, 30 Dec 2011 12:36:07 +0100 > Cc: bonz...@gnu.org, > bug-gnulib@gnu.org, > bug-g...@gnu.org > > > > In fact isatty under windows is equivalent to test if a file is a char > > > device. > > > > That is true. But unless a Windows user goes out of their way,

Re: [PATCH] canonicalize: add support for not resolving symlinks

2011-12-30 Thread Paul Eggert
On 12/30/11 05:49, Eric Blake wrote: > the gnulib replacement for stat on some platforms has to be a function-like > macro (no thanks to 'struct stat') Why does the gnulib replacement do that? If gnulib instead did "#define stat rpl_stat", that would rename 'struct stat' to 'struct rpl_stat', but

Re: [PATCH] canonicalize: add support for not resolving symlinks

2011-12-30 Thread Jim Meyering
Jim Meyering wrote: > Pádraig Brady wrote: >> On 12/30/2011 01:49 PM, Eric Blake wrote: >>> On 12/30/2011 04:04 AM, Jim Meyering wrote: > - if (lstat (rname, &st) != 0) > + if ((logical?stat:lstat) (rname, &st) != 0) Please add spaces around operators:

Re: [PATCH] canonicalize: add support for not resolving symlinks

2011-12-30 Thread Jim Meyering
Pádraig Brady wrote: > On 12/30/2011 02:43 PM, Pádraig Brady wrote: >> On 12/30/2011 01:49 PM, Eric Blake wrote: >>> On 12/30/2011 04:04 AM, Jim Meyering wrote: > - if (lstat (rname, &st) != 0) > + if ((logical?stat:lstat) (rname, &st) != 0) Please add spaces aro

Re: [PATCH] canonicalize: add support for not resolving symlinks

2011-12-30 Thread Pádraig Brady
On 12/30/2011 02:43 PM, Pádraig Brady wrote: > On 12/30/2011 01:49 PM, Eric Blake wrote: >> On 12/30/2011 04:04 AM, Jim Meyering wrote: - if (lstat (rname, &st) != 0) + if ((logical?stat:lstat) (rname, &st) != 0) >>> >>> Please add spaces around operators: >>> >>>

Re: [PATCH] canonicalize: add support for not resolving symlinks

2011-12-30 Thread Jim Meyering
Pádraig Brady wrote: > On 12/30/2011 01:49 PM, Eric Blake wrote: >> On 12/30/2011 04:04 AM, Jim Meyering wrote: - if (lstat (rname, &st) != 0) + if ((logical?stat:lstat) (rname, &st) != 0) >>> >>> Please add spaces around operators: >>> >>> if ((logical ? st

[PATCH] gitlog-to-changelog: remove a little duplication

2011-12-30 Thread Jim Meyering
FYI, >From 1a6249781ca11e2f16b04a6a1a5ddb9eee2c9ee7 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 30 Dec 2011 15:53:33 +0100 Subject: [PATCH] gitlog-to-changelog: remove a little duplication * build-aux/gitlog-to-changelog (main): Grep @lines once, rather than twice. --- ChangeLog

Re: [PATCH] canonicalize: add support for not resolving symlinks

2011-12-30 Thread Pádraig Brady
On 12/30/2011 01:49 PM, Eric Blake wrote: > On 12/30/2011 04:04 AM, Jim Meyering wrote: >>> - if (lstat (rname, &st) != 0) >>> + if ((logical?stat:lstat) (rname, &st) != 0) >> >> Please add spaces around operators: >> >> if ((logical ? stat : lstat) (rname, &st) != 0)

Re: [PATCH] canonicalize: add support for not resolving symlinks

2011-12-30 Thread Eric Blake
On 12/30/2011 04:04 AM, Jim Meyering wrote: >> - if (lstat (rname, &st) != 0) >> + if ((logical?stat:lstat) (rname, &st) != 0) > > Please add spaces around operators: > > if ((logical ? stat : lstat) (rname, &st) != 0) Better yet, don't write this as a function poi

gitlog-to-changelog: how to specify "tiny changes"?

2011-12-30 Thread Stefano Lattarini
Hello gnulibers. Currently, the `gitlog-to-changelog' script has no way of allowing the maintainer to specify that a changeset is "small" enough not to require copyright assignment to the FSF (in hand-maintained ChangeLogs, that is done with the usual "(tiny change)" addition after the author name

Re: [PATCH] canonicalize: add support for not resolving symlinks

2011-12-30 Thread Pádraig Brady
On 12/30/2011 11:04 AM, Jim Meyering wrote: > Pádraig Brady wrote: >> + >> +/* Modify the original (Not yet supported). */ >> +CAN_NOALLOC = 8 > > Would it be better to add it along with the > change that adds support? Yes probably. I'll add a comment on the possibility instead. Thanks

Re: MS-Windows build of Grep [2/4]

2011-12-30 Thread bastien ROUCARIES
Le Wednesday 28 December 2011 18:12:06, Eli Zaretskii a écrit : > > Date: Wed, 28 Dec 2011 17:06:05 +0100 > > From: Bastien ROUCARIES > > Cc: Eli Zaretskii , bug-gnulib , > > bug-g...@gnu.org > > > > Isatty is broken under windows but this not the right fix. > > What's wrong about it? If it fai

Re: [PATCH] canonicalize: add support for not resolving symlinks

2011-12-30 Thread Jim Meyering
Pádraig Brady wrote: > This is for use in a proposed coreutils `realpath` command. > Specifically by these options: > > -L, --logicalresolve `..' components before symlinks > -s, --strip don't expand symlinks ... Thanks. This looks good. Some nits: > Subject: