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:
Jean-Francois Dockes
2015-08-19 14:41:10 +02:00
parent 14ab6909f3
commit c6e228b7c6
37 changed files with 566 additions and 382 deletions
+9 -1
View File
@@ -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
// -_.!~*'():@&=+$,
/*