diff options
author | João Abecasis <joao@trolltech.com> | 2010-01-15 11:26:17 (GMT) |
---|---|---|
committer | João Abecasis <joao@trolltech.com> | 2010-01-22 16:50:19 (GMT) |
commit | 784946b8ea8b932924a831504387661d66170ca0 (patch) | |
tree | 4e369a848b163d6f28e23f4ff065cc0999a1d60a | |
parent | 44232675a87c766b48d8f3d70d04dee6538a6caf (diff) | |
download | Qt-784946b8ea8b932924a831504387661d66170ca0.zip Qt-784946b8ea8b932924a831504387661d66170ca0.tar.gz Qt-784946b8ea8b932924a831504387661d66170ca0.tar.bz2 |
Refactor common C89 support out of individual qplatformdefs.h
Reviewed-by: Thiago Macieira
27 files changed, 231 insertions, 179 deletions
diff --git a/mkspecs/common/c89/qplatformdefs.h b/mkspecs/common/c89/qplatformdefs.h new file mode 100644 index 0000000..c6a8e14 --- /dev/null +++ b/mkspecs/common/c89/qplatformdefs.h @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef Q_C89_QPLATFORMDEFS_H +#define Q_C89_QPLATFORMDEFS_H + +// #include <stdio.h> + +#define QT_FPOS_T fpos_t +#define QT_OFF_T long + +#define QT_FOPEN ::fopen +#define QT_FSEEK ::fseek +#define QT_FTELL ::ftell +#define QT_FGETPOS ::fgetpos +#define QT_FSETPOS ::fsetpos + +#endif // include guard diff --git a/mkspecs/cygwin-g++/qplatformdefs.h b/mkspecs/cygwin-g++/qplatformdefs.h index 9b3be62..2927945 100644 --- a/mkspecs/cygwin-g++/qplatformdefs.h +++ b/mkspecs/cygwin-g++/qplatformdefs.h @@ -81,6 +81,7 @@ //#include <windows.h> #include <netinet/in.h> +#include "../common/c89/qplatformdefs.h" #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat @@ -113,15 +114,7 @@ #define QT_OPEN_CREAT O_CREAT #define QT_OPEN_TRUNC O_TRUNC #define QT_OPEN_APPEND O_APPEND -#define QT_FOPEN ::fopen -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos #define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t -#define QT_OFF_T long #define QT_SIGNAL_RETTYPE void #define QT_SIGNAL_ARGS int diff --git a/mkspecs/darwin-g++/qplatformdefs.h b/mkspecs/darwin-g++/qplatformdefs.h index 5aea69f..4a378ba 100644 --- a/mkspecs/darwin-g++/qplatformdefs.h +++ b/mkspecs/darwin-g++/qplatformdefs.h @@ -74,15 +74,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/freebsd-g++/qplatformdefs.h b/mkspecs/freebsd-g++/qplatformdefs.h index b5d1b2f..d9c6903 100644 --- a/mkspecs/freebsd-g++/qplatformdefs.h +++ b/mkspecs/freebsd-g++/qplatformdefs.h @@ -76,15 +76,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/hurd-g++/qplatformdefs.h b/mkspecs/hurd-g++/qplatformdefs.h index 68ee2d8..41ced99 100644 --- a/mkspecs/hurd-g++/qplatformdefs.h +++ b/mkspecs/hurd-g++/qplatformdefs.h @@ -82,15 +82,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h index bdb492e..93ed4d5 100644 --- a/mkspecs/lynxos-g++/qplatformdefs.h +++ b/mkspecs/lynxos-g++/qplatformdefs.h @@ -75,15 +75,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/macx-g++/qplatformdefs.h b/mkspecs/macx-g++/qplatformdefs.h index 03bdce9..890e4bb 100644 --- a/mkspecs/macx-g++/qplatformdefs.h +++ b/mkspecs/macx-g++/qplatformdefs.h @@ -75,15 +75,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/macx-g++40/qplatformdefs.h b/mkspecs/macx-g++40/qplatformdefs.h index 03bdce9..890e4bb 100644 --- a/mkspecs/macx-g++40/qplatformdefs.h +++ b/mkspecs/macx-g++40/qplatformdefs.h @@ -75,15 +75,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/macx-g++42/qplatformdefs.h b/mkspecs/macx-g++42/qplatformdefs.h index 03bdce9..890e4bb 100644 --- a/mkspecs/macx-g++42/qplatformdefs.h +++ b/mkspecs/macx-g++42/qplatformdefs.h @@ -75,15 +75,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/macx-llvm/qplatformdefs.h b/mkspecs/macx-llvm/qplatformdefs.h index 03bdce9..890e4bb 100644 --- a/mkspecs/macx-llvm/qplatformdefs.h +++ b/mkspecs/macx-llvm/qplatformdefs.h @@ -75,15 +75,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/macx-pbuilder/qplatformdefs.h b/mkspecs/macx-pbuilder/qplatformdefs.h index c8e49af..7a04926 100644 --- a/mkspecs/macx-pbuilder/qplatformdefs.h +++ b/mkspecs/macx-pbuilder/qplatformdefs.h @@ -75,15 +75,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/macx-xcode/qplatformdefs.h b/mkspecs/macx-xcode/qplatformdefs.h index 03bdce9..890e4bb 100644 --- a/mkspecs/macx-xcode/qplatformdefs.h +++ b/mkspecs/macx-xcode/qplatformdefs.h @@ -75,15 +75,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/macx-xlc/qplatformdefs.h b/mkspecs/macx-xlc/qplatformdefs.h index 43c3158..b78d523 100644 --- a/mkspecs/macx-xlc/qplatformdefs.h +++ b/mkspecs/macx-xlc/qplatformdefs.h @@ -75,15 +75,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/netbsd-g++/qplatformdefs.h b/mkspecs/netbsd-g++/qplatformdefs.h index f455a86..7816703 100644 --- a/mkspecs/netbsd-g++/qplatformdefs.h +++ b/mkspecs/netbsd-g++/qplatformdefs.h @@ -75,15 +75,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/openbsd-g++/qplatformdefs.h b/mkspecs/openbsd-g++/qplatformdefs.h index 0a9ea21..db957c2 100644 --- a/mkspecs/openbsd-g++/qplatformdefs.h +++ b/mkspecs/openbsd-g++/qplatformdefs.h @@ -76,15 +76,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/sco-cc/qplatformdefs.h b/mkspecs/sco-cc/qplatformdefs.h index b5427c9..df12900 100644 --- a/mkspecs/sco-cc/qplatformdefs.h +++ b/mkspecs/sco-cc/qplatformdefs.h @@ -76,15 +76,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/sco-g++/qplatformdefs.h b/mkspecs/sco-g++/qplatformdefs.h index 058ab78..fe3c1ee 100644 --- a/mkspecs/sco-g++/qplatformdefs.h +++ b/mkspecs/sco-g++/qplatformdefs.h @@ -80,15 +80,18 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko #define QT_FTELL ::ftello -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/tru64-cxx/qplatformdefs.h b/mkspecs/tru64-cxx/qplatformdefs.h index 54fb139..dc18e1d 100644 --- a/mkspecs/tru64-cxx/qplatformdefs.h +++ b/mkspecs/tru64-cxx/qplatformdefs.h @@ -78,15 +78,13 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t +#include "../common/c89/qplatformdefs.h" + +#undef QT_OFF_T #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/tru64-g++/qplatformdefs.h b/mkspecs/tru64-g++/qplatformdefs.h index 44c23f1..485879e 100644 --- a/mkspecs/tru64-g++/qplatformdefs.h +++ b/mkspecs/tru64-g++/qplatformdefs.h @@ -78,15 +78,13 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t +#include "../common/c89/qplatformdefs.h" + +#undef QT_OFF_T #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/unixware-cc/qplatformdefs.h b/mkspecs/unixware-cc/qplatformdefs.h index e314713..cdcd3a3 100644 --- a/mkspecs/unixware-cc/qplatformdefs.h +++ b/mkspecs/unixware-cc/qplatformdefs.h @@ -76,15 +76,13 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t +#include "../common/c89/qplatformdefs.h" + +#undef QT_OFF_T #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/unixware-g++/qplatformdefs.h b/mkspecs/unixware-g++/qplatformdefs.h index e314713..cdcd3a3 100644 --- a/mkspecs/unixware-g++/qplatformdefs.h +++ b/mkspecs/unixware-g++/qplatformdefs.h @@ -76,15 +76,13 @@ #include <net/if.h> #endif -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_MMAP ::mmap -#define QT_FPOS_T fpos_t +#include "../common/c89/qplatformdefs.h" + +#undef QT_OFF_T #define QT_OFF_T off_t +#define QT_MMAP ::mmap + #define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat #define QT_STAT ::stat diff --git a/mkspecs/win32-borland/qplatformdefs.h b/mkspecs/win32-borland/qplatformdefs.h index 4efae9a..d8fa4c2 100644 --- a/mkspecs/win32-borland/qplatformdefs.h +++ b/mkspecs/win32-borland/qplatformdefs.h @@ -96,21 +96,16 @@ # define QT_STAT_LNK _S_IFLNK #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + #ifdef QT_LARGEFILE_SUPPORT +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::_fseeki64 #define QT_FTELL ::_ftelli64 -#else -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#endif -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#ifdef QT_LARGEFILE_SUPPORT #define QT_OFF_T __int64 -#else -#define QT_OFF_T long #endif #define QT_FILENO _fileno diff --git a/mkspecs/win32-g++/qplatformdefs.h b/mkspecs/win32-g++/qplatformdefs.h index 12828d1..36333b6 100644 --- a/mkspecs/win32-g++/qplatformdefs.h +++ b/mkspecs/win32-g++/qplatformdefs.h @@ -133,21 +133,16 @@ typedef enum { # define QT_OPEN_BINARY _O_BINARY #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + #ifdef QT_LARGEFILE_SUPPORT +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::fseeko64 #define QT_FTELL ::ftello64 -#else -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#endif -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#ifdef QT_LARGEFILE_SUPPORT #define QT_OFF_T off64_t -#else -#define QT_OFF_T long #endif #define QT_SIGNAL_ARGS int diff --git a/mkspecs/win32-icc/qplatformdefs.h b/mkspecs/win32-icc/qplatformdefs.h index 6abfef2..833846f 100644 --- a/mkspecs/win32-icc/qplatformdefs.h +++ b/mkspecs/win32-icc/qplatformdefs.h @@ -113,21 +113,19 @@ # define QT_OPEN_BINARY _O_BINARY #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + #if defined(QT_LARGEFILE_SUPPORT) && _MSC_VER > 1310 +#undef QT_FSEEK +#undef QT_FTELL + #define QT_FSEEK ::_fseeki64 #define QT_FTELL ::_ftelli64 -#else -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell #endif -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#ifdef QT_LARGEFILE_SUPPORT + +#if defined(QT_LARGEFILE_SUPPORT) +#undef QT_OFF_T #define QT_OFF_T __int64 -#else -#define QT_OFF_T long #endif #define QT_SIGNAL_ARGS int diff --git a/mkspecs/win32-msvc.net/qplatformdefs.h b/mkspecs/win32-msvc.net/qplatformdefs.h index dcfaec5..05584c9 100644 --- a/mkspecs/win32-msvc.net/qplatformdefs.h +++ b/mkspecs/win32-msvc.net/qplatformdefs.h @@ -113,23 +113,16 @@ # define QT_OPEN_BINARY _O_BINARY #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + #ifdef QT_LARGEFILE_SUPPORT +#undef QT_FTELL +#undef QT_OFF_T + // 64-bit versions of fseek/ftell not always available. E.g., when linking // dynamically to CRT (/MT) -#define QT_FSEEK ::fseek #define QT_FTELL (QT_OFF_T)::ftell -#else -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#endif -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#ifdef QT_LARGEFILE_SUPPORT #define QT_OFF_T __int64 -#else -#define QT_OFF_T long #endif #define QT_SIGNAL_ARGS int diff --git a/mkspecs/win32-msvc/qplatformdefs.h b/mkspecs/win32-msvc/qplatformdefs.h index 5dee28c..abb5894 100644 --- a/mkspecs/win32-msvc/qplatformdefs.h +++ b/mkspecs/win32-msvc/qplatformdefs.h @@ -113,21 +113,11 @@ # define QT_OPEN_BINARY _O_BINARY #endif -#define QT_FOPEN ::fopen -#ifdef QT_LARGEFILE_SUPPORT -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#else -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#endif -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t +#include "../common/c89/qplatformdefs.h" + #ifdef QT_LARGEFILE_SUPPORT +#undef QT_OFF_T #define QT_OFF_T __int64 -#else -#define QT_OFF_T long #endif #define QT_SIGNAL_ARGS int diff --git a/mkspecs/win32-msvc2005/qplatformdefs.h b/mkspecs/win32-msvc2005/qplatformdefs.h index b87ea48..33360b7 100644 --- a/mkspecs/win32-msvc2005/qplatformdefs.h +++ b/mkspecs/win32-msvc2005/qplatformdefs.h @@ -113,21 +113,16 @@ # define QT_OPEN_BINARY _O_BINARY #endif -#define QT_FOPEN ::fopen +#include "../common/c89/qplatformdefs.h" + #ifdef QT_LARGEFILE_SUPPORT +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + #define QT_FSEEK ::_fseeki64 #define QT_FTELL ::_ftelli64 -#else -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#endif -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos -#define QT_FPOS_T fpos_t -#ifdef QT_LARGEFILE_SUPPORT #define QT_OFF_T __int64 -#else -#define QT_OFF_T long #endif #define QT_SIGNAL_ARGS int |