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