diff --git a/src/common/rclinit.cpp b/src/common/rclinit.cpp index 52bc6853..882c1b4c 100644 --- a/src/common/rclinit.cpp +++ b/src/common/rclinit.cpp @@ -52,9 +52,7 @@ void initAsyncSigs(void (*sigcleanup)(int)) { // We ignore SIGPIPE always. All pieces of code which can write to a pipe // must check write() return values. -#ifndef _WIN32 signal(SIGPIPE, SIG_IGN); -#endif // Install app signal handler if (sigcleanup) { @@ -213,9 +211,7 @@ RclConfig *recollinit(RclInitFlags flags, unac_set_except_translations(unacex.c_str()); #ifndef IDX_THREADS -#ifndef _WIN32 ExecCmd::useVfork(true); -#endif #else // Keep threads init behind log init, but make sure it's done before // we do the vfork choice ! The latter is not used any more actually, @@ -225,15 +221,11 @@ RclConfig *recollinit(RclInitFlags flags, bool novfork; config->getConfParam("novfork", &novfork); if (novfork) { -#ifndef _WIN32 LOGDEB0(("rclinit: will use fork() for starting commands\n")); ExecCmd::useVfork(false); -#endif } else { -#ifndef _WIN32 LOGDEB0(("rclinit: will use vfork() for starting commands\n")); ExecCmd::useVfork(true); -#endif } #endif diff --git a/src/index/checkretryfailed.cpp b/src/index/checkretryfailed.cpp index b818749c..f4a97fd9 100644 --- a/src/index/checkretryfailed.cpp +++ b/src/index/checkretryfailed.cpp @@ -28,6 +28,9 @@ using namespace std; bool checkRetryFailed(RclConfig *conf, bool record) { +#ifdef _WIN32 + return true; +#else string cmd; if (!conf->getConfParam("checkneedretryindexscript", cmd)) { @@ -51,4 +54,5 @@ bool checkRetryFailed(RclConfig *conf, bool record) return true; } return false; +#endif } diff --git a/src/index/recollindex.cpp b/src/index/recollindex.cpp index f3704e76..e9990f43 100644 --- a/src/index/recollindex.cpp +++ b/src/index/recollindex.cpp @@ -556,11 +556,9 @@ int main(int argc, char **argv) if (op_flags & OPT_k) { indexerFlags &= ~ConfIndexer::IxFNoRetryFailed; } else { -#ifndef _WIN32 if (checkRetryFailed(config, false)) { indexerFlags &= ~ConfIndexer::IxFNoRetryFailed; } -#endif } Pidfile pidfile(config->getPidfile()); @@ -684,12 +682,10 @@ int main(int argc, char **argv) "not going into monitor mode\n")); exit(1); } else { -#ifndef _WIN32 // Record success of indexing pass with failed files retries. if (!(indexerFlags & ConfIndexer::IxFNoRetryFailed)) { checkRetryFailed(config, true); } -#endif } deleteZ(confindexer); #ifndef _WIN32 @@ -727,12 +723,10 @@ int main(int argc, char **argv) makeIndexerOrExit(config, inPlaceReset); bool status = confindexer->index(rezero, ConfIndexer::IxTAll, indexerFlags); -#ifndef _WIN32 // Record success of indexing pass with failed files retries. if (status && !(indexerFlags & ConfIndexer::IxFNoRetryFailed)) { checkRetryFailed(config, true); } -#endif if (!status) cerr << "Indexing failed" << endl; if (!confindexer->getReason().empty()) diff --git a/src/internfile/extrameta.cpp b/src/internfile/extrameta.cpp index 9445cc1e..b526f18f 100644 --- a/src/internfile/extrameta.cpp +++ b/src/internfile/extrameta.cpp @@ -94,7 +94,6 @@ void docFieldsFromXattrs(RclConfig *cfg, const map& xfields, void reapMetaCmds(RclConfig* cfg, const string& path, map& cfields) { -#ifndef _WIN32 const vector& reapers = cfg->getMDReapers(); if (reapers.empty()) return; @@ -113,7 +112,6 @@ void reapMetaCmds(RclConfig* cfg, const string& path, cfields[rp->fieldname] = output; } } -#endif } // Set fields from external commands diff --git a/src/internfile/uncomp.cpp b/src/internfile/uncomp.cpp index 76952e5a..1962be97 100644 --- a/src/internfile/uncomp.cpp +++ b/src/internfile/uncomp.cpp @@ -109,12 +109,8 @@ bool Uncomp::uncompressfile(const string& ifn, } // Execute command and retrieve output file name, check that it exists -#ifndef _WIN32 ExecCmd ex; int status = ex.doexec(cmd, args, 0, &tfile); -#else - int status = -1; -#endif if (status || tfile.empty()) { LOGERR(("uncompressfile: doexec: failed for [%s] status 0x%x\n", ifn.c_str(), status));