X-Spam-Check-By: sourceware.org
Date: Fri, 20 Jan 2006 18:48:16 +0200
Message-Id: <ulkxargkv.fsf@gnu.org>
From: Eli Zaretskii <eliz@gnu.org>
To: Eric Blake <ebb9@byu.net>
CC: cygwin@cygwin.com, henman@it.to-be.co.jp, emacs-devel@gnu.org
In-reply-to: <43D0F12A.4000202@byu.net> (message from Eric Blake on Fri, 20 	Jan 2006 07:18:18 -0700)
Subject: Re: New platform independent problem
Reply-to: Eli Zaretskii <eliz@gnu.org>
References: <43D0797C.1030604@it.to-be.co.jp> <ur773qhq5.fsf@gnu.org> <Pine.GSO.4.63.0601200821540.17119@access1.cims.nyu.edu> <uoe27q9y6.fsf@gnu.org> <43D0F12A.4000202@byu.net>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

> Date: Fri, 20 Jan 2006 07:18:18 -0700
> From: Eric Blake <ebb9@byu.net>
> CC: cygwin@cygwin.com,  henman@it.to-be.co.jp,  emacs-devel@gnu.org
> 
> Which is why it is prohibitively expensive for cygwin to populate it with
> the correct value on WinNT and Win2K; too few applications use d_ino to
> make it worth doing the Windows equivalent of stat during the readdir() to
> correctly populate the d_ino member.  But if we are going to populate
> d_ino, it had better either be st_ino (so we aren't lying), or a sentinel
> that makes it obvious that st_ino should be used instead (either 0 or -1).
>  Fortunately, Win9x and WinXP had non-prohibitive costs to making d_ino
> match st_ino.

You could have a flag that, if set, will instruct readdir to do the
expensive processing.  Applications that need the real inode will set
that flag.

> > What is bad is to have dirent.h, but not some of the struct members it
> > calls for.
> 
> POSIX permits implementations to not have d_ino.  In other words, when it
> comes to dirent.h, cygwin is fully POSIX-compliant to not have a d_ino
> member, and applications had better not assume that d_ino exists.

That may be so, but I don't think I've seen packages that check
whether d_ino exist in their configury.  They assume it does, AFAICS.

> > It's bad mantra for an application to use a symbol that starts with
> > "__", since those symbols are reserved for the library implementation.
> 
> My understanding is that leading __ is reserved for the IMPLEMENTATION in
> general, not just the library implementation; cygwin is part of the
> implementation.

I was responding to a suggestion to use __deprecated_d_ino in the
Emacs code.  Emacs is certainly _not_ a part of implementation.

> What platforms use d_ino==0 to mean an empty entry, rather than an entry
> where st_ino must be checked?

I see it in Emacs, Corinna shows another example from rcp and scp.

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

