From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Windows LFN support Date: Tue, 24 Dec 1996 15:57:54 -0800 Organization: Two pounds of chaos and a pinch of salt Lines: 45 Message-ID: <32C06E02.51ED@cs.com> References: <199612240755 DOT JAA09429 AT pegasus DOT marques DOT co DOT za> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp211.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Graeme Pyle wrote: > [Long essay on LFN support snipped] I think your problem is that native DOS simply does not support long filenames. When DJGPP programs make the decision on whether or not to use LFNs, they first check to see if LFN support is available in the environment. Under Win95/Win95 DOS shell, the LFN API is enabled, so your programs use it. Under plain DOS, or a DOS reboot, the API is not present, so your programs assume they are running on a "normal" system. There are only two ways around this problem that I know of; most of this is taken from the FAQ so you should probably go back and look at its discussion on LFNs. 1) Use only Windows 95 to develop and run any of your programs that are LFN-dependent. That way, you always get to use the LFN API and never need to worry about not having it. If your programs themselves depend on LFNs, you could theoretically put a check in your programs that disables them unless they run with LFNs enabled. (hint: look up the _use_lfn() macro in the libc docs) 2) Assuming that you've edited the Win95 registry to disable the NameNumericTail setting, make all your programs that use LFNs either in compilation or at runtime LFN-safe by using only names that are unique in their first 8+3 characters. All the distributed DJGPP packages use this convention, in order to avoid exactly the sort of problem you have encountered. You should _never_ distribute any program with source files that do not have unique 8+3 names, unless you specifically state that your program can only be properly compiled or run under Win95 with LFNs enabled. Remember that even though Win95 provides many enhancements to the operating system, in the end you are still working with plain old 8+3, 16-bit DOS. Good luck! -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com | | God's final message to His Creation: | http://www.cs.com/fighteer | | "We apologize for the inconvenience."| Fight against proprietary | | - Douglas Adams | software - support the FSF!| ---------------------------------------------------------------------