Prepared windows port by removing a number of spurious reference to unix-specific interfaces, and using some xapian posix adaptor includes
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
#include "safesysstat.h"
|
||||
#include <glob.h>
|
||||
|
||||
// Let's include all files where statfs can be defined and hope for no
|
||||
@@ -425,6 +425,14 @@ bool path_isdir(const string& path)
|
||||
return false;
|
||||
}
|
||||
|
||||
long long path_filesize(const string& path)
|
||||
{
|
||||
struct stat st;
|
||||
if (stat(path.c_str(), &st) < 0)
|
||||
return -1;
|
||||
return (long long)st.st_size;
|
||||
}
|
||||
|
||||
// Allowed punctuation in the path part of an URI according to RFC2396
|
||||
// -_.!~*'():@&=+$,
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user