This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Bug#202243: glibc utimes glitch with coreutils 'touch'
At 18 Aug 2003 00:07:28 -0700,
Paul Eggert wrote:
> GOTO Masanori <gotom@debian.or.jp> writes:
>
> > So I patched Jakub's modification for 2.3.2-3, ok?
>
> If you installed the patch in
> <http://sources.redhat.com/ml/libc-alpha/2003-08/msg00062.html>
> then you should be OK, but if it's some other patch then I'd like to
> know what it was.
My previous mention is insufficient. It's not your patch, Jakub's
2003-07-31 modification, rouding one (the current debian glibc 2.3.2
is based on Mid of July). Because I found the below sentence in
SuSv3. It says it may be rounding (or am I missing?):
48734 DESCRIPTION
48735 The utimes( ) function shall set the access and modification times of the file pointed to by the path
48736 argument to the value of the times argument. The utimes( ) function allows time specifications
48737 accurate to the microsecond.
48738 For utimes( ), the times argument is an array of timeval structures. The first array member
48739 represents the date and time of last access, and the second member represents the date and time
48740 of last modification. The times in the timeval structure are measured in seconds and
48741 microseconds since the Epoch, although rounding toward the nearest second may occur.
your reffered "Historically, utimes truncated when it couldn't store
the microseconds" is BSD's original implementation? Yes, the latest
FreeBSD cvs says:
tv[0].tv_sec = times->actime;
tv[1].tv_sec = times->modtime;
tv[0].tv_usec = tv[1].tv_usec = 0;
Regards,
-- gotom