From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: init_buffer PWD fix Date: Mon, 22 Apr 2002 11:10:55 +0300 (IDT) Sender: emacs-devel-admin@gnu.org Message-ID: References: <200204220701.g3M71K923828@sic.twinsun.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1019459728 22257 127.0.0.1 (22 Apr 2002 07:15:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 22 Apr 2002 07:15:28 +0000 (UTC) Cc: knagano@sodan.org, emacs-devel@gnu.org, Andrew Innes , Jason Rumney Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16zY2q-0005ms-00 for ; Mon, 22 Apr 2002 09:15:28 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16zY3Q-0005O7-00 for ; Mon, 22 Apr 2002 09:16:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16zY2e-0001WC-00; Mon, 22 Apr 2002 03:15:16 -0400 Original-Received: from is.elta.co.il ([199.203.121.2]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16zXzw-0001Cj-00; Mon, 22 Apr 2002 03:12:28 -0400 Original-Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id LAA12767; Mon, 22 Apr 2002 11:10:55 +0300 (IDT) X-Sender: eliz@is Original-To: Paul Eggert In-Reply-To: <200204220701.g3M71K923828@sic.twinsun.com> Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2985 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2985 On Mon, 22 Apr 2002, Paul Eggert wrote: > > The problem is probably what you'd guess: the inode comparison doesn't > > work on Windows as well as it does on Posix platforms... > > If memory serves, that problem occurs on some Windows platforms but > not on others It depends on the library used to build Emacs. Windows filesystems don't have inodes, so a library must emulate them, and the emulation should be good enough to DTRT in such cases. IIRC, the stock Windows runtime simply returns zero in the inode member. > so any workaround should apply only to Windows > platforms where 'stat' is broken. Fcopy_file uses the conditional > `#if !defined (DOS_NT) || __DJGPP__ > 1' before inspecting st_ino; > would that be appropriate here too? DJGPP emulates the inodes well enough for the code to work, but the Windows port is not compiled with DJGPP. It is compiled with MSVC or MinGW, both of which use the Windows runtime. There's an inode emulation code in src/w32.c, but it seems like it's disabled. Jason, can you tell why (I've read the comments, but it sounds like this case contradicts them)? Personally, I think the code in buffer.c could compare normalized file names as either an alternative or a complementary to the inode method. Then it could be made reliable on more platforms. > > But even so, I still don't see how this would cause a failure. > > If 'stat' is broken, then Emacs can think that $PWD is correct even > when it is not. I understand that, but a specific example might still help. Thhis is the first time I see such a complaint, so I wonder how come no one else sees the problem.