From 799190b70224d78fa0681a1e6d1480c455e9434c Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Mon, 4 Sep 2017 09:59:37 +0200 Subject: [PATCH] Small windows build adjustments --- src/common/autoconfig-win.h | 11 +++++++---- src/index/indexer.cpp | 11 +++++++++++ src/index/recollindex.cpp | 17 +++++------------ src/windows/recoll-setup.iss | 2 +- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/common/autoconfig-win.h b/src/common/autoconfig-win.h index 7d88cdec..3965aa80 100644 --- a/src/common/autoconfig-win.h +++ b/src/common/autoconfig-win.h @@ -32,6 +32,9 @@ overriden in the c++ code by ifdefs _WIN32 anyway */ /* Define to 1 if you have the `dl' library (-ldl). */ #define HAVE_LIBDL 1 +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#define HAVE_LIBPTHREAD 1 + /* Define to 1 if you have the `z' library (-lz). */ #define HAVE_LIBZ 1 @@ -109,7 +112,7 @@ overriden in the c++ code by ifdefs _WIN32 anyway */ #define PACKAGE_NAME "Recoll" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Recoll 1.23.1-x" +#define PACKAGE_STRING "Recoll 1.23.3" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "recoll" @@ -118,13 +121,13 @@ overriden in the c++ code by ifdefs _WIN32 anyway */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.23.1-x" +#define PACKAGE_VERSION "1.23.3" /* putenv parameter is const */ /* #undef PUTENV_ARG_CONST */ -/* iconv parameter 2 is const char** */ -#define RCL_ICONV_INBUF_CONST 1 +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST /* Real time monitoring option */ #undef RCL_MONITOR diff --git a/src/index/indexer.cpp b/src/index/indexer.cpp index a58e466d..a5b1e1c8 100644 --- a/src/index/indexer.cpp +++ b/src/index/indexer.cpp @@ -36,6 +36,17 @@ #include "rclaspell.h" #endif +// This would more logically live in recollindex.cpp, but then librecoll would +// have an undefined symbol +ConfSimple idxreasons; +void addIdxReason(string who, string reason) +{ + reason = neutchars(reason, "\r\n"); + if (!idxreasons.set(who, reason)) { + std::cerr << "addIdxReason: confsimple set failed\n"; + } +} + ConfIndexer::ConfIndexer(RclConfig *cnf, DbIxStatusUpdater *updfunc) : m_config(cnf), m_db(cnf), m_fsindexer(0), m_dobeagle(false), m_beagler(0), diff --git a/src/index/recollindex.cpp b/src/index/recollindex.cpp index 00590d70..05757315 100644 --- a/src/index/recollindex.cpp +++ b/src/index/recollindex.cpp @@ -405,31 +405,24 @@ void lockorexit(Pidfile *pidfile) } } -static ConfSimple reasons; static string reasonsfile; -void addIdxReason(string who, string reason) -{ - reason = neutchars(reason, "\r\n"); - if (!reasons.set(who, reason)) { - cerr << "addIdxReason: confsimple set failed\n"; - } -} +extern ConfSimple idxreasons; static void flushIdxReasons() { if (reasonsfile.empty()) return; if (reasonsfile == "stdout") { - reasons.write(cout); + idxreasons.write(cout); } else if (reasonsfile == "stderr") { - reasons.write(cerr); + idxreasons.write(std::cerr); } else { ofstream out; try { out.open(reasonsfile, ofstream::out|ofstream::trunc); - reasons.write(out); + idxreasons.write(out); } catch (...) { cerr << "Could not write reasons file " << reasonsfile << endl; - reasons.write(cerr); + idxreasons.write(cerr); } } } diff --git a/src/windows/recoll-setup.iss b/src/windows/recoll-setup.iss index 2c2c297a..06400747 100644 --- a/src/windows/recoll-setup.iss +++ b/src/windows/recoll-setup.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Recoll" -#define MyAppVersion "1.23.1-20170313-aeb336" +#define MyAppVersion "1.23.3-20170904-cd6ee9" #define MyAppPublisher "Recoll.org" #define MyAppURL "http://www.recoll.org" #define MyAppExeName "recoll.exe"