Android: Fix for compilation error in clucene.
authorChristian Strømme <christian.stromme@digia.com>
Mon, 6 May 2013 16:26:18 +0000 (18:26 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 7 May 2013 14:47:41 +0000 (16:47 +0200)
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>
src/assistant/3rdparty/clucene/src/CLucene/config/repl_tprintf.cpp
src/assistant/clucene/qclucene-config_p.h

index 62cecb7..2d9b5be 100644 (file)
@@ -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);
index 4b098bc..f3531a6 100644 (file)
@@ -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