From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.os.cygwin,gmane.emacs.devel Subject: Re: New platform independent problem Date: Fri, 20 Jan 2006 18:48:16 +0200 Message-ID: References: <43D0797C.1030604@it.to-be.co.jp> <43D0F12A.4000202@byu.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1137775729 11409 80.91.229.2 (20 Jan 2006 16:48:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2006 16:48:49 +0000 (UTC) Cc: cygwin@cygwin.com, henman@it.to-be.co.jp, emacs-devel@gnu.org Original-X-From: cygwin-return-117772-goc-cygwin=m.gmane.org@cygwin.com Fri Jan 20 17:48:46 2006 Return-path: Envelope-to: goc-cygwin@gmane.org Original-Received: from sourceware.org ([209.132.176.174]) by ciao.gmane.org with smtp (Exim 4.43) id 1EzzR7-0002g7-C9 for goc-cygwin@gmane.org; Fri, 20 Jan 2006 17:48:30 +0100 Original-Received: (qmail 23711 invoked by alias); 20 Jan 2006 16:48:22 -0000 Original-Received: (qmail 23702 invoked by uid 22791); 20 Jan 2006 16:48:21 -0000 X-Spam-Check-By: sourceware.org Original-Received: from gandalf.inter.net.il (HELO gandalf.inter.net.il) (192.114.186.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 20 Jan 2006 16:48:19 +0000 Original-Received: from nitzan.inter.net.il (nitzan.inter.net.il [192.114.186.20]) by gandalf.inter.net.il (MOS 3.7.1-GA) with ESMTP id HQE03406; Fri, 20 Jan 2006 18:48:12 +0200 (IST) Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-64-251.inter.net.il [80.230.64.251]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id CNE34389 (AUTH halo1); Fri, 20 Jan 2006 18:48:11 +0200 (IST) Original-To: Eric Blake In-reply-to: <43D0F12A.4000202@byu.net> (message from Eric Blake on Fri, 20 Jan 2006 07:18:18 -0700) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Original-Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Xref: news.gmane.org gmane.os.cygwin:73992 gmane.emacs.devel:49321 Archived-At: > Date: Fri, 20 Jan 2006 07:18:18 -0700 > From: Eric Blake > 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.