[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: init_buffer PWD fix
From: |
Eli Zaretskii |
Subject: |
Re: init_buffer PWD fix |
Date: |
Mon, 22 Apr 2002 11:10:55 +0300 (IDT) |
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.
Re: init_buffer PWD fix, Paul Eggert, 2002/04/22
- Re: init_buffer PWD fix, Eli Zaretskii, 2002/04/22
- Re: init_buffer PWD fix, Paul Eggert, 2002/04/22
- Re: init_buffer PWD fix,
Eli Zaretskii <=
- Re: init_buffer PWD fix, Paul Eggert, 2002/04/22
- Re: init_buffer PWD fix, Eli Zaretskii, 2002/04/22
- Re: init_buffer PWD fix, Paul Eggert, 2002/04/22
- Re: init_buffer PWD fix, Eli Zaretskii, 2002/04/23
Re: init_buffer PWD fix, Jason Rumney, 2002/04/22
Re: init_buffer PWD fix, Eli Zaretskii, 2002/04/23
Re: init_buffer PWD fix, 永野圭一郎, 2002/04/22
Re: init_buffer PWD fix, 宮下 尚:HIMI, 2002/04/23