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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=mJNIIv91ILScfM6e T5YuflWqZcnQjzyEyle8xCkuax1ZK3o10SKum/lBi1ZUEk57Kbe/U/JcoaoDgbfn XaC3NDrDjRqJqbOjJbzxvNNnp+pZwP5syT2FtT+md9+KE0yA6zk++CZ0rDbFz96j 6eCVMBPuhNhYxdlV4znuF1rnfik= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=Tkz63R6EU4L81Ea9NB0Vi9 VwGOI=; b=ksyRG974ZIDRMJFrWyaNVYzVu0pJgKTgVpHbbHp5tXJNSIb67GfZjx +/lLeXJo3aV2P2ADingZs8+dlPBdQzMtJX8SMFiGMNrbvgayKo6ylJwEC5bI9CLU QC9W+A0eIId/iXfykuD+vNu8RU9q40OZQMmjjXQ0yXr+q2h2Jdv7A= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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.2 required=5.0 tests=BAYES_40,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=waterlan, cygwin-patches, cygwinpatches, H*i:sk:b431ce0 X-HELO: mailout12.t-online.de Subject: Re: dirent.d_type is not working on Cygwin symbolic links. To: cygwin AT cygwin DOT com References: From: Christian Franke Message-ID: <639803f1-432c-005d-98c2-db982618c0e2@t-online.de> Date: Sun, 29 Jan 2017 12:15:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 Regards, Christian -- 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