delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/01/29/14:17:44

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:content-type
:content-transfer-encoding:date:from:to:subject:in-reply-to
:references:message-id; q=dns; s=default; b=jF0bagvNW0TkVqdHxMNO
Y4DSqVuBQC2UIJtJ5x9eK6DoF8WZvamOKAMui8cwlov8B0WSLc+LZHNLK5GrXRuS
V6mpI7cjnQVO93nkCGpD7qVD5o4kmGSYGXuJ8xVFtIFVp+BS9dpt+bxIiQX04+qh
4HvpD6WreyEFAT+MKDSzCGc=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:content-type
:content-transfer-encoding:date:from:to:subject:in-reply-to
:references:message-id; s=default; bh=KtqRXqVmS2VBLTbzjh8qdc2etO
U=; b=Qi7wo3aqVWtNQFHPTVQrG56vkEb5cgasOVJ20YfDiL7XgB5Tp59EXWB0BA
rnDx5Hwh76nnaGmd7ssOC/kpm0Srs8vpXqJBwVgg37iU3whHYc7hTwd+/lPY9LAi
p7pnU/G7QWeIfUd4uAOvjeOKQaod/tCirrB6goAZTh5EWI20Q=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Franke, franke, H*f:sk:639803f, H*RU:109
X-HELO: lb2-smtp-cloud3.xs4all.net
MIME-Version: 1.0
Date: Sun, 29 Jan 2017 20:17:19 +0100
From: waterlan <waterlan AT xs4all DOT nl>
To: cygwin AT cygwin DOT com
Subject: Re: dirent.d_type is not working on Cygwin symbolic links.
In-Reply-To: <639803f1-432c-005d-98c2-db982618c0e2@t-online.de>
References: <b431ce093f2949901c68c3c93fe0693c AT xs4all DOT nl> <639803f1-432c-005d-98c2-db982618c0e2 AT t-online DOT de>
Message-ID: <34cdfeceeb1885c645ff52b2c244cab5@xs4all.nl>
X-Sender: waterlan AT xs4all DOT nl
User-Agent: XS4ALL Webmail
X-IsSubscribed: yes

Christian Franke schreef op 2017-01-29 12:15:
> waterlan wrote:
>> The dirent.d_type value for Cygwin symbolic links is 0 (DT_UNKNOWN). 
>> The value is 10 (DT_LNK) for Windows native symbolic links. I think 
>> d_type should be 10 for Cygwin symbolic links too.
>> 
> 
> Sorry, no.
> 
> The actual type should only be returned in dirent.d_type if the info
> is available at very low cost. This is not the case for Cygwin
> symbolic links.
> 
> If DT_UNKNOWN is returned, lstat() must be called if type info is 
> required.
> 
> Quote from Linux man page readdir(3):
> "All applications must properly handle a return of DT_UNKNOWN."
> (https://linux.die.net/man/3/readdir)
> 
> See also thread starting at:
> https://sourceware.org/ml/cygwin-patches/2008-q4/msg00000.html

In this case I do not agree with this. Cygwin symbolic links are there 
to emulate Linux symlinks. Therefore I expect the same behaviour.

``Cygwin is
* a large collection of GNU and Open Source tools which provide 
functionality similar to a Linux distribution on Windows.''
(https://cygwin.com/)

regards,

-- 
Erwin Waterlander
http://waterlan.home.xs4all.nl/

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

- Raw text -


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