Re: I: coreutils-20041123: src/touch.c regression

2005-01-04 Thread Paul Eggert
Jim Meyering [EMAIL PROTECTED] writes: The only other question is whether EROFS is always defined. This code now contains the first use of that symbol in coreutils. I checked a few packages and found that the uses in binutils and cvs are both protected with #if directives. But rsync and

Re: I: coreutils-20041123: src/touch.c regression

2005-01-03 Thread Paul Eggert
Dmitry V. Levin [EMAIL PROTECTED] writes: Your change (at 2004-11-23) to src/touch.c introduces regression: On GNU/Linux without futimes syscall and without /proc mounted, futimes() function from glibc returns ENOENT, futimens() from gnulib also returns ENOENT, and touch utility fails. I

Re: I: coreutils-20041123: src/touch.c regression

2005-01-03 Thread Dmitry V. Levin
Hi, On Mon, Jan 03, 2005 at 12:53:58AM -0800, Paul Eggert wrote: Your change (at 2004-11-23) to src/touch.c introduces regression: On GNU/Linux without futimes syscall and without /proc mounted, futimes() function from glibc returns ENOENT, futimens() from gnulib also returns ENOENT, and

Re: I: coreutils-20041123: src/touch.c regression

2005-01-03 Thread Jim Meyering
Dmitry V. Levin [EMAIL PROTECTED] wrote: ... According to documentation, futimes() may also fail with ENOSYS; in this case, falling back on utimes() also looks reasonable: + if (errno != ENOENT) + if (errno != ENOSYS errno != ENOENT) Thanks. I've made that change.

Re: I: coreutils-20041123: src/touch.c regression

2005-01-03 Thread Paul Eggert
Jim Meyering [EMAIL PROTECTED] writes: Dmitry V. Levin [EMAIL PROTECTED] wrote: + if (errno != ENOSYS errno != ENOENT) Thanks. I've made that change. On further thought, this looks like a classic example where we should be testing for known valid error numbers rather than adding bogus

Re: I: coreutils-20041123: src/touch.c regression

2005-01-03 Thread Jim Meyering
Paul Eggert [EMAIL PROTECTED] wrote: Jim Meyering [EMAIL PROTECTED] writes: Dmitry V. Levin [EMAIL PROTECTED] wrote: + if (errno != ENOSYS errno != ENOENT) Thanks. I've made that change. On further thought, this looks like a classic example where we should be testing for known

Re: I: coreutils-20041123: src/touch.c regression

2005-01-03 Thread Paul Eggert
Jim Meyering [EMAIL PROTECTED] writes: Your switch statement should probably handle EBADF, too, to avoid an unnecessary utimes call after such a failure. EBADF shouldn't happen as it violates the futimens documentation, which says FD must be either negative -- in which case it is ignored -- or