|
|
|
@ -84,11 +84,12 @@ TSRM_API void tsrm_win32_shutdown(void) |
|
|
|
TSRM_API int tsrm_win32_access(const char *pathname, int mode) |
|
|
|
{ |
|
|
|
SHFILEINFO sfi; |
|
|
|
if (mode == 1 /*X_OK*/) |
|
|
|
return access(pathname, 0)==0 && |
|
|
|
SHGetFileInfo(pathname,0,&sfi,sizeof(SHFILEINFO),SHGFI_EXETYPE)!=0?0:-1; |
|
|
|
else |
|
|
|
if (mode == 1 /*X_OK*/) { |
|
|
|
return access(pathname, 0) == 0 && |
|
|
|
SHGetFileInfo(pathname, 0, &sfi, sizeof(SHFILEINFO), SHGFI_EXETYPE) != 0 ? 0 : -1; |
|
|
|
} else { |
|
|
|
return access(pathname, mode); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -370,4 +371,4 @@ TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf) { |
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |