delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/15/13:03:16

Date: Wed, 10 Jul 1996 18:52:09 +0100
Message-Id: <199607101752.SAA00752@sirius.demon.co.uk>
From: D C Haslam <dch AT sirius DOT demon DOT co DOT uk>
To: eliz AT is DOT elta DOT co DOT il
Cc: djgpp AT delorie DOT com
In-Reply-To: <Pine.SUN.3.91.960708085216.28866H-100000@is> (message from Eli
Zaretskii on Mon, 8 Jul 1996 09:00:47 +0200 (IST))
Subject: Re: Emacs 19.31 - LFN doesn't work

> 
> On 8 Jul 1996, D C Haslam wrote:
> 
> > I've compiled emacs 19.31 from source using djgpp 2,
> > and emacs runs fine so far, except I can't get LFN to work.
> 
> Please describe exactly how does LFN support fails in Emacs.  It was 
> tested under Win95 and in general works (although some bugs might still 
> be there).

Creating a file with a long file name creates an crunched 8.3 name.
(msdos-long-file-names) returns nil.
 
> Are you running Emacs under Win95?
Yes.

> > I have the environment variable LNF set to yes.
> 
> That's a typo, right?  It's LFN, not LNF.
Yes, a typo in the message only.

> Do you set LFN=y from the DOS prompt or from DJGPP.ENV?
Both.

> 
> > If I run emacs with gdb, then if I examine the variable
> > _crt0_startup_flags, it has the value 0xC00 even before the
> > program starts. This means the _CRT0_FLAG_NO_LFN is already
> > set.
> 
> That is normal behavior.  The LFN flag is only set at runtime, AFTER the 
> program's startup, when the first file-oriented operation is done.

You miss my point. Examining the flag with gdb *before* starting
the code shows that the LFN flags is already set. This means
it's preset in the program file.

>  
> > Is there some other way that _crt0_startup_flags is being setup
> > that I can't find?
> 
> I don't think that's the right direction to look for the cause of the 
> problem.  Please post the details of the case where LFN isn't supported.

Well, I've now found out what is happening.
The reason emacs.exe has _crt0_startup_flags preset with 0xC00 is
because it is generated by temacs dumping itself.
At the time of the build LFN=n, and so temacs will have the 
_CRT0_FLAG_NO_LFN flag set. This gets copied into the emacs executable.

I unpacked and built emacs using LFN=n as the (ambiguous) emacs INSTALL
file suggested this was the best way.

I have now unpacked and built again using LFN=y and LFN is now 
working fine.

The fact that building emacs with LFN=n would prevent
it running with LFN=y is not immediately obvious, and I'm sure it's
not true of other apps.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019