From: "Mark E." To: djgpp-workers AT delorie DOT com Date: Sun, 5 Aug 2001 13:37:08 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: bash djgpp.env patch Message-ID: <3B6D4C04.2916.9C527C@localhost> X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp-workers AT delorie DOT com Hi, I noticed while testing the growable array code with Bash 2.05 that programs receive PATH with forward slashes instead of back slashes. This is because Bash 2.05 caches the environment string at startup and if PATH or any other variable from the environment isn't changed, then that string is exported when a program is run. djgpp.env contains lines that change backslashes to slashes in PATH before Bash sees the variable. Therefore unless PATH is explicitly changes, a program will receive PATH as it was at startup which isn't desirable since it will have forward slashes. Since at least 2.03, Bash has had code to handle importing and exporting variables like PATH, but it isn't run in the case of the caching I described. So the entries in djgpp.env serve no purpose and cause Bash to export a bad PATH. Index: djgpp.env =================================================================== RCS file: /cvs/djgpp/djgpp/djgpp.env,v retrieving revision 1.11 diff -c -p -r1.11 djgpp.env *** djgpp.env 2001/06/19 21:07:19 1.11 --- djgpp.env 2001/08/05 17:27:15 *************** LESS=-h5$y5$Dd2.0$Du14.0$Ds4.7$Dk9.0$%LE *** 59,69 **** ENSCRIPT_LIBRARY=%DJDIR%/share/enscript [bash] - PATH=%/>PATH% +CONFIG_SITE=%DJDIR%/share/config.site [sh] - PATH=%/>PATH% +CONFIG_SITE=%DJDIR%/share/config.site [groff] --- 59,67 ----