From 7c0a534298980e8febd7a60c1e344fb3e760a581 Mon Sep 17 00:00:00 2001 From: Andrey Borzenkov Date: Thu, 5 Jul 2001 11:43:10 +0000 Subject: 15253 : hash foo together with foo.exe on Cygwin --- ChangeLog | 6 ++++++ Src/hashtable.c | 8 ++++---- 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 + + * 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 * 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); } -- cgit 1.4.1