[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: init_buffer PWD fix

From: 永野圭一郎
Subject: Re: init_buffer PWD fix
Date: Mon, 22 Apr 2002 16:20:48 +0900
User-agent: Wanderlust/2.9.9 (Unchained Melody) EMY/1.13.9 (Art is long, life is short) LIMIT/1.14.7 (Fujiidera) APEL/10.3 Emacs/21.2.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Sun, 21 Apr 2002 23:18:38 -0700 (PDT),
Paul Eggert wrote:
> > init_buffer uses environmental variable PWD to identify current
> > working directory.  I think we should not use it on Windows.  On
> > Windows with Cygwin, PWD is unreliable and confusing
> PWD is unreliable on all platforms, but Emacs works around the problem
> with a similar method on all platforms by statting $PWD and ".", and
> using $PWD only if stat results agree.  What is the problem with
> this workaround on Windows?

You cannot get st_ino which makes sence (without cygwin1.dll).
Compile stattest.c on Windows by MSVC (cl.exe), and you will see:

$ ./stattest
stattest.c: 0
stattest.exe: 0
.: 0
..: 0
C:\: 0
nonexist: stat failed

I wrote, compiled and run this code on Windows 2000 SP2 SRP1 with NTFS

Keiichiro Nagano

Attachment: stattest.c
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]