Mail Archives: djgpp/2003/01/02/19:11:02
Martin Str|mberg wrote:
>
> Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
[snip]
> : Bash _must_ have TMPDIR forward-slashed, or else lots of scripts will
> : fall apart. I don't know about Perl, but I think you are right
> : assuming it should get the same treatment.
>
> I've "set TMPDIR=t:/tmp" in my AUTOEXEC.BAT but still the perl snippet
> above says "t:\tmp" so there's something more going on.
Under bash? How about under DOS? I see different behaviour depending on the
shell:
C:\WINDOWS>perl -e 'print $ENV{TMPDIR}."\n";'
C:/TEMP
C:\WINDOWS>ver
Windows 98 [Version 4.10.2222]
bash-2.04$ perl -e 'print $ENV{TMPDIR}."\n";'
c:\temp
bash-2.04$ bash --version
GNU bash, version 2.04.7(1)-release (i386-pc-msdosdjgpp)
Copyright 1999 Free Software Foundation, Inc.
bash 2.05b built against DJGPP CVS seems to work OK:
bash-2.05b$ perl -e 'print $ENV{TMPDIR}."\n";'
C:/TEMP
bash-2.05b$ echo | awk '{ print ENVIRON["TMPDIR"] }'
C:/TEMP
bash-2.05b$ $SHELL --version
GNU bash, version 2.05b.0(1)-release (i686-pc-msdosdjgpp)
Copyright (C) 2002 Free Software Foundation, Inc.
(Note that this bash was spawned from a DOS prompt.)
bash 2.04 built against DJGPP CVS has the problem:
bash-2.04$ perl -e 'print $ENV{TMPDIR}."\n";'
c:\temp
bash-2.04$ echo | awk '{ print ENVIRON["TMPDIR"] }'
c:\temp
bash-2.04$ gnu/bash-2.04/bash.exe --version
GNU bash, version 2.04.7(1)-release (i686-pc-msdosdjgpp)
Copyright 1999 Free Software Foundation, Inc.
(Note that this bash was spawned from a DOS prompt. I had to #if 0/#endif out
the code in gnu/bash-2.04/lib/dos/dosexec.c, to use the code from libc.)
One thing I noticed is that bash 2.04 does not set $SHELL. If I set $SHELL to
point at the bash 2.04 executable, it does not affect the results. bash 2.05
does set $SHELL.
Looking at the sources, I see that TMPDIR is one of the variables fixed up in
2.04. In 2.05 it is not fixed up. Mark, why is this?
Regards,
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -