emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file-attributes returns wrong info on Windows


From: Eli Zaretskii
Subject: Re: file-attributes returns wrong info on Windows
Date: Mon, 17 Jul 2006 21:18:08 +0300

> From: Chris Britton <address@hidden>
> Date: Mon, 17 Jul 2006 00:47:24 -0500
> Cc: address@hidden
> 
>  > How do you know which one of these is wrong?  What does DIR say about
>  > that file's times?
> 
> ls (both cygwin and mingw) and Windows XP properties dialog report
> that the last modification time on the example file is "March 28, 2006
> 2:25:39 AM".  This is in the U.S. Central timezone which is "March 28,
> 2006 7:25:39 AM" UTC, or 1143530739 Unix time.

Please invoke "ls -l --full-time", and tell what it tells.  You can
see the other two times with full fractional digits if you use the
"--time=WHAT" option.

(I'm curious whether the fractions of the second cause one of the two
Emacs versions to round the time stamp, whereas the other chops.)

>  > > I get the same result whether I build under MinGW or Cygwin.
>  > 
>  > ??? Do you really mean Cygwin?  That one uses an entirely different
>  > implementation of the file I/O functions (such as `stat') invoked by
>  > file-attributes.
> 
> I'm always suspicious of my cygwin build because I have to use
> mingw-make instead of cygwin's make and the mixing of the two may not
> be giving me what I expect.

The flavor of Make has nothing to do with the flavor of the resulting
binary.  What matters is the compiler and the libraries used to
compile and link the binary.

In any case, if you used nt/configure.bat to configure and nt/makefile
to build, then both your builds are MinGW builds.

> It would be interesting if someone could repeat my experiment by
> calling file-attributes on the same file from both emacs 21 and 22,
> and reporting if both versions return identical time values.

Such a comparison is meaningless, AFAIK: CVS clients don't in general
preserve the time stamps; what you get is the time when the file was
updated from CVS in that particular sandbox .  So different people
will see different, albeit close, times.  For example, on my system, I
have 2 copies of that file in 2 different directories, for which
"ls -l --full-time" reports this:

  -rw-rw-rw-  1 Zaretzky 0 5171 2006-03-28 12:22:14.387000000 +0200 
d:/gnu/emacs/README

  -rw-rw-rw-  1 Zaretzky 0 5171 2006-04-12 16:15:51.000000000 +0300 
d:/gnu/test/emacs/README

On top of that, the time-zone calculations on Windows are not very
reliable, depending on the port of `ls' that you have and how your
Windows is set up wrt time zones.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]