summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--help.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/help.c b/help.c
index 7654f1bfd6..e925ca1f89 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;