Behavior of stat() changed from NT to Win2000/XP

Peter Davis pfd@pfdstudio.com
Mon May 26 14:12:00 GMT 2003


On Windows NT, the Cygwin stat function returns a non-zero value in
the st_size field when called on a directory.  However, in Windows
2000 and Windows XP, this same function returns 0 for st_size for a
directory.  This change in behavior has broken some features of mutt,
and possible other programs as well.

Attached is a very simple program called stat, that just calls the
stat() function and displays the results.  It's called like this:

       stat PATH

If PATH is a file, stat always seems to return valid values in
st_size.  However, if PATH is a directory, stat returns a valid size
on NT, but 0 on 2000 and XP.

Is there some Cygwin setting or configuration option that controls
this? 

Thanks,

-pd


-- 
--------
                             Peter Davis
               Funny stuff at http://www.pfdstudio.com
    List of resources for children's writers and illustrators at:
                  http://www.pfdstudio.com/cwrl.html

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list