This is the mail archive of the cygwin@cygwin.com 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]

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


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/


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