delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/02/16/06:56:16

Message-Id: <199702161149.UAA11168@mail.st.rim.or.jp>
From: "Daisuke Aoyama" <jack AT st DOT rim DOT or DOT jp>
To: "Douglas Rupp" <rupp AT gnat DOT com>
Cc: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>,
"Jerzy Witkowski" <Jerzy DOT Witkowski AT ii DOT uni DOT wroc DOT pl>,
"DJGPP WORKERS" <djgpp-workers AT delorie DOT com>
Subject: RE: test bash for back path conversion.
Date: Sun, 16 Feb 1997 20:43:54 +0900
MIME-Version: 1.0

> I'm running this on NT 4.0, trying to configure the gcc/gnat source
> distribution. This also shows up on raw DOS, but I didn't get it on
> Windows 95 (LFN=n).
> 
> In the gcc-272/configure script, there's a line:
> STARTDIR=`pwd`
> 
> If I add "echo $STARTDIR" afterwards this returns garbage, in fact just
> inserting a line in the script like:
> pwd

That is my careless mistake. Almost case pwd cannot be restored.
If you can build bash from source distribution, apply this patch.

--- tmp/bash-1.14.7/dosutil.c	Fri Feb 14 05:57:20 1997
+++ tmp/x/bash-1.14.7/dosutil.c	Sun Feb 16 20:26:32 1997
@@ -787,8 +787,8 @@
 {
   char *p;
 
-#if 0
   envp->pwd    = SAVESTRING (get_string_value ("PWD"));
+#if 0
   envp->oldpwd = SAVESTRING (get_string_value ("OLDPWD"));
 #endif
   envp->curdir = dosutil_getcwd (NULL, PATH_MAX);
@@ -828,6 +828,9 @@
       bind_variable ("OLDPWD", envp->oldpwd);
       FREE_AND_CLEAR (envp->oldpwd);
     }
+#else
+  if (envp->pwd)
+    FREE_AND_CLEAR (envp->pwd);
 #endif
 }
 
Daisuke Aoyama
jack AT st DOT rim DOT or DOT jp

- Raw text -


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