delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/06/26/09:14:10

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: David Kastrup <dak AT gnu DOT org>
Subject: Re: Problem with stat
Date: Tue, 26 Jun 2007 15:10:38 +0200
Lines: 23
Message-ID: <86zm2mdfox.fsf@lola.quinscape.zz>
References: <46808EA8 DOT 2030202 AT pacific DOT net DOT sg> <4680DD73 DOT 8090300 AT sh DOT cvut DOT cz> <4680E3A0 DOT 3020508 AT pacific DOT net DOT sg> <4680FE40 DOT 7010102 AT byu DOT net> <46810D24 DOT 9000303 AT pacific DOT net DOT sg> <46810FAA DOT 5050508 AT byu DOT net>
Mime-Version: 1.0
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

Eric Blake <ebb9 AT byu DOT net> writes:

> According to Erich Dollansky on 6/26/2007 6:57 AM:
>>    if (stat ("/usr/X11R6/share/doc/lesstif-0.94.4/html/Lessdox", &Stat)
>> == 0)
>>    {
>>       printf ("Mode: %lX\n", (unsigned long) Stat.st_mode);
>>       if (S_ISDIR (Stat.st_mode))
>>          printf ("Directory flag is set.\n");
>> 
>> The result is the same as before.
>
>
>> I do not get the message 'Link flag is set.'
>
> And that is correct behavior.  It is a bug if you can ever make
> stat() or fstat() report S_ISLNK.

fstat, yes.  But shouldn't stat be able to report S_ISLNK on a broken
link?

-- 
David Kastrup


--
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