Changeset 353
- Timestamp:
- Sep 19, 2011, 11:00:00 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified git/trunk/help.c ¶
r347 r353 128 128 return 0; 129 129 130 #if def WIN32130 #if defined(__MINGW32__) || defined(__KLIBC__) 131 131 { /* cannot trust the executable bit, peek into the file instead */ 132 132 char buf[3] = { 0 }; 133 133 int n; 134 int fd = open(name, O_RDONLY);134 int fd = open(name, O_RDONLY | O_BINARY); 135 135 st.st_mode &= ~S_IXUSR; 136 136 if (fd >= 0) { … … 138 138 if (n == 2) 139 139 /* DOS executables start with "MZ" */ 140 #if defined(__KLIBC__) 141 if (!strcmp(buf, "#!") || !strcmp(buf, "MZ") || !strcmp(buf, "LX")) 142 #else 140 143 if (!strcmp(buf, "#!") || !strcmp(buf, "MZ")) 144 #endif 141 145 st.st_mode |= S_IXUSR; 142 146 close(fd);
Note:
See TracChangeset
for help on using the changeset viewer.