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
+1 -5
View File
@@ -16,10 +16,9 @@
*/
#include "autoconfig.h"
#include <unistd.h>
#include <sys/types.h>
#include <string.h>
#include <errno.h>
#include "safesysstat.h"
#include "cstr.h"
#include "pathut.h"
@@ -43,9 +42,6 @@
using namespace std;
#include <sys/stat.h>
// Beagle creates a file named .xxx (where xxx is the name for the main file
// in the queue), to hold external metadata (http or created by Beagle).
// This class reads the .xxx, dotfile, and turns it into an Rcl::Doc holder
-6
View File
@@ -14,16 +14,10 @@
* Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "autoconfig.h"
#endif
#include <sys/stat.h>
#include <errno.h>
#include "debuglog.h"
#include "rcldoc.h"
#include "fetcher.h"
#include "bglfetcher.h"
#include "debuglog.h"
+1 -1
View File
@@ -17,7 +17,7 @@
#ifndef _FETCHER_H_INCLUDED_
#define _FETCHER_H_INCLUDED_
#include <sys/stat.h>
#include "safesysstat.h"
#include <string>
#include "rcldoc.h"
+1 -3
View File
@@ -14,12 +14,10 @@
* Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "autoconfig.h"
#endif
#include <sys/stat.h>
#include <errno.h>
#include "safesysstat.h"
#include "debuglog.h"
#include "cstr.h"
+1 -2
View File
@@ -17,10 +17,9 @@
#include "autoconfig.h"
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <cstring>
#include "safesysstat.h"
#include <iostream>
#include <list>
+3 -5
View File
@@ -19,7 +19,6 @@
#endif
#include <stdio.h>
#include "safesystat.h"
#include <errno.h>
#include <algorithm>
@@ -30,6 +29,7 @@
#include "fsindexer.h"
#include "beaglequeue.h"
#include "mimehandler.h"
#include "pathut.h"
#ifdef RCL_USE_ASPELL
#include "rclaspell.h"
@@ -57,14 +57,12 @@ ConfIndexer::~ConfIndexer()
bool ConfIndexer::runFirstIndexing()
{
// Indexing status file existing and not empty ?
struct stat st;
if (stat(m_config->getIdxStatusFile().c_str(), &st) == 0 &&
st.st_size > 0) {
if (path_filesize(m_config->getIdxStatusFile()) > 0) {
LOGDEB0(("ConfIndexer::runFirstIndexing: no: status file not empty\n"));
return false;
}
// And only do this if the user has kept the default topdirs (~).
vector<string>tdl = m_config->getTopdirs();
vector<string> tdl = m_config->getTopdirs();
if (tdl.size() != 1 || tdl[0].compare(path_canon(path_tildexpand("~")))) {
LOGDEB0(("ConfIndexer::runFirstIndexing: no: not home only\n"));
return false;
+2 -2
View File
@@ -18,7 +18,7 @@
#ifndef TEST_MIMETYPE
#include "autoconfig.h"
#include <sys/stat.h>
#include "safesysstat.h"
#include <ctype.h>
#include <string>
@@ -185,7 +185,7 @@ string mimetype(const string &fn, const struct stat *stp,
#else // TEST->
#include <stdio.h>
#include <sys/stat.h>
#include "safesysstat.h"
#include <cstdlib>
#include <iostream>
-3
View File
@@ -25,10 +25,7 @@
*/
#include <pthread.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <fnmatch.h>
#include <cstring>
+3 -3
View File
@@ -16,11 +16,12 @@
* Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <unistd.h>
#include <sys/stat.h>
#include "autoconfig.h"
#include <errno.h>
#include <cstdio>
#include <cstring>
#include "safesysstat.h"
#include "debuglog.h"
#include "rclmon.h"
@@ -298,7 +299,6 @@ bool eraseWatchSubTree(map<int, string>& idtopath, const string& top)
#include <fam.h>
#include <sys/select.h>
#include <setjmp.h>
#include <unistd.h>
#include <signal.h>
/** FAM based monitor class. We have to keep a record of FAM watch
-1
View File
@@ -63,7 +63,6 @@ bool subtreelist(RclConfig *config, const string& top,
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>