This is a special case of a general problem for which there
is as yet no solution. The right fix for this particular
case is to avoid setting HOME=/ in the environment, not to
add special-case C code.
(It's possible that this patch applies to Amol Deshpande's
Win32 port of zsh. That would explain the use of the _WIN32
constant.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, I agree, HOME=/ is a bad idea. However, Windows turns
what is merly a cosmetic annoyance on UNIX into a serious
problem, as "//" means something very different from "/".
The ZSH version I used is just the stock 3.1.9 code under
Cygwin. _WIN32 is defined automatically by all compilers on
all Win32 platforms, just like __unix.
To be honest, I don't really care if zsh never incorporates
this fix, since it is a kludge for an OS-specific problem
that manifests with a bad configuration. But I would like
to see it remain visible, either here on SourceForge or in a
"so-you-have-to-deal-with-Windows" file with gotchas and
caveats and limitations and all that good stuff.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
2greed: current Cygwin does not set _WIN32 anymore (unless
you explicitly asks it to do so that Zsh does not do). The
problem with $HOME=/ is general enough, if you browse
Cygwin list you'll see countless advises to NOT set HOME=/.
Every peace of software had problems with it.
It does not mean, I'm against this patch. I just like to
point out that none of my login scripts will work even with
this patch because they contain $HOME/foo.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
None
I amd curious, where _WIN32 comes from. Is it for 3.0.x series Win32 build? Or did you manage to compile 3.1.x for Win32?
Logged In: YES
user_id=22647
This is a special case of a general problem for which there
is as yet no solution. The right fix for this particular
case is to avoid setting HOME=/ in the environment, not to
add special-case C code.
(It's possible that this patch applies to Amol Deshpande's
Win32 port of zsh. That would explain the use of the _WIN32
constant.)
Logged In: YES
user_id=41344
Yes, I agree, HOME=/ is a bad idea. However, Windows turns
what is merly a cosmetic annoyance on UNIX into a serious
problem, as "//" means something very different from "/".
The ZSH version I used is just the stock 3.1.9 code under
Cygwin. _WIN32 is defined automatically by all compilers on
all Win32 platforms, just like __unix.
To be honest, I don't really care if zsh never incorporates
this fix, since it is a kludge for an OS-specific problem
that manifests with a bad configuration. But I would like
to see it remain visible, either here on SourceForge or in a
"so-you-have-to-deal-with-Windows" file with gotchas and
caveats and limitations and all that good stuff.
Logged In: YES
user_id=22647
I left the status as "open" so that the patch would remain
visible.
Current practice for zsh is to use __CYGWIN__ rather than
_WIN32, which is where the questions about your use of
_WIN32 came from.
Logged In: YES
user_id=64334
2greed: current Cygwin does not set _WIN32 anymore (unless
you explicitly asks it to do so that Zsh does not do). The
problem with $HOME=/ is general enough, if you browse
Cygwin list you'll see countless advises to NOT set HOME=/.
Every peace of software had problems with it.
It does not mean, I'm against this patch. I just like to
point out that none of my login scripts will work even with
this patch because they contain $HOME/foo.