Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

cygwin, compat.c/zgetdir()



Currently zgetdir() does a lot of fiddling with
stat()/opendir()/inodes and devices.  Is there any reason why it
doesn't use the getcwd() function when present on a platform?

Under Cygnus' cygwin, the assumptions about the file system made by
zgetdir() break down.  While in the //g directory (which is really a
root directory of the g drive), cygwin lets you do a chdir("..") and
puts you into /.  This breaks zgetdir().  There is also a bug in
cygwin that'll give a different inode for /blah/foo/. and /blah/foo,
which also breaks zgetdir(), though I've sent a fix to cygnus for
that.

Anyway, under cygwin its best for zgetdir() to call getcwd().  I'm
wondering if the best fix is to put that code in an #ifdef HAVE_GETCWD
or an #ifdef __CYGWIN__.

After I use zsh under cygwin for a while, I'll be sending a patch to
the list including this and a few other tweaks.




Messages sorted by: Reverse Date, Date, Thread, Author