diff options
author | Christian Strømme <christian.stromme@digia.com> | 2013-05-06 18:26:18 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-07 16:47:41 +0200 |
commit | b161f54d7511daea89e7d217ee43e08ea90bf3de (patch) | |
tree | 5b0296723221b2b71b8c39abc3698f482eaeef1b /src | |
parent | 35f6adbb6e45a78668326b6debd23edc38aefe41 (diff) | |
download | qttools-b161f54d7511daea89e7d217ee43e08ea90bf3de.tar.gz |
Android: Fix for compilation error in clucene.v5.1.0-beta1
Android only provide stubs for wcstoll(3) and wctomb(3), to solve this
wcstoll(3) is replace by an internal equvialent, and wctomb(3) by
wcrtomb(3).
Change-Id: Ic30e5a809c2f6ab30b4e52883d3aae3ecc036194
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/assistant/3rdparty/clucene/src/CLucene/config/repl_tprintf.cpp | 4 | ||||
-rw-r--r-- | src/assistant/clucene/qclucene-config_p.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/assistant/3rdparty/clucene/src/CLucene/config/repl_tprintf.cpp b/src/assistant/3rdparty/clucene/src/CLucene/config/repl_tprintf.cpp index 62cecb78b..2d9b5be0c 100644 --- a/src/assistant/3rdparty/clucene/src/CLucene/config/repl_tprintf.cpp +++ b/src/assistant/3rdparty/clucene/src/CLucene/config/repl_tprintf.cpp @@ -100,7 +100,11 @@ void lucene_vfnwprintf(StringBuffer* buffer, size_t count, const wchar_t * forma size_t v; size_t len = tmp->length(); for (size_t i=0;i<len;i++){ +#if !defined(__ANDROID__) && !defined(ANDROID) v = wctomb(ob,*pointer); +#else + v = wcrtomb(ob,*pointer,0); +#endif // __ANDROID__ if ( v > 0 ){ ob[v]='\0'; fputs(ob,stdout); diff --git a/src/assistant/clucene/qclucene-config_p.h b/src/assistant/clucene/qclucene-config_p.h index 4b098bcf5..f3531a64a 100644 --- a/src/assistant/clucene/qclucene-config_p.h +++ b/src/assistant/clucene/qclucene-config_p.h @@ -416,7 +416,7 @@ configure. #define _CL_HAVE_WCSTOD 1 #endif -#if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C) && !defined(__HP_aCC) +#if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C) && !defined(__HP_aCC) && !defined(Q_OS_ANDROID) /* Define to 1 if you have the `wcstoll' function. */ # ifndef _CL_HAVE_WCSTOLL # define _CL_HAVE_WCSTOLL 1 |