diff options
-rw-r--r-- | src/3rdparty/libtiff.pri | 3 | ||||
-rw-r--r-- | src/plugins/imageformats/tiff/qfunctions_wince.cpp | 68 | ||||
-rw-r--r-- | src/plugins/imageformats/tiff/tiff.pro | 1 |
3 files changed, 70 insertions, 2 deletions
diff --git a/src/3rdparty/libtiff.pri b/src/3rdparty/libtiff.pri index 9e743f0..3479d85 100644 --- a/src/3rdparty/libtiff.pri +++ b/src/3rdparty/libtiff.pri @@ -34,8 +34,7 @@ SOURCES += \ $$PWD/libtiff/libtiff/tif_write.c \ $$PWD/libtiff/libtiff/tif_zip.c -wince*: SOURCES += $$PWD/../corelib/kernel/qfunctions_wince.cpp \ - $$PWD/libtiff/libtiff/tif_wince.c +wince*: SOURCES += $$PWD/libtiff/libtiff/tif_wince.c win32: SOURCES += $$PWD/libtiff/libtiff/tif_win32.c else: SOURCES += $$PWD/libtiff/libtiff/tif_unix.c android: SOURCES += $$PWD/libtiff/port/lfind.c diff --git a/src/plugins/imageformats/tiff/qfunctions_wince.cpp b/src/plugins/imageformats/tiff/qfunctions_wince.cpp new file mode 100644 index 0000000..d4ea364 --- /dev/null +++ b/src/plugins/imageformats/tiff/qfunctions_wince.cpp @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#ifdef _WIN32_WCE //Q_OS_WINCE + +#include "qplatformdefs.h" + +QT_USE_NAMESPACE + +#ifdef __cplusplus +extern "C" { +#endif + +void *lfind(const void* key, const void* base, size_t* elements, size_t size, + int (__cdecl *compare)(const void*, const void*)) +{ + const char* current = (char*) base; + const char* const end = (char*) (current + (*elements) * size); + while (current != end) { + if (compare(current, key) == 0) + return (void*)current; + current += size; + } + return 0; +} + + +#ifdef __cplusplus +} // extern "C" +#endif +#endif // Q_OS_WINCE diff --git a/src/plugins/imageformats/tiff/tiff.pro b/src/plugins/imageformats/tiff/tiff.pro index 66eea8c..353e3f3 100644 --- a/src/plugins/imageformats/tiff/tiff.pro +++ b/src/plugins/imageformats/tiff/tiff.pro @@ -6,6 +6,7 @@ load(qt_plugin) HEADERS += qtiffhandler_p.h SOURCES += main.cpp qtiffhandler.cpp +wince*: SOURCES += qfunctions_wince.cpp OTHER_FILES += tiff.json config_libtiff { |