X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=help.c;h=cbbe966f685b276cac702bb0fd9a44bfbf5f0e79;hb=fc2d99f1e95252dcd3eb645a370a658bea7fd5bd;hp=42193550f0b6f2a2c703c20c7abf1a81fe1b51d0;hpb=87d99c64dfa8880592104245896557aa530d4fd9;p=git.git diff --git a/help.c b/help.c index 42193550f..cbbe966f6 100644 --- a/help.c +++ b/help.c @@ -127,7 +127,10 @@ static int is_executable(const char *name) !S_ISREG(st.st_mode)) return 0; -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) +#if defined(__CYGWIN__) +if ((st.st_mode & S_IXUSR) == 0) +#endif { /* cannot trust the executable bit, peek into the file instead */ char buf[3] = { 0 }; int n;