delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/26/09:58:21

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 26 May 2003 09:58:11 -0400
From: Peter Davis <pfd AT pfdstudio DOT com>
To: cygwin AT cygwin DOT com
Subject: Behavior of stat() changed from NT to Win2000/XP
Message-ID: <20030526135811.GK4032@bitstream.com>
Mime-Version: 1.0
User-Agent: Mutt/1.4i

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019