mirror of https://github.com/BOINC/boinc.git
Fix is_file() and is_dir() to compile properly on Windows.
svn path=/trunk/boinc/; revision=15064
This commit is contained in:
parent
8a3f4dc1e5
commit
8743712223
|
@ -3271,3 +3271,10 @@ Charlie April 15 2008
|
|||
|
||||
lib/
|
||||
filesys.C
|
||||
|
||||
Charlie April 16 2008
|
||||
- Fix is_file() and is_dir() to compile properly on Windows by using
|
||||
the actual expressions instead of the macros which aren't defined.
|
||||
|
||||
lib/
|
||||
filesys.C
|
||||
|
|
|
@ -79,13 +79,13 @@ char boinc_failed_file[256];
|
|||
int is_file(const char* path) {
|
||||
struct stat sbuf;
|
||||
int retval = stat(path, &sbuf);
|
||||
return (!retval && S_ISREG(sbuf.st_mode));
|
||||
return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFREG));
|
||||
}
|
||||
|
||||
int is_dir(const char* path) {
|
||||
struct stat sbuf;
|
||||
int retval = stat(path, &sbuf);
|
||||
return (!retval && S_ISDIR(sbuf.st_mode));
|
||||
return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFDIR));
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
|
|
Loading…
Reference in New Issue