diff --git a/src/common/autoconfig-win.h b/src/common/autoconfig-win.h new file mode 100644 index 00000000..349a2b98 --- /dev/null +++ b/src/common/autoconfig-win.h @@ -0,0 +1,186 @@ +/* Manually edited version of autoconfig.h for windows. Many things are +overriden in the c++ code by ifdefs _WIN32 anyway */ +#ifndef _AUTOCONFIG_H_INCLUDED +#define _AUTOCONFIG_H_INCLUDED +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Path to the aspell api include file */ +/* #undef ASPELL_INCLUDE "aspell-local.h" */ + +/* Path to the aspell program */ +/* #define ASPELL_PROG "/usr/bin/aspell" */ + +/* No X11 session monitoring support */ +#define DISABLE_X11MON + +/* Path to the fam api include file */ +/* #undef FAM_INCLUDE */ + +/* Path to the file program */ +#define FILE_PROG "/usr/bin/file" + +/* "Have C++0x" */ +#undef HAVE_CXX0X_UNORDERED + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* 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 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkdtemp' function. */ +/* #undef HAVE_MKDTEMP */ + +/* Define to 1 if you have the `posix_spawn,' function. */ +/* #undef HAVE_POSIX_SPAWN_ */ + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Has std::shared_ptr */ +#define HAVE_SHARED_PTR_STD + +/* Has std::tr1::shared_ptr */ +/* #undef HAVE_SHARED_PTR_TR1 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SPAWN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MOUNT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PARAM_H_ */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STATFS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STATVFS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_VFS_H */ + +/* "Have tr1" */ +/* #undef HAVE_TR1_UNORDERED */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNISTD_H */ + +/* Use multiple threads for indexing */ +#define IDX_THREADS 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "Recoll" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "Recoll 1.22.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "recoll" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.22.0" + +/* putenv parameter is const */ +/* #undef PUTENV_ARG_CONST */ + +/* iconv parameter 2 is const char** */ +#define RCL_ICONV_INBUF_CONST 1 + +/* Real time monitoring option */ +#undef RCL_MONITOR + +/* Split camelCase words */ +/* #undef RCL_SPLIT_CAMELCASE */ + +/* Compile the aspell interface */ +/* #undef RCL_USE_ASPELL */ + +/* Compile the fam interface */ +/* #undef RCL_USE_FAM */ + +/* Compile the inotify interface */ +#define RCL_USE_INOTIFY 1 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Use posix_spawn() */ +/* #undef USE_POSIX_SPAWN */ + +/* Enable using the system's 'file' command to id mime if we fail internally + */ +/* #undef USE_SYSTEM_FILE_COMMAND */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to 1 if the X Window System is missing or not being used. */ +/* #undef X_DISPLAY_MISSING */ + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +#define DISABLE_WEB_INDEXER + +#include "conf_post.h" +#endif // already included diff --git a/src/common/conf_post.h b/src/common/conf_post.h index b9f55663..182e3e2e 100644 --- a/src/common/conf_post.h +++ b/src/common/conf_post.h @@ -45,6 +45,7 @@ typedef unsigned __int8 u_int8_t; typedef int mode_t; typedef int ssize_t; #define strncasecmp _strnicmp +#define strcasecmp _stricmp #define ftruncate _chsize #define PATH_MAX MAX_PATH #define MAXPATHLEN PATH_MAX @@ -56,7 +57,7 @@ typedef int ssize_t; #define lstat stat #define fseeko _fseeki64 #define ftello _ftelli64 - +#define timegm _mkgmtime #endif diff --git a/src/common/rclconfig.cpp b/src/common/rclconfig.cpp index 229782e0..d61bb4b1 100644 --- a/src/common/rclconfig.cpp +++ b/src/common/rclconfig.cpp @@ -465,10 +465,14 @@ void RclConfig::initThrConf() if (vq.size() > 0 && vq[0] == 0) { LOGDEB(("RclConfig::initThrConf: autoconf requested\n")); CpuConf cpus; +#ifdef _WIN32 + cpus.ncpus = 1; +#else if (!getCpuConf(cpus) || cpus.ncpus < 1) { LOGERR(("RclConfig::initThrConf: could not retrieve cpu conf\n")); cpus.ncpus = 1; } +#endif // Arbitrarily set threads config based on number of CPUS. This also // depends on the IO setup actually, so we're bound to be wrong... if (cpus.ncpus == 1) { diff --git a/src/index/fetcher.cpp b/src/index/fetcher.cpp index 5d205487..5afc77fc 100644 --- a/src/index/fetcher.cpp +++ b/src/index/fetcher.cpp @@ -33,8 +33,10 @@ DocFetcher *docFetcherMake(const Rcl::Doc& idoc) idoc.getmeta(Rcl::Doc::keybcknd, &backend); if (backend.empty() || !backend.compare("FS")) { return new FSDocFetcher; +#ifndef DISABLE_WEB_INDEXER } else if (!backend.compare("BGL")) { return new BGLDocFetcher; +#endif } else { LOGERR(("DocFetcherFactory: unknown backend [%s]\n", backend.c_str())); return 0; diff --git a/src/index/indexer.cpp b/src/index/indexer.cpp index ca4e6895..e58b0d8e 100644 --- a/src/index/indexer.cpp +++ b/src/index/indexer.cpp @@ -14,9 +14,7 @@ * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef HAVE_CONFIG_H #include "autoconfig.h" -#endif #include #include @@ -27,7 +25,9 @@ #include "debuglog.h" #include "indexer.h" #include "fsindexer.h" +#ifndef DISABLE_WEB_INDEXER #include "beaglequeue.h" +#endif #include "mimehandler.h" #include "pathut.h" @@ -46,7 +46,9 @@ ConfIndexer::ConfIndexer(RclConfig *cnf, DbIxStatusUpdater *updfunc) ConfIndexer::~ConfIndexer() { deleteZ(m_fsindexer); +#ifndef DISABLE_WEB_INDEXER deleteZ(m_beagler); +#endif } // Determine if this is likely the first time that the user runs @@ -107,7 +109,7 @@ bool ConfIndexer::index(bool resetbefore, ixType typestorun, int flags) return false; } } - +#ifndef DISABLE_WEB_INDEXER if (m_dobeagle && (typestorun & IxTBeagleQueue)) { deleteZ(m_beagler); m_beagler = new BeagleQueueIndexer(m_config, &m_db, m_updater); @@ -116,7 +118,7 @@ bool ConfIndexer::index(bool resetbefore, ixType typestorun, int flags) return false; } } - +#endif if (typestorun == IxTAll) { // Get rid of all database entries that don't exist in the // filesystem anymore. Only if all *configured* indexers ran. @@ -173,6 +175,7 @@ bool ConfIndexer::indexFiles(list& ifiles, int flag) ret = m_fsindexer->indexFiles(myfiles, flag); LOGDEB2(("ConfIndexer::indexFiles: fsindexer returned %d, " "%d files remainining\n", ret, myfiles.size())); +#ifndef DISABLE_WEB_INDEXER if (m_dobeagle && !myfiles.empty() && !(flag & IxFNoWeb)) { if (!m_beagler) @@ -183,7 +186,7 @@ bool ConfIndexer::indexFiles(list& ifiles, int flag) ret = false; } } - +#endif // The close would be done in our destructor, but we want status here if (!m_db.close()) { LOGERR(("ConfIndexer::index: error closing database in %s\n", @@ -255,6 +258,7 @@ bool ConfIndexer::purgeFiles(std::list &files, int flag) if (m_fsindexer) ret = m_fsindexer->purgeFiles(myfiles); +#ifndef DISABLE_WEB_INDEXER if (m_dobeagle && !myfiles.empty() && !(flag & IxFNoWeb)) { if (!m_beagler) m_beagler = new BeagleQueueIndexer(m_config, &m_db, m_updater); @@ -264,6 +268,7 @@ bool ConfIndexer::purgeFiles(std::list &files, int flag) ret = false; } } +#endif // The close would be done in our destructor, but we want status here if (!m_db.close()) { diff --git a/src/index/indexer.h b/src/index/indexer.h index 4c024bac..28dc26a9 100644 --- a/src/index/indexer.h +++ b/src/index/indexer.h @@ -16,20 +16,18 @@ */ #ifndef _INDEXER_H_INCLUDED_ #define _INDEXER_H_INCLUDED_ +#include "rclconfig.h" #include #include #include #include -#ifndef NO_NAMESPACES using std::string; using std::list; using std::map; using std::vector; -#endif -#include "rclconfig.h" #include "rcldb.h" #include "rcldoc.h" #ifdef IDX_THREADS diff --git a/src/index/mimetype.cpp b/src/index/mimetype.cpp index d53d331c..87118c49 100644 --- a/src/index/mimetype.cpp +++ b/src/index/mimetype.cpp @@ -142,6 +142,7 @@ string mimetype(const string &fn, const struct stat *stp, string mtype; +#ifndef _WIN32 // Extended attribute has priority on everything, as per: // http://freedesktop.org/wiki/CommonExtendedAttributes if (pxattr::get(fn, "mime_type", &mtype)) { @@ -152,6 +153,7 @@ string mimetype(const string &fn, const struct stat *stp, return mtype; } } +#endif if (cfg == 0) { LOGERR(("Mimetype: null config ??\n")); @@ -179,7 +181,6 @@ string mimetype(const string &fn, const struct stat *stp, if (mtype.empty() && stp) mtype = mimetypefromdata(cfg, fn, usfc); - out: return mtype; } diff --git a/src/index/recollindex.cpp b/src/index/recollindex.cpp index 9ae807e7..eefa92b6 100644 --- a/src/index/recollindex.cpp +++ b/src/index/recollindex.cpp @@ -42,7 +42,9 @@ using namespace std; #include "x11mon.h" #include "cancelcheck.h" #include "rcldb.h" +#ifndef DISABLE_WEB_INDEXER #include "beaglequeue.h" +#endif #include "recollindex.h" #include "fsindexer.h" #ifndef _WIN32 @@ -135,6 +137,7 @@ class MyUpdater : public DbIxStatusUpdater { return false; } +#ifndef DISABLE_X11MON // If we are in the monitor, we also need to check X11 status // during the initial indexing pass (else the user could log // out and the indexing would go on, not good (ie: if the user @@ -144,7 +147,7 @@ class MyUpdater : public DbIxStatusUpdater { stopindexing = true; return false; } - +#endif return true; } @@ -520,9 +523,11 @@ 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()); @@ -646,10 +651,12 @@ 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 @@ -687,11 +694,12 @@ 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 2f83fb9a..9445cc1e 100644 --- a/src/internfile/extrameta.cpp +++ b/src/internfile/extrameta.cpp @@ -46,7 +46,7 @@ void reapXAttrs(const RclConfig* cfg, const string& path, map& xfields) { LOGDEB2(("reapXAttrs: [%s]\n", path.c_str())); - +#ifndef _WIN32 // Retrieve xattrs names from files and mapping table from config vector xnames; if (!pxattr::list(path, &xnames)) { @@ -79,6 +79,7 @@ void reapXAttrs(const RclConfig* cfg, const string& path, xfields[key] = value; LOGDEB2(("reapXAttrs: [%s] -> [%s]\n", key.c_str(), value.c_str())); } +#endif } void docFieldsFromXattrs(RclConfig *cfg, const map& xfields, diff --git a/src/internfile/mh_mail.cpp b/src/internfile/mh_mail.cpp index 32721c65..9d4a3f36 100644 --- a/src/internfile/mh_mail.cpp +++ b/src/internfile/mh_mail.cpp @@ -14,6 +14,7 @@ * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "autoconfig.h" #include #include @@ -21,6 +22,7 @@ #include "safeunistd.h" #include #include +#include "safesysstat.h" #include #include diff --git a/src/internfile/mh_text.cpp b/src/internfile/mh_text.cpp index 4fe35e2f..ec629947 100644 --- a/src/internfile/mh_text.cpp +++ b/src/internfile/mh_text.cpp @@ -18,10 +18,13 @@ #include #include +#include "safefcntl.h" +#include +#include "safesysstat.h" +#include "safeunistd.h" #include #include -using namespace std; #include "cstr.h" #include "mh_text.h" @@ -32,6 +35,8 @@ using namespace std; #include "pxattr.h" #include "pathut.h" +using namespace std; + const int MB = 1024*1024; const int KB = 1024; @@ -51,9 +56,11 @@ bool MimeHandlerText::set_document_file(const string& mt, const string &fn) return false; } +#ifndef _WIN32 // Check for charset defined in extended attribute as per: // http://freedesktop.org/wiki/CommonExtendedAttributes pxattr::get(m_fn, "charset", &m_charsetfromxattr); +#endif // Max file size parameter: texts over this size are not indexed int maxmbs = 20; diff --git a/src/internfile/mimehandler.cpp b/src/internfile/mimehandler.cpp index bb0d09ff..50956463 100644 --- a/src/internfile/mimehandler.cpp +++ b/src/internfile/mimehandler.cpp @@ -195,6 +195,9 @@ static const string cstr_mh_charset("charset"); MimeHandlerExec *mhExecFactory(RclConfig *cfg, const string& mtype, string& hs, bool multiple, const string& id) { +#ifdef _WIN32 + return 0; +#else ConfSimple attrs; string cmdstr; @@ -238,6 +241,7 @@ MimeHandlerExec *mhExecFactory(RclConfig *cfg, const string& mtype, string& hs, #endif return h; +#endif } /* Get handler/filter object for given mime type: */ diff --git a/src/internfile/myhtmlparse.cpp b/src/internfile/myhtmlparse.cpp index 5567fa9d..f4272a4b 100644 --- a/src/internfile/myhtmlparse.cpp +++ b/src/internfile/myhtmlparse.cpp @@ -23,6 +23,10 @@ * -----END-LICENCE----- */ #include +#ifdef _WIN32 +// Local implementation in windows directory +#include "strptime.h" +#endif #include #include #include diff --git a/src/rcldb/rclabstract.cpp b/src/rcldb/rclabstract.cpp index 3d32c685..364e6bbc 100644 --- a/src/rcldb/rclabstract.cpp +++ b/src/rcldb/rclabstract.cpp @@ -82,7 +82,7 @@ bool Query::Native::getMatchTerms(unsigned long xdocid, vector& terms) { if (!xenquire) { LOGERR(("Query::getMatchTerms: no query opened\n")); - return -1; + return false; } terms.clear(); diff --git a/src/unac/unac.c b/src/unac/unac.c index 2f4df79c..38de5cc5 100644 --- a/src/unac/unac.c +++ b/src/unac/unac.c @@ -16,15 +16,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef HAVE_CONFIG_H -#ifdef RECOLL_DATADIR +#ifdef BUILDING_RECOLL #include "autoconfig.h" #else #include "config.h" #endif /* RECOLL */ -#endif /* HAVE_CONFIG_H */ -#ifdef RECOLL_DATADIR +#ifdef BUILDING_RECOLL /* Yes, recoll unac is actually c++, lets face modernity, I will not be caught writing another binary search */ #include diff --git a/src/utils/md5ut.cpp b/src/utils/md5ut.cpp index 43c990fe..6966080c 100644 --- a/src/utils/md5ut.cpp +++ b/src/utils/md5ut.cpp @@ -16,6 +16,8 @@ */ #ifndef TEST_MD5 +#include "autoconfig.h" + #include #include diff --git a/src/utils/mimeparse.cpp b/src/utils/mimeparse.cpp index c51b0e1b..a224b10c 100644 --- a/src/utils/mimeparse.cpp +++ b/src/utils/mimeparse.cpp @@ -16,6 +16,7 @@ */ #ifndef TEST_MIMEPARSE +#include "autoconfig.h" #include #include @@ -32,10 +33,7 @@ #include "transcode.h" #include "smallut.h" - -#ifndef NO_NAMESPACES using namespace std; -#endif /* NO_NAMESPACES */ //#define DEBUG_MIMEPARSE #ifdef DEBUG_MIMEPARSE diff --git a/src/utils/readfile.cpp b/src/utils/readfile.cpp index 0cd74ec4..df23e9ee 100644 --- a/src/utils/readfile.cpp +++ b/src/utils/readfile.cpp @@ -25,11 +25,11 @@ #include -using std::string; - #include "readfile.h" #include "smallut.h" +using std::string; + #ifndef MIN #define MIN(A,B) ((A) < (B) ? (A) : (B)) #endif diff --git a/src/utils/readfile.h b/src/utils/readfile.h index f0ce5e75..35620904 100644 --- a/src/utils/readfile.h +++ b/src/utils/readfile.h @@ -20,7 +20,6 @@ #include #include -using std::string; /** * Read file in chunks, calling an accumulator for each chunk. Can be used @@ -29,23 +28,23 @@ using std::string; class FileScanDo { public: virtual ~FileScanDo() {} - virtual bool init(size_t size, string *reason) = 0; - virtual bool data(const char *buf, int cnt, string* reason) = 0; + virtual bool init(size_t size, std::string *reason) = 0; + virtual bool data(const char *buf, int cnt, std::string* reason) = 0; }; -bool file_scan(const string &filename, FileScanDo* doer, string *reason = 0); +bool file_scan(const std::string &filename, FileScanDo* doer, std::string *reason = 0); /* Same but only process count cnt from offset offs. Set cnt to size_t(-1) * for no limit */ -bool file_scan(const string &fn, FileScanDo* doer, off_t offs, size_t cnt, - string *reason = 0); +bool file_scan(const std::string &fn, FileScanDo* doer, off_t offs, size_t cnt, + std::string *reason = 0); /** * Read file into string. * @return true for ok, false else */ -bool file_to_string(const string &filename, string &data, string *reason = 0); +bool file_to_string(const std::string &filename, std::string &data, std::string *reason = 0); /** Read file chunk into string. Set cnt to size_t(-1) for whole file */ -bool file_to_string(const string &filename, string &data, - off_t offs, size_t cnt, string *reason = 0); +bool file_to_string(const std::string &filename, std::string &data, + off_t offs, size_t cnt, std::string *reason = 0); #endif /* _READFILE_H_INCLUDED_ */ diff --git a/src/windows/Win32ProjectRecoll.vcxproj b/src/windows/Win32ProjectRecoll.vcxproj index af25731b..160188e9 100644 --- a/src/windows/Win32ProjectRecoll.vcxproj +++ b/src/windows/Win32ProjectRecoll.vcxproj @@ -75,10 +75,10 @@ NotUsing Level3 Disabled - WIN32;__WIN32__;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + BUILDING_RECOLL;WIN32;__WIN32__;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) false - C:\xapian\xapian-core-1.2.8\include;C:\Users\Bill\recoll\src\internfile;C:\Users\Bill\recoll\src\rcldb;C:\Users\Bill\recoll\src\index;C:\Users\Bill\recoll\src\bincimapmime;C:\Users\Bill\recoll\src\unac;C:\Users\Bill\recoll\src\windows;C:\zlib\include;C:\pthreads-w32\Pre-built.2\include;C:\Users\Bill\recoll\src\xaposix;C:\Users\Bill\recoll\src\common;C:\Users\Bill\recoll\src\utils;%(AdditionalIncludeDirectories) - 4800 + C:\Iconv\include;C:\xapian\xapian-core-1.2.8\include;C:\Users\Bill\recoll\src\internfile;C:\Users\Bill\recoll\src\rcldb;C:\Users\Bill\recoll\src\index;C:\Users\Bill\recoll\src\bincimapmime;C:\Users\Bill\recoll\src\unac;C:\Users\Bill\recoll\src\windows;C:\zlib\include;C:\pthreads-w32\Pre-built.2\include;C:\Users\Bill\recoll\src\xaposix;C:\Users\Bill\recoll\src\common;C:\Users\Bill\recoll\src\utils;%(AdditionalIncludeDirectories) + 4800;4996 Windows @@ -140,16 +140,25 @@ + + + + + + + + + @@ -178,6 +187,7 @@ + @@ -194,7 +204,7 @@ - + @@ -205,10 +215,20 @@ + + + + + + + + + + diff --git a/src/windows/Win32ProjectRecoll.vcxproj.filters b/src/windows/Win32ProjectRecoll.vcxproj.filters index 81155e34..905b4066 100644 --- a/src/windows/Win32ProjectRecoll.vcxproj.filters +++ b/src/windows/Win32ProjectRecoll.vcxproj.filters @@ -57,6 +57,33 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Source Files + @@ -224,8 +251,35 @@ Source Files - + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + Source Files + + + \ No newline at end of file diff --git a/src/windows/fnmatch.c b/src/windows/fnmatch.c index cf0f1242..977eb0b3 100644 --- a/src/windows/fnmatch.c +++ b/src/windows/fnmatch.c @@ -13,10 +13,9 @@ Library General Public License for more details. */ /* Modified slightly by Brian Berliner and Jim Blandy for CVS use */ +/* Modified slightly by j.f. dockes for recoll use */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include "autoconfig.h" /* Some file systems are case-insensitive. If FOLD_FN_CHAR is #defined, it maps the character C onto its "canonical" form. In a @@ -27,27 +26,13 @@ Library General Public License for more details. */ #define FOLD_FN_CHAR(c) (c) #endif -/* IGNORE(@ */ -/* #include */ -/* @) */ #include -#include +#include "fnmatch.h" -#if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) -extern int errno; -#endif /* Match STRING against the filename pattern PATTERN, returning zero if it matches, nonzero if not. */ -int -#if __STDC__ -fnmatch (const char *pattern, const char *string, int flags) -#else -fnmatch (pattern, string, flags) - char *pattern; - char *string; - int flags; -#endif +int fnmatch (const char *pattern, const char *string, int flags) { register const char *p = pattern, *n = string; register char c; diff --git a/src/windows/fnmatch.h b/src/windows/fnmatch.h index 200c8925..9c628693 100644 --- a/src/windows/fnmatch.h +++ b/src/windows/fnmatch.h @@ -31,7 +31,13 @@ Library General Public License for more details. */ /* Match STRING against the filename pattern PATTERN, returning zero if it matches, FNM_NOMATCH if not. */ -extern int fnmatch (const char *pattern, const char *string, int flags); +#ifdef __cplusplus +extern "C" { +#endif +extern int fnmatch (const char *pattern, const char *str, int flags); +#ifdef __cplusplus +} +#endif #endif /* fnmatch.h */ diff --git a/src/windows/recollindex/recollindex.vcxproj b/src/windows/recollindex/recollindex.vcxproj index c3613a8d..eea3f43d 100644 --- a/src/windows/recollindex/recollindex.vcxproj +++ b/src/windows/recollindex/recollindex.vcxproj @@ -94,7 +94,7 @@ Console true C:\xapian\xapian-core-1.2.8\win32\Debug;C:\Users\Bill\recoll\src\windows\Debug;C:\pthreads-w32\Pre-built.2\lib\x86;%(AdditionalLibraryDirectories) - C:\Users\Bill\recoll\src\windows\Debug\Win32ProjectRecoll.lib;C:\xapian\xapian-core-1.2.8\win32\Debug\xapian-core.lib;C:\zlib\lib\zdll.lib;Ws2_32.lib;Rpcrt4.lib;pthreadVC2.lib;%(AdditionalDependencies) + C:\Users\Bill\recoll\src\windows\Debug\Win32ProjectRecoll.lib;C:\xapian\xapian-core-1.2.8\win32\Debug\xapian-core.lib;C:\Iconv\lib\iconv.lib;C:\Iconv\lib/charset.lib;C:\zlib\lib\zdll.lib;Ws2_32.lib;Rpcrt4.lib;pthreadVC2.lib;%(AdditionalDependencies)