Version: (using KDE KDE 3.1.92) Installed from: Compiled From Sources Compiler: gcc version 2.95.3 20010315 (release) OS: Solaris Trying to compile kdepim-3.2.0-alpha2 stops in kmail: source='kmmsgbase.cpp' object='kmmsgbase.lo' libtool=yes \ depfile='.deps/kmmsgbase.Plo' tmpdepfile='.deps/kmmsgbase.TPlo' \ depmode=gcc /bin/ksh ../admin/depcomp \ /bin/ksh ../libtool --silent --mode=compile --tag=CXX g++ -pipe -DHAVE_CONFIG_H -I. -I. -I.. -I../libkdenetwork -I../libkdepim -I../libksieve -I../mimelib -I../ktnef -I.. -I/vol/kde-cvs/include -I/vol/qt-3.2.1/include -I/vol/local/include -I/vol/graphics/include -I/vol/palmpilot/include -DQT_THREAD_SUPPORT -I/vol/palmpilot/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4 -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -O2 -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -c -o kmmsgbase.lo `test -f 'kmmsgbase.cpp' || echo './'`kmmsgbase.cpp kmmsgbase.cpp: In method `const uchar * KMMsgBase::asIndexString(int &) const': kmmsgbase.cpp:1170: passing `const QChar *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1172: passing `long unsigned int *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1176: passing `const QChar *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1178: passing `const QChar *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1180: passing `const QChar *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1182: passing `const QChar *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1184: passing `const QChar *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1186: passing `const QChar *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1188: passing `long unsigned int *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1190: passing `long unsigned int *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1192: passing `long unsigned int *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1194: passing `long unsigned int *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1196: passing `long unsigned int *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1199: passing `const QChar *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1202: passing `const QChar *' as argument 1 of `swab(const char *, char *, int)' kmmsgbase.cpp:1205: passing `long unsigned int *' as argument 1 of `swab(const char *, char *, int)' make[1]: *** [kmmsgbase.lo] Error 1 make[1]: Leaving directory `/vol/src/kde/cvs/kdepim/kmail' make: *** [all-recursive] Error 1
Created attachment 2648 [details] patch for kdepim/kmail/kmmsgbase.cpp According to swab(2) (if you neglect the obvious mistake in there ;-) there are two variants of the swab() function: SYNOPSIS Default #include <stdlib.h> void swab(const void *src, char *dest, ssize_t nbytes); XPG4, SUS, SUSv2 #include <unistd.h> void swab(const void *src, void *dest, ssize_t nbytes); The latter one is only available when _XOPEN_SOURCE is #defined and if _XOPEN_VERSION - 0 >= 4. Since I'm not sure about the implications of defining these symbols, the attached patch introduces an appropriate cast for the first one (which takes "char *" as arguments).
Subject: kdepim/kmail CVS commit by mutz: Fix Solaris compile errors reported and patched by Torsten Kasch <tk (at ) Genetik (dot) uni-bielefeld (dot) de> CCMAIL: 65234-done@bugs.kde.org, 65232-done@bugs.kde.org M +3 -3 kmfolderindex.cpp 1.11 M +1 -1 kmmsgbase.cpp 1.160 --- kdepim/kmail/kmfolderindex.cpp #1.10:1.11 @@ -371,5 +371,5 @@ bool KMFolderIndex::updateIndexStreamPtr if(just_close) { if(mIndexStreamPtr) - munmap(mIndexStreamPtr, mIndexStreamPtrLength); + munmap((char *)mIndexStreamPtr, mIndexStreamPtrLength); mIndexStreamPtr = 0; mIndexStreamPtrLength = 0; @@ -381,5 +381,5 @@ bool KMFolderIndex::updateIndexStreamPtr if(fstat(fileno(mIndexStream), &stat_buf) == -1) { if(mIndexStreamPtr) - munmap(mIndexStreamPtr, mIndexStreamPtrLength); + munmap((char *)mIndexStreamPtr, mIndexStreamPtrLength); mIndexStreamPtr = 0; mIndexStreamPtrLength = 0; @@ -387,5 +387,5 @@ bool KMFolderIndex::updateIndexStreamPtr } if(mIndexStreamPtr) - munmap(mIndexStreamPtr, mIndexStreamPtrLength); + munmap((char *)mIndexStreamPtr, mIndexStreamPtrLength); mIndexStreamPtrLength = stat_buf.st_size; mIndexStreamPtr = (uchar *)mmap(0, mIndexStreamPtrLength, PROT_READ, MAP_SHARED, --- kdepim/kmail/kmmsgbase.cpp #1.159:1.160 @@ -1145,5 +1145,5 @@ off_t KMMsgBase::getLongPart(MsgPartType #ifndef WORDS_BIGENDIAN // We need to use swab to swap bytes to network byte order -#define memcpy_networkorder(to, from, len) swab(from, to, len) +#define memcpy_networkorder(to, from, len) swab((char *)(from), (char *)(to), len) #else // We're already in network byte order