Fossil SCM

Fixed Win32 build breakage

mjanssen 2008-03-11 19:21 trunk
Commit dbb2cee11315443a63540a760d2215bc55d40324
1 file changed +4
+4
--- src/file.c
+++ src/file.c
@@ -73,11 +73,15 @@
7373
int file_isexe(const char *zFilename){
7474
struct stat buf;
7575
if( stat(zFilename, &buf)!=0 ){
7676
return 0;
7777
}
78
+#ifdef __MINGW32__
79
+ return ((S_IXUSR)&buf.st_mode)!=0;
80
+#else
7881
return ((S_IXUSR|S_IXGRP|S_IXOTH)&buf.st_mode)!=0;
82
+#endif
7983
}
8084
8185
/*
8286
** Set or clear the execute bit on a file.
8387
*/
8488
--- src/file.c
+++ src/file.c
@@ -73,11 +73,15 @@
73 int file_isexe(const char *zFilename){
74 struct stat buf;
75 if( stat(zFilename, &buf)!=0 ){
76 return 0;
77 }
 
 
 
78 return ((S_IXUSR|S_IXGRP|S_IXOTH)&buf.st_mode)!=0;
 
79 }
80
81 /*
82 ** Set or clear the execute bit on a file.
83 */
84
--- src/file.c
+++ src/file.c
@@ -73,11 +73,15 @@
73 int file_isexe(const char *zFilename){
74 struct stat buf;
75 if( stat(zFilename, &buf)!=0 ){
76 return 0;
77 }
78 #ifdef __MINGW32__
79 return ((S_IXUSR)&buf.st_mode)!=0;
80 #else
81 return ((S_IXUSR|S_IXGRP|S_IXOTH)&buf.st_mode)!=0;
82 #endif
83 }
84
85 /*
86 ** Set or clear the execute bit on a file.
87 */
88

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button