summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/clucene/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/clucene/src')
-rw-r--r--src/3rdparty/clucene/src/CLucene/StdHeader.cpp2
-rw-r--r--src/3rdparty/clucene/src/CLucene/StdHeader.h10
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/define_std.h3
-rw-r--r--src/3rdparty/clucene/src/CLucene/config/repl_tchar.h20
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/Misc.cpp10
-rw-r--r--src/3rdparty/clucene/src/CLucene/util/fileinputstream.cpp5
6 files changed, 50 insertions, 0 deletions
diff --git a/src/3rdparty/clucene/src/CLucene/StdHeader.cpp b/src/3rdparty/clucene/src/CLucene/StdHeader.cpp
index 9813a58c9..d64c51f77 100644
--- a/src/3rdparty/clucene/src/CLucene/StdHeader.cpp
+++ b/src/3rdparty/clucene/src/CLucene/StdHeader.cpp
@@ -17,8 +17,10 @@
#if defined(_CLCOMPILER_MSVC) && defined(_DEBUG)
# define CRTDBG_MAP_ALLOC
# include <stdlib.h>
+#ifndef UNDER_CE
# include <crtdbg.h>
#endif
+#endif
CL_NS_USE(util)
diff --git a/src/3rdparty/clucene/src/CLucene/StdHeader.h b/src/3rdparty/clucene/src/CLucene/StdHeader.h
index d267d0342..fbb3fd949 100644
--- a/src/3rdparty/clucene/src/CLucene/StdHeader.h
+++ b/src/3rdparty/clucene/src/CLucene/StdHeader.h
@@ -58,8 +58,10 @@ extern int _lucene_counter_break; //can set a watch on this
#if defined(_CL_HAVE_UNISTD_H)
#include <unistd.h>
#elif defined(_CL_HAVE_IO_H) && defined(_CL_HAVE_DIRECT_H)
+#ifndef UNDER_CE
#include <io.h>
#include <direct.h>
+#endif
#else
#error "Neither unistd.h or (io.h & direct.h) were available"
#endif
@@ -75,7 +77,11 @@ extern int _lucene_counter_break; //can set a watch on this
#if defined(_CL_STAT_MACROS_BROKEN)
#error "Haven't implemented STAT_MACROS_BROKEN fix yet"
#elif defined(_CL_HAVE_SYS_STAT_H)
+#ifdef UNDER_CE
+ #include <types.h>
+#else
#include <sys/stat.h>
+#endif
#else
#error "Haven't implemented platforms with no sys/stat.h"
#endif
@@ -179,13 +185,17 @@ extern int _lucene_counter_break; //can set a watch on this
#include "CLucene/config/repl_tchar.h"
#if defined(_CL_HAVE_ERRNO_H)
+#ifndef UNDER_CE
#include <errno.h>
+#endif
#else
#error "Haven't implemented platforms with no errno.h"
#endif
#if defined(_CL_HAVE_FCNTL_H)
+#ifndef UNDER_CE
#include <fcntl.h>
+#endif
#else
#error "Haven't implemented platforms with no fcntl.h"
#endif
diff --git a/src/3rdparty/clucene/src/CLucene/config/define_std.h b/src/3rdparty/clucene/src/CLucene/config/define_std.h
index 3f92117ee..22a079053 100644
--- a/src/3rdparty/clucene/src/CLucene/config/define_std.h
+++ b/src/3rdparty/clucene/src/CLucene/config/define_std.h
@@ -72,6 +72,9 @@
#else
#define _CL_HAVE_UNISTD_H
#endif
+#ifdef UNDER_CE
+#undef _CL_HAVE_SYS_TIMEB_H
+#endif
////////////////////////////////////////////////
//now for individual functions. some compilers
diff --git a/src/3rdparty/clucene/src/CLucene/config/repl_tchar.h b/src/3rdparty/clucene/src/CLucene/config/repl_tchar.h
index d562cc8d6..ba8aef5c6 100644
--- a/src/3rdparty/clucene/src/CLucene/config/repl_tchar.h
+++ b/src/3rdparty/clucene/src/CLucene/config/repl_tchar.h
@@ -93,6 +93,26 @@
#endif
#else //HAVE_TCHAR_H
#include <tchar.h>
+
+#ifdef UNDER_CE
+#include <QString>
+#define _i64tot i64tot
+inline TCHAR* i64tot(__int64 value, TCHAR* str, int radix)
+{
+ QT_USE_NAMESPACE
+ _tcscpy(str, (TCHAR *) QString::number(value, radix).utf16());
+ return str;
+}
+
+#define _tcstoi64 tcstoi64
+inline __int64 tcstoi64(const TCHAR *nptr, TCHAR **endptr, int base)
+{
+ QT_USE_NAMESPACE
+ bool ok;
+ return QString::fromUtf16((ushort*) nptr).toInt(&ok, base);
+}
+
+#endif
//some tchar headers miss these...
#ifndef _tcstoi64
diff --git a/src/3rdparty/clucene/src/CLucene/util/Misc.cpp b/src/3rdparty/clucene/src/CLucene/util/Misc.cpp
index cb2efe259..42e3fd0a8 100644
--- a/src/3rdparty/clucene/src/CLucene/util/Misc.cpp
+++ b/src/3rdparty/clucene/src/CLucene/util/Misc.cpp
@@ -24,10 +24,15 @@
# include <sys/timeb.h>
#endif
+#ifdef UNDER_CE
+#include <QTime>
+#endif
+
CL_NS_DEF(util)
uint64_t Misc::currentTimeMillis()
{
+#ifndef UNDER_CE
#if defined(_CLCOMPILER_MSVC) || defined(__MINGW32__) || defined(__BORLANDC__)
struct _timeb tstruct;
_ftime(&tstruct);
@@ -41,6 +46,11 @@ uint64_t Misc::currentTimeMillis()
return (((uint64_t) tstruct.tv_sec) * 1000) + tstruct.tv_usec / 1000;
#endif
+#else //UNDER_CE
+ QT_USE_NAMESPACE
+ QTime t = QTime::currentTime();
+ return t.second() * 1000 + t.msec();
+#endif //UNDER_CE
}
// #pragma mark -- char related utils
diff --git a/src/3rdparty/clucene/src/CLucene/util/fileinputstream.cpp b/src/3rdparty/clucene/src/CLucene/util/fileinputstream.cpp
index 3803dfd85..9125d8478 100644
--- a/src/3rdparty/clucene/src/CLucene/util/fileinputstream.cpp
+++ b/src/3rdparty/clucene/src/CLucene/util/fileinputstream.cpp
@@ -25,7 +25,10 @@
*/
#include "jstreamsconfig.h"
#include "fileinputstream.h"
+
+#ifndef UNDER_CE
#include <cerrno>
+#endif
#include <cstring>
namespace jstreams {
@@ -39,7 +42,9 @@ FileInputStream::FileInputStream(const char *filepath, int32_t buffersize) {
error = "Could not read file '";
error += filepath;
error += "': ";
+#ifndef UNDER_CE
error += strerror(errno);
+#endif
status = Error;
return;
}