delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/06/30/00:40:23

From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Sat, 30 Jun 2001 00:39:27 -0400
MIME-Version: 1.0
Subject: Re: Bug & fix for Bash 2.05
Message-ID: <3B3D1FBF.13238.60447B@localhost>
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com

> Based on limited knowledge of the code, I think that my fix is conceptually
> cleaner :) Besides, only additional comment makes it look bigger.

I did find one problem with your solution.
Let's say someone has PATH set to "a;b;c;d". I'll admit this non-existant 
person is a dufus, but it is legal. Then set "PATH_SEPARATOR=:".  PATH is now 
"a:b:c:d". Then set "PATH_SEPARATOR=;". PATH is now "a:b;c:d".

But it turns out my solution isn't quite right either. The real problem seem 
to be that make_dos_path_var is being used for two different purposes. As-is, 
the function correctly handles the case when the path separator changes. 
Fixed in the way I posted, it correctly handles putting files into exportable 
form. So I've created another function to handle the second case. And now 
both cases work correctly. All is now good with the world.

I'm uploading a new source release to fix this case. It incorporates the fix 
above and takes advantage of a flaw in the current dosexec.c to allow a file 
without an extension to take precedence over a file with the same name but 
with an extension. But also made files with an .exe extension take precedence 
over extension-less unstubbed coff files. Enjoy.

http://members.nbci.com/snowball3/djgpp/bsh205s.zip

Mark

- Raw text -


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