www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/07/22/07:48:38

Date: Wed, 22 Jul 1998 13:20:13 +0200 (MET DST)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
To: George Foot <george DOT foot AT merton DOT oxford DOT ac DOT uk>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Potential gotcha: Win98 vs. NameNumericTail
In-Reply-To: <199807220118.CAA02256@sable.ox.ac.uk>
Message-ID: <Pine.LNX.3.93.980722130721.12561C-100000@acp3bf>
MIME-Version: 1.0

On Wed, 22 Jul 1998, George Foot wrote:

> In Windows 95 you can achieve the same effect as temporarily turning
> off the numeric tails before creating a file with a long name by
> doing two renames on the file -- first renaming it to its truncated
> short name (e.g. rename libstdcxx.a to libstdcx.a) and then renaming
> that back to the long name again (rename libstdcx.a to libstdcxx.a)
> -- using the DOS `ren' command.  The first renaming corrects the
> short name, and the second does not affect the short name at all --
> it just changes the long name.  So you end up with a filename that
> works whether or not LFN is enabled.  This doesn't work under
> Windows 98 though -- the short name is mangled again by the second
> rename.

Yes. That's about what they wrote in the documentation for their
'patch' file that removes the NameNumericTails entry: with it.
Or what I understood of their babble :-)

> I think supplying a utility to do this for people would be safer than
> encouraging them to adapt their registries.  

The problem I see with this is that I don't know if you can run such an
.inf script (or anything equivalent) from a DOS-box command line.
Currently, I only see methods that do this by 'GUI-based' methods (context
menu of the .inf file, select 'Install'). So there my be no way of doing
this automatically as part of an installation procedure for DJGPP
programs. 

If the solution were to be used in Win98, only, then there might be a
possibility of using the 'Windows Scripting Host' facility ('the' new
batch language for '98, kind of like REXX in OS/2, or AppleTalk on Macs).
But then, some users may not have that installed at all.

> Unfortunately djgpp's
> `rename' and `_rename' functions seem to have the same problem that
> the Windows 98 `ren' command has.  

You mean: DJGPP's rename() behaves differently in this respect than
DOS-7-in-a-Win95-box? To my mind, this would mean that M$ must have done
something strange behind the curtains, again. Not that this would be much
of surprise, of course; they've been doing that all the time, it seems.

> It's still possible (but crude) to make the program output a batch file,
> which would work under Windows 95 (but not under Windows 98).  The
> program would require LFN support to be enabled while it runs. 

The reason behind this difference, I think, is that it's naturally the OS
alone that decides on what short name is used. After all, the application
obviously only gave it one name (the long one), and only that is expected
to be found again later. Well, LFN support in Win9x *is* a kludge, really.

Looks like even M$ didn't like part of the stupidity they invented for
'95, so they changed it in '98. Wether it's more or less stupid than
before is yet to be discovered... 

Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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