Resolve a number of compilation issues with INTEGRITY

First, #ifdef'ed out getpwuid_r() and getpwgid_r() usage since users/groups support is not in in single-process Posix mode.
Also, correct a typo and add missing files to io.pri.
Update documentation to disable libtiff which won't compile until ibtiff itself is updated, and add back -no-exceptions in the sample command line. And add a line to compile host tools.
Add a dummy QT_OPEN_LARGEFILE definition in qplatformdefs.h since there is code that requires it.
Move definition of getGlyph() after the definition of qHash(GlyphAndSubPixelPosition).

Merge-request: 2686
Reviewed-by: ossi
(cherry picked from commit 8fe04a14b1f3688c9ce0933ebec0c28616595d93)
Change-Id: I8fe04a14b1f3688c9ce0933ebec0c28616595d93
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
bb10
Rolland Dudemaine 2011-09-19 17:03:22 +02:00 committed by Qt by Nokia
parent d645ff182b
commit 8fd2801a1f
4 changed files with 17 additions and 7 deletions

View File

@ -89,6 +89,7 @@
#define QT_TRUNCATE ::truncate
#define QT_FTRUNCATE ::ftruncate
#define QT_LSEEK ::lseek
#define QT_OPEN_LARGEFILE 0
#endif
#ifdef QT_LARGEFILE_SUPPORT

View File

@ -126,5 +126,7 @@ win32 {
}
integrity {
SOURCES += io/qfsfileengine_unix.cpp \
io/qfsfileengine_iterator_unix.cpp
io/qfsfileengine_iterator.cpp \
io/qfilesystemengine_unix.cpp \
io/qfilesystemiterator_unix.cpp
}

View File

@ -259,11 +259,13 @@ QString QFileSystemEngine::resolveUserName(uint userId)
#endif
struct passwd *pw = 0;
#if !defined(Q_OS_INTEGRITY)
#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)
struct passwd entry;
getpwuid_r(userId, &entry, buf.data(), buf.size(), &pw);
#else
pw = getpwuid(userId);
#endif
#endif
if (pw)
return QFile::decodeName(QByteArray(pw->pw_name));
@ -281,6 +283,7 @@ QString QFileSystemEngine::resolveGroupName(uint groupId)
#endif
struct group *gr = 0;
#if !defined(Q_OS_INTEGRITY)
#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD)
size_max = sysconf(_SC_GETGR_R_SIZE_MAX);
if (size_max == -1)
@ -299,6 +302,7 @@ QString QFileSystemEngine::resolveGroupName(uint groupId)
}
#else
gr = getgrgid(groupId);
#endif
#endif
if (gr)
return QFile::decodeName(QByteArray(gr->gr_name));

View File

@ -196,12 +196,7 @@ public:
inline bool useFastGlyphData(glyph_t index, QFixed subPixelPosition) const {
return (index < 256 && subPixelPosition == 0);
}
inline Glyph *getGlyph(glyph_t index, QFixed subPixelPosition = 0) const
{
if (useFastGlyphData(index, subPixelPosition))
return fast_glyph_data[index];
return glyph_data.value(GlyphAndSubPixelPosition(index, subPixelPosition));
}
inline Glyph *getGlyph(glyph_t index, QFixed subPixelPosition = 0) const;
void setGlyph(glyph_t index, QFixed spp, Glyph *glyph);
private:
@ -360,6 +355,14 @@ inline uint qHash(const QFontEngineFT::GlyphAndSubPixelPosition &g)
return (g.glyph << 8) | (g.subPixelPosition * 10).round().toInt();
}
inline QFontEngineFT::Glyph *QFontEngineFT::QGlyphSet::getGlyph(glyph_t index, QFixed subPixelPosition) const
{
if (useFastGlyphData(index, subPixelPosition))
return fast_glyph_data[index];
return glyph_data.value(GlyphAndSubPixelPosition(index, subPixelPosition));
}
QT_END_NAMESPACE
#endif // QT_NO_FREETYPE