X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=help.c;h=e925ca1f8973a05a66b5c09b45e3451f65e3a1e7;hb=8d677edc4fa3fd1fe12b49bf279aaad5be89b81c;hp=7654f1bfd608d151a213937614449cc497bb638b;hpb=419272d87b7a611ea55736c284df9615d22ec6af;p=git.git diff --git a/help.c b/help.c index 7654f1bfd..e925ca1f8 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;