X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=help.c;h=e8db31f60f010887ccb3a943344da566e0937403;hb=47344eee9b980a7cf2a08d040ff3dd38c6cd82ec;hp=294337e71c0c8f1c3e150dd0b566c04db96c013d;hpb=bb0c8065f167a29e22f22e6e1355096395475430;p=git.git diff --git a/help.c b/help.c index 294337e71..e8db31f60 100644 --- a/help.c +++ b/help.c @@ -126,8 +126,8 @@ static int is_executable(const char *name) !S_ISREG(st.st_mode)) return 0; -#ifdef __MINGW32__ - /* cannot trust the executable bit, peek into the file instead */ +#ifdef WIN32 +{ /* cannot trust the executable bit, peek into the file instead */ char buf[3] = { 0 }; int n; int fd = open(name, O_RDONLY); @@ -140,6 +140,7 @@ static int is_executable(const char *name) st.st_mode |= S_IXUSR; close(fd); } +} #endif return st.st_mode & S_IXUSR; }