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