This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: coreutils-6.11-1 in release-2 area


On May 22 14:18, Corinna Vinschen wrote:
> > Hmm.  There's some history here.  futimesat was the original proposal,
> > then Posix 200x changed their minds and decided to standardize utimensat
> > instead.  Gnulib implemented a version prior to glibc, then glibc picked
> > up the prototype that Posix was proposing which conflicted with gnulib (if
> > I recall correctly, it was the addition of a flag parameter).
> >
> > Meanwhile, it IS a bit annoying that Posix 200x decided not to standardize
> > utimensat(fd,NULL,times,flag) as changing the times on fd rather than
> > treating fd as the directory starting point; once you have an open fd,
> > having to refer to the file by name again is potentially racy.
> 
> No need to refer the dir by name:
> 
>   futimens (dirfd. timespec);

Btw., even if you don't consider the Posix 200x functions
futimens/utimensat, you don't need futimsat(dirfd, NULL, timeval):

    futimes (dirfd, timeval);

So, actually I think that using futimesat this way is a gratuitous
utilization of a glibc extension.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]