about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrey Borzenkov <bor@users.sourceforge.net>2001-07-05 11:43:10 +0000
committerAndrey Borzenkov <bor@users.sourceforge.net>2001-07-05 11:43:10 +0000
commit7c0a534298980e8febd7a60c1e344fb3e760a581 (patch)
tree35ac3a12553bf69d2a9546e14331ff1502b0c070
parentb65dcc197bf5e44071f9391a2b45224d2935d571 (diff)
downloadzsh-7c0a534298980e8febd7a60c1e344fb3e760a581.tar.gz
zsh-7c0a534298980e8febd7a60c1e344fb3e760a581.tar.xz
zsh-7c0a534298980e8febd7a60c1e344fb3e760a581.zip
15253 : hash foo together with foo.exe on Cygwin
-rw-r--r--ChangeLog6
-rw-r--r--Src/hashtable.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 889e4075e..566343cdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-07-05  Andrej Borsenkow  <bor@zsh.org>
+
+	* 15253 : Src/hashtable.c: make hashdir() hash foo in addition
+	to foo.exe on Cygwin again (lost when Cygwin gcc stopped setting
+	_WIN32 by default).
+
 2001-07-03  Clint Adams  <clint@zsh.org>
 
 	* 15242: Doc/Zsh/mod_pcre.yo,
diff --git a/Src/hashtable.c b/Src/hashtable.c
index c75a406e6..332f9479a 100644
--- a/Src/hashtable.c
+++ b/Src/hashtable.c
@@ -630,9 +630,9 @@ hashdir(char **dirp)
     Cmdnam cn;
     DIR *dir;
     char *fn;
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
     char *exe;
-#endif
+#endif /* _WIN32 || _CYGWIN__ */
 
     if (isrelative(*dirp) || !(dir = opendir(unmeta(*dirp))))
 	return;
@@ -644,7 +644,7 @@ hashdir(char **dirp)
 	    cn->u.name = dirp;
 	    cmdnamtab->addnode(cmdnamtab, ztrdup(fn), cn);
 	}
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
 	/* Hash foo.exe as foo, since when no real foo exists, foo.exe
 	   will get executed by DOS automatically.  This quiets
 	   spurious corrections when CORRECT or CORRECT_ALL is set. */
@@ -660,7 +660,7 @@ hashdir(char **dirp)
 		cmdnamtab->addnode(cmdnamtab, ztrdup(fn), cn);
 	    }
 	}
-#endif /* _WIN32 */
+#endif /* _WIN32 || __CYGWIN__ */
     }
     closedir(dir);
 }