X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=help.c;h=cbbe966f685b276cac702bb0fd9a44bfbf5f0e79;hb=50c94032844bb184cdeff7779be3b6a23e04d312;hp=42193550f0b6f2a2c703c20c7abf1a81fe1b51d0;hpb=6d1cdadbeeb03f40250526e29b1f1a91582911d8;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;