From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Igor Peshansky Newsgroups: gmane.os.cygwin,gmane.emacs.devel Subject: Re: New platform independent problem Date: Fri, 20 Jan 2006 08:29:20 -0500 (EST) Message-ID: References: <43D0797C.1030604@it.to-be.co.jp> Reply-To: cygwin@cygwin.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1137763787 29966 80.91.229.2 (20 Jan 2006 13:29:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2006 13:29:47 +0000 (UTC) Cc: djh , emacs-devel@gnu.org, cygwin@cygwin.com Original-X-From: cygwin-return-117756-goc-cygwin=m.gmane.org@cygwin.com Fri Jan 20 14:29:45 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 1EzwKY-0002Kl-7k for goc-cygwin@gmane.org; Fri, 20 Jan 2006 14:29:34 +0100 Original-Received: (qmail 26800 invoked by alias); 20 Jan 2006 13:29:25 -0000 Original-Received: (qmail 26790 invoked by uid 22791); 20 Jan 2006 13:29:24 -0000 X-Spam-Check-By: sourceware.org Original-Received: from ACCESS1.CIMS.NYU.EDU (HELO access1.cims.nyu.edu) (128.122.81.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 20 Jan 2006 13:29:22 +0000 Original-Received: from localhost (localhost [127.0.0.1]) by access1.cims.nyu.edu (8.12.10+Sun/8.12.10) with ESMTP id k0KDTKA7025007; Fri, 20 Jan 2006 08:29:20 -0500 (EST) Original-To: Eli Zaretskii In-Reply-To: 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:73976 gmane.emacs.devel:49315 Archived-At: On Fri, 20 Jan 2006, Eli Zaretskii wrote: > > Date: Fri, 20 Jan 2006 14:47:40 +0900 > > From: djh > > > > In December of last year, 2005, the cygwin developers deprecated d_ino > > out of the dirent.h defined dirent structure. ...changing it to __deprecated_d_ino, I believe. > > This break emac's dired.c (from compiling) > > Ref: http://www.cygwin.com/ml/cygwin/2005-12/msg00205.html > > Without knowing the full details, I'd risk saying that this was not > the best decision. Is there really no way of making d_ino be > consistent with what `stat' returns about the same directory? Corinna already covered that. > In any case, I think removing the member is a solution that is much > worse than the problem: many programs refer to d_ino, but don't > require too much from its contents. These programs will now fail to > compile. I don't think that the goal of educating the maintainers of > Bash and Find (a worthy goal in itself) justifies breaking the other > packages. > > If making d_ino consistent with st_ino is impossible, a better way of > dealing with problems in Bash and Find is to make changes in those > packages' sources that are specific to Cygwin. Frankly, many programs expect that if d_ino is present, it has the correct value (i.e., the same as st_ino). Having the member and not setting it correctly is essentially lying to the application. Is it so bad for Cygwin to be honest? > > This change causes a "make bootstrap" error in building my emacs vers. > > 22.0.50 source. > > > > "gcc -c -Demacs -DHAVE_CONFIG_H -DUSE_GTK -I. ..snipped...-O2 dired.c > > dired.c: In function `directory_files_internal': > > dired.c:230: error: structure has no member named `d_ino' > > dired.c: In function `file_name_completion': > > dired.c:538: error: structure has no member named `d_ino' > > make[1]: *** [dired.o] Error 1 " > > > > Under the prior version of cygwin this built successfully. > > > > I unfortunatley am not expert enough to suggest any fixes for this, > > but, I wanted to bring it to your attension to those of you out there > > who are and want emacs to continue to be usable on the newer version > > of cygwin. > > The immediate fix seems to be to modify the definition of > DIRENTRY_NONEMPTY for Cygwin so that it uses the same trick as on > MS-DOS. (Isn't it sad that Cygwin needs old MS-DOS era tricks?) If the content of d_ino isn't required to be anything specific, a simpler solution could be something like #ifdef __CYGWIN__ #define d_ino __deprecated_d_ino #endif Though why would a program refer to d_ino if it doesn't expect to do anything with its content is beyond me. HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha@cs.nyu.edu | igor@watson.ibm.com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte." "But no -- you are no fool; you call yourself a fool, there's proof enough in that!" -- Rostand, "Cyrano de Bergerac"