From 0f8519368e2cfdaddb49cea60096fd03df69fd62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Fri, 15 Jan 2010 18:05:06 +0100 Subject: Refactor common POSIX support out of individual qplatformdefs.h POSIX header incorporates previously refactored X/Open LFS extensions. Reviewed-by: Thiago Macieira --- mkspecs/aix-g++-64/qplatformdefs.h | 37 +----- mkspecs/aix-g++/qplatformdefs.h | 37 +----- mkspecs/aix-xlc-64/qplatformdefs.h | 31 +---- mkspecs/aix-xlc/qplatformdefs.h | 37 +----- mkspecs/common/posix/qplatformdefs.h | 144 +++++++++++++++++++++ mkspecs/common/symbian/qplatformdefs.h | 39 +----- mkspecs/common/xopen-lfs/qplatformdefs.h | 97 -------------- mkspecs/cygwin-g++/qplatformdefs.h | 43 +----- mkspecs/darwin-g++/qplatformdefs.h | 49 +------ mkspecs/freebsd-g++/qplatformdefs.h | 54 +------- mkspecs/hpux-acc-64/qplatformdefs.h | 35 +---- mkspecs/hpux-acc-o64/qplatformdefs.h | 33 +---- mkspecs/hpux-acc/qplatformdefs.h | 35 +---- mkspecs/hpux-g++-64/qplatformdefs.h | 32 +---- mkspecs/hpux-g++/qplatformdefs.h | 33 +---- mkspecs/hpuxi-acc-32/qplatformdefs.h | 34 +---- mkspecs/hpuxi-acc-64/qplatformdefs.h | 34 +---- mkspecs/hpuxi-g++-64/qplatformdefs.h | 34 +---- mkspecs/hurd-g++/qplatformdefs.h | 49 +------ mkspecs/irix-cc-64/qplatformdefs.h | 34 +---- mkspecs/irix-cc/qplatformdefs.h | 34 +---- mkspecs/irix-g++/qplatformdefs.h | 46 ++----- mkspecs/linux-cxx/qplatformdefs.h | 36 +----- mkspecs/linux-ecc-64/qplatformdefs.h | 36 +----- mkspecs/linux-g++/qplatformdefs.h | 34 +---- mkspecs/linux-kcc/qplatformdefs.h | 36 +----- mkspecs/linux-llvm/qplatformdefs.h | 34 +---- mkspecs/linux-lsb-g++/qplatformdefs.h | 43 ++---- mkspecs/linux-pgcc/qplatformdefs.h | 36 +----- mkspecs/lynxos-g++/qplatformdefs.h | 55 +------- mkspecs/macx-g++/qplatformdefs.h | 57 ++------ mkspecs/macx-g++40/qplatformdefs.h | 57 ++------ mkspecs/macx-g++42/qplatformdefs.h | 57 ++------ mkspecs/macx-llvm/qplatformdefs.h | 57 ++------ mkspecs/macx-pbuilder/qplatformdefs.h | 58 ++------- mkspecs/macx-xcode/qplatformdefs.h | 57 ++------ mkspecs/macx-xlc/qplatformdefs.h | 51 +------- mkspecs/netbsd-g++/qplatformdefs.h | 54 +------- mkspecs/openbsd-g++/qplatformdefs.h | 54 +------- mkspecs/sco-cc/qplatformdefs.h | 50 +------ mkspecs/sco-g++/qplatformdefs.h | 50 +------ mkspecs/solaris-cc-64/qplatformdefs.h | 35 +---- mkspecs/solaris-cc/qplatformdefs.h | 42 ++---- mkspecs/solaris-g++-64/qplatformdefs.h | 39 +----- mkspecs/solaris-g++/qplatformdefs.h | 38 ++---- mkspecs/tru64-cxx/qplatformdefs.h | 56 ++------ mkspecs/tru64-g++/qplatformdefs.h | 56 ++------ mkspecs/unixware-cc/qplatformdefs.h | 45 +------ mkspecs/unixware-g++/qplatformdefs.h | 45 +------ mkspecs/unsupported/qnx-g++/qplatformdefs.h | 31 +---- .../vxworks-simpentium-g++/qplatformdefs.h | 38 ++---- 51 files changed, 456 insertions(+), 1882 deletions(-) create mode 100644 mkspecs/common/posix/qplatformdefs.h delete mode 100644 mkspecs/common/xopen-lfs/qplatformdefs.h diff --git a/mkspecs/aix-g++-64/qplatformdefs.h b/mkspecs/aix-g++-64/qplatformdefs.h index 0a2ef22..4421ba4 100644 --- a/mkspecs/aix-g++-64/qplatformdefs.h +++ b/mkspecs/aix-g++-64/qplatformdefs.h @@ -81,45 +81,22 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#undef QT_SOCKLEN_T #ifdef _AIX43 // AIX 4.3 and better -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #elif _AIX42 // AIX 4.2 -#define QT_SOCKLEN_T size_t +#define QT_SOCKLEN_T size_t #else // AIX 4.1 -#define QT_SOCKLEN_T size_t +#define QT_SOCKLEN_T size_t // override -#define QT_SOCKOPTLEN_T int +#define QT_SOCKOPTLEN_T int #endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) diff --git a/mkspecs/aix-g++/qplatformdefs.h b/mkspecs/aix-g++/qplatformdefs.h index 0a2ef22..4421ba4 100644 --- a/mkspecs/aix-g++/qplatformdefs.h +++ b/mkspecs/aix-g++/qplatformdefs.h @@ -81,45 +81,22 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#undef QT_SOCKLEN_T #ifdef _AIX43 // AIX 4.3 and better -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #elif _AIX42 // AIX 4.2 -#define QT_SOCKLEN_T size_t +#define QT_SOCKLEN_T size_t #else // AIX 4.1 -#define QT_SOCKLEN_T size_t +#define QT_SOCKLEN_T size_t // override -#define QT_SOCKOPTLEN_T int +#define QT_SOCKOPTLEN_T int #endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) diff --git a/mkspecs/aix-xlc-64/qplatformdefs.h b/mkspecs/aix-xlc-64/qplatformdefs.h index c28f04a..a52b3d3 100644 --- a/mkspecs/aix-xlc-64/qplatformdefs.h +++ b/mkspecs/aix-xlc-64/qplatformdefs.h @@ -77,36 +77,11 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" +// QT_SOCKLEN_T // Only AIX 4.3 and better support 64-bit -#define QT_SOCKLEN_T socklen_t #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) // Only AIX 4.3 and better support 64-bit diff --git a/mkspecs/aix-xlc/qplatformdefs.h b/mkspecs/aix-xlc/qplatformdefs.h index f789fda..97cd0a1 100644 --- a/mkspecs/aix-xlc/qplatformdefs.h +++ b/mkspecs/aix-xlc/qplatformdefs.h @@ -77,45 +77,22 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#undef QT_SOCKLEN_T #ifdef _AIX43 // AIX 4.3 and better -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #elif _AIX42 // AIX 4.2 -#define QT_SOCKLEN_T size_t +#define QT_SOCKLEN_T size_t #else // AIX 4.1 -#define QT_SOCKLEN_T size_t +#define QT_SOCKLEN_T size_t // override -#define QT_SOCKOPTLEN_T int +#define QT_SOCKOPTLEN_T int #endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) diff --git a/mkspecs/common/posix/qplatformdefs.h b/mkspecs/common/posix/qplatformdefs.h new file mode 100644 index 0000000..fe50de2 --- /dev/null +++ b/mkspecs/common/posix/qplatformdefs.h @@ -0,0 +1,144 @@ +/**************************************************************************** +** +** 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_POSIX_QPLATFORMDEFS_H +#define Q_POSIX_QPLATFORMDEFS_H + +#include + +#include +#include +#include + +#if defined(QT_USE_XOPEN_LFS_EXTENSIONS) && defined(QT_LARGEFILE_SUPPORT) + +#define QT_STATBUF struct stat64 +#define QT_FPOS_T fpos64_t +#define QT_OFF_T off64_t + +#define QT_STAT ::stat64 +#define QT_LSTAT ::lstat64 +#define QT_TRUNCATE ::truncate64 + +// File I/O +#define QT_OPEN ::open64 +#define QT_LSEEK ::lseek64 +#define QT_FSTAT ::fstat64 +#define QT_FTRUNCATE ::ftruncate64 + +// Standard C89 +#define QT_FOPEN ::fopen64 +#define QT_FSEEK ::fseeko64 +#define QT_FTELL ::ftello64 +#define QT_FGETPOS ::fgetpos64 +#define QT_FSETPOS ::fsetpos64 + +#define QT_MMAP ::mmap64 + +#else // !defined(QT_USE_XOPEN_LFS_EXTENSIONS) || !defined(QT_LARGEFILE_SUPPORT) + +#include "../c89/qplatformdefs.h" + +#define QT_STATBUF struct stat + +#define QT_STAT ::stat +#define QT_LSTAT ::lstat +#define QT_TRUNCATE ::truncate + +// File I/O +#define QT_OPEN ::open +#define QT_LSEEK ::lseek +#define QT_FSTAT ::fstat +#define QT_FTRUNCATE ::ftruncate + +// Posix extensions to C89 +#if !defined(QT_USE_XOPEN_LFS_EXTENSIONS) && !defined(QT_NO_USE_FSEEKO) +#undef QT_OFF_T +#undef QT_FSEEK +#undef QT_FTELL + +#define QT_OFF_T off_t + +#define QT_FSEEK ::fseeko +#define QT_FTELL ::ftello +#endif + +#define QT_MMAP ::mmap + +#endif // !defined (QT_USE_XOPEN_LFS_EXTENSIONS) || !defined(QT_LARGEFILE_SUPPORT) + +#define QT_STAT_MASK S_IFMT +#define QT_STAT_REG S_IFREG +#define QT_STAT_DIR S_IFDIR +#define QT_STAT_LNK S_IFLNK + +#define QT_ACCESS ::access +#define QT_GETCWD ::getcwd +#define QT_CHDIR ::chdir +#define QT_MKDIR ::mkdir +#define QT_RMDIR ::rmdir + +// File I/O +#define QT_CLOSE ::close +#define QT_READ ::read +#define QT_WRITE ::write + +#define QT_OPEN_LARGEFILE O_LARGEFILE +#define QT_OPEN_RDONLY O_RDONLY +#define QT_OPEN_WRONLY O_WRONLY +#define QT_OPEN_RDWR O_RDWR +#define QT_OPEN_CREAT O_CREAT +#define QT_OPEN_TRUNC O_TRUNC +#define QT_OPEN_APPEND O_APPEND + +// Posix extensions to C89 +#define QT_FILENO fileno + +#define QT_SOCKLEN_T socklen_t + +#define QT_SOCKET_CONNECT ::connect +#define QT_SOCKET_BIND ::bind + +#define QT_SIGNAL_RETTYPE void +#define QT_SIGNAL_ARGS int +#define QT_SIGNAL_IGNORE SIG_IGN + +#endif // include guard diff --git a/mkspecs/common/symbian/qplatformdefs.h b/mkspecs/common/symbian/qplatformdefs.h index 4d95fae..38a1314 100644 --- a/mkspecs/common/symbian/qplatformdefs.h +++ b/mkspecs/common/symbian/qplatformdefs.h @@ -84,48 +84,23 @@ #endif #include -#include "../xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../posix/qplatformdefs.h" #undef QT_OPEN_LARGEFILE -#define QT_OPEN_LARGEFILE 0 - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#undef QT_SOCKLEN_T + +#define QT_OPEN_LARGEFILE 0 #if (defined(__GLIBC__) && (__GLIBC__ >= 2)) || defined(Q_OS_SYMBIAN) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif - #if defined(__ISO_C_VISIBLE) && (__ISO_C_VISIBLE >= 1999) #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/common/xopen-lfs/qplatformdefs.h b/mkspecs/common/xopen-lfs/qplatformdefs.h deleted file mode 100644 index 2599d62..0000000 --- a/mkspecs/common/xopen-lfs/qplatformdefs.h +++ /dev/null @@ -1,97 +0,0 @@ -/**************************************************************************** -** -** 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_XOPEN_LFS_QPLATFORMDEFS_H -#define Q_XOPEN_LFS_QPLATFORMDEFS_H - -#ifdef QT_LARGEFILE_SUPPORT - -#define QT_STATBUF struct stat64 -#define QT_STATBUF4TSTAT struct stat64 -#define QT_FPOS_T fpos64_t -#define QT_OFF_T off64_t - -#define QT_STAT ::stat64 -#define QT_LSTAT ::lstat64 -#define QT_TRUNCATE ::truncate64 - -#define QT_OPEN ::open64 -#define QT_LSEEK ::lseek64 -#define QT_FSTAT ::fstat64 -#define QT_FTRUNCATE ::ftruncate64 - -#define QT_FOPEN ::fopen64 -#define QT_FSEEK ::fseeko64 -#define QT_FTELL ::ftello64 -#define QT_FGETPOS ::fgetpos64 -#define QT_FSETPOS ::fsetpos64 - -#define QT_MMAP ::mmap64 - -#else // !QT_LARGEFILE_SUPPORT - -#define QT_STATBUF struct stat -#define QT_STATBUF4TSTAT struct stat -#define QT_FPOS_T fpos_t -#define QT_OFF_T long - -#define QT_STAT ::stat -#define QT_LSTAT ::lstat -#define QT_TRUNCATE ::truncate - -#define QT_OPEN ::open -#define QT_LSEEK ::lseek -#define QT_FSTAT ::fstat -#define QT_FTRUNCATE ::ftruncate - -#define QT_FOPEN ::fopen -#define QT_FSEEK ::fseek -#define QT_FTELL ::ftell -#define QT_FGETPOS ::fgetpos -#define QT_FSETPOS ::fsetpos - -#define QT_MMAP ::mmap - -#endif // QT_LARGEFILE_SUPPORT - -#define QT_OPEN_LARGEFILE O_LARGEFILE - -#endif // include guard diff --git a/mkspecs/cygwin-g++/qplatformdefs.h b/mkspecs/cygwin-g++/qplatformdefs.h index 2927945..b64e126 100644 --- a/mkspecs/cygwin-g++/qplatformdefs.h +++ b/mkspecs/cygwin-g++/qplatformdefs.h @@ -81,51 +81,16 @@ //#include #include -#include "../common/c89/qplatformdefs.h" +#define QT_NO_USE_FSEEKO +#include "../common/posix/qplatformdefs.h" + +#undef QT_OPEN_LARGEFILE -#define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_OPEN ::open -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND -#define QT_MMAP ::mmap - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T socklen_t #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/darwin-g++/qplatformdefs.h b/mkspecs/darwin-g++/qplatformdefs.h index 4a378ba..2ee0698 100644 --- a/mkspecs/darwin-g++/qplatformdefs.h +++ b/mkspecs/darwin-g++/qplatformdefs.h @@ -74,55 +74,12 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T - -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat -#define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir +#undef QT_OPEN_LARGEFILE #define QT_OPEN_LARGEFILE 0 -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN -#define QT_SOCKLEN_T socklen_t +#define QT_STATBUF4TSTAT struct stat #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf diff --git a/mkspecs/freebsd-g++/qplatformdefs.h b/mkspecs/freebsd-g++/qplatformdefs.h index d9c6903..c0b7da6 100644 --- a/mkspecs/freebsd-g++/qplatformdefs.h +++ b/mkspecs/freebsd-g++/qplatformdefs.h @@ -76,62 +76,23 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T +#undef QT_OPEN_LARGEFILE +#undef QT_SOCKLEN_T -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat -#define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir #define QT_OPEN_LARGEFILE 0 -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN #if !defined(__DragonFly__) && (__FreeBSD_version < 400000) // FreeBSD 1.0 - 3.5.1 -# define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #else // FreeBSD 4.0 and better -# define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #endif +#define QT_STATBUF4TSTAT struct stat + #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf @@ -146,5 +107,4 @@ #define QT_AOUT_UNDERSCORE #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpux-acc-64/qplatformdefs.h b/mkspecs/hpux-acc-64/qplatformdefs.h index 933ffb7..f9789a8 100644 --- a/mkspecs/hpux-acc-64/qplatformdefs.h +++ b/mkspecs/hpux-acc-64/qplatformdefs.h @@ -76,38 +76,13 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" #undef QT_OPEN_LARGEFILE -#define QT_OPEN_LARGEFILE 0 - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T int +#undef QT_SOCKLEN_T +#define QT_OPEN_LARGEFILE 0 +#define QT_SOCKLEN_T int #endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpux-acc-o64/qplatformdefs.h b/mkspecs/hpux-acc-o64/qplatformdefs.h index 397d9aa..5237806 100644 --- a/mkspecs/hpux-acc-o64/qplatformdefs.h +++ b/mkspecs/hpux-acc-o64/qplatformdefs.h @@ -77,35 +77,10 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T int +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" +#undef QT_SOCKLEN_T +#define QT_SOCKLEN_T int #endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpux-acc/qplatformdefs.h b/mkspecs/hpux-acc/qplatformdefs.h index bec30bd..9ce08c6 100644 --- a/mkspecs/hpux-acc/qplatformdefs.h +++ b/mkspecs/hpux-acc/qplatformdefs.h @@ -79,38 +79,14 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" #undef QT_OPEN_LARGEFILE -#define QT_OPEN_LARGEFILE 0 - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#undef QT_SOCKLEN_T -#define QT_SOCKLEN_T int +#define QT_OPEN_LARGEFILE 0 +#define QT_SOCKLEN_T int // presence of _XOPEN_UNIX can be used to detect HP-UX 10 or higher #if !defined(_XOPEN_UNIX) @@ -118,5 +94,4 @@ #define select(a,b,c,d,e) select((a), (int *)(b), (int *)(c), (int *)(d), (e)) #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpux-g++-64/qplatformdefs.h b/mkspecs/hpux-g++-64/qplatformdefs.h index 54e3058..f3fbda5 100644 --- a/mkspecs/hpux-g++-64/qplatformdefs.h +++ b/mkspecs/hpux-g++-64/qplatformdefs.h @@ -76,35 +76,7 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T socklen_t - +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" #endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpux-g++/qplatformdefs.h b/mkspecs/hpux-g++/qplatformdefs.h index bb165f9..38e9408 100644 --- a/mkspecs/hpux-g++/qplatformdefs.h +++ b/mkspecs/hpux-g++/qplatformdefs.h @@ -78,35 +78,11 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T int +#undef QT_SOCKLEN_T +#define QT_SOCKLEN_T int // presence of _XOPEN_UNIX can be used to detect HP-UX 10 or higher #if !defined(_XOPEN_UNIX) @@ -114,5 +90,4 @@ #define select(a,b,c,d,e) select((a), (int *)(b), (int *)(c), (int *)(d), (e)) #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpuxi-acc-32/qplatformdefs.h b/mkspecs/hpuxi-acc-32/qplatformdefs.h index 7afb0fe..a0d2464 100644 --- a/mkspecs/hpuxi-acc-32/qplatformdefs.h +++ b/mkspecs/hpuxi-acc-32/qplatformdefs.h @@ -77,37 +77,13 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" #undef QT_OPEN_LARGEFILE -#define QT_OPEN_LARGEFILE 0 +#undef QT_SOCKLEN_T -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T int +#define QT_OPEN_LARGEFILE 0 +#define QT_SOCKLEN_T int #endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpuxi-acc-64/qplatformdefs.h b/mkspecs/hpuxi-acc-64/qplatformdefs.h index 7afb0fe..a0d2464 100644 --- a/mkspecs/hpuxi-acc-64/qplatformdefs.h +++ b/mkspecs/hpuxi-acc-64/qplatformdefs.h @@ -77,37 +77,13 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" #undef QT_OPEN_LARGEFILE -#define QT_OPEN_LARGEFILE 0 +#undef QT_SOCKLEN_T -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T int +#define QT_OPEN_LARGEFILE 0 +#define QT_SOCKLEN_T int #endif // QPLATFORMDEFS_H diff --git a/mkspecs/hpuxi-g++-64/qplatformdefs.h b/mkspecs/hpuxi-g++-64/qplatformdefs.h index 62c977f..288a331 100644 --- a/mkspecs/hpuxi-g++-64/qplatformdefs.h +++ b/mkspecs/hpuxi-g++-64/qplatformdefs.h @@ -76,37 +76,13 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" #undef QT_OPEN_LARGEFILE -#define QT_OPEN_LARGEFILE 0 +#undef QT_SOCKLEN_T -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T int +#define QT_OPEN_LARGEFILE 0 +#define QT_SOCKLEN_T int #endif // QPLATFORMDEFS_H diff --git a/mkspecs/hurd-g++/qplatformdefs.h b/mkspecs/hurd-g++/qplatformdefs.h index 41ced99..b439e6b 100644 --- a/mkspecs/hurd-g++/qplatformdefs.h +++ b/mkspecs/hurd-g++/qplatformdefs.h @@ -82,60 +82,13 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T - -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_LARGEFILE O_LARGEFILE -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T socklen_t #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/irix-cc-64/qplatformdefs.h b/mkspecs/irix-cc-64/qplatformdefs.h index bcd8742..c95c2e5 100644 --- a/mkspecs/irix-cc-64/qplatformdefs.h +++ b/mkspecs/irix-cc-64/qplatformdefs.h @@ -75,38 +75,15 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#undef QT_SOCKLEN_T #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) -#define QT_SOCKLEN_T size_t +#define QT_SOCKLEN_T size_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif // Irix 6.5 and better @@ -115,5 +92,4 @@ #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/irix-cc/qplatformdefs.h b/mkspecs/irix-cc/qplatformdefs.h index bcd8742..c95c2e5 100644 --- a/mkspecs/irix-cc/qplatformdefs.h +++ b/mkspecs/irix-cc/qplatformdefs.h @@ -75,38 +75,15 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#undef QT_SOCKLEN_T #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) -#define QT_SOCKLEN_T size_t +#define QT_SOCKLEN_T size_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif // Irix 6.5 and better @@ -115,5 +92,4 @@ #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/irix-g++/qplatformdefs.h b/mkspecs/irix-g++/qplatformdefs.h index 2d85b4f..be7fb69 100644 --- a/mkspecs/irix-g++/qplatformdefs.h +++ b/mkspecs/irix-g++/qplatformdefs.h @@ -75,42 +75,22 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#if defined(_LANGUAGE_C_PLUS_PLUS) || !defined(_SGIAPI) -#define QT_SIGNAL_ARGS int +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" + +#undef QT_SOCKLEN_T +#undef QT_SIGNAL_ARGS + +#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) +#define QT_SOCKLEN_T size_t #else -#define QT_SIGNAL_ARGS void +#define QT_SOCKLEN_T int #endif -#define QT_SIGNAL_IGNORE SIG_IGN -#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) -#define QT_SOCKLEN_T size_t +#if defined(_LANGUAGE_C_PLUS_PLUS) || !defined(_SGIAPI) +#define QT_SIGNAL_ARGS int #else -#define QT_SOCKLEN_T int +#define QT_SIGNAL_ARGS void #endif // Irix 6.5 and better @@ -119,6 +99,4 @@ #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H - diff --git a/mkspecs/linux-cxx/qplatformdefs.h b/mkspecs/linux-cxx/qplatformdefs.h index a708a81..578e63a 100644 --- a/mkspecs/linux-cxx/qplatformdefs.h +++ b/mkspecs/linux-cxx/qplatformdefs.h @@ -82,38 +82,15 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" + +#undef QT_SOCKLEN_T #if defined(__GLIBC__) && (__GLIBC__ >= 2) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) @@ -121,5 +98,4 @@ #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/linux-ecc-64/qplatformdefs.h b/mkspecs/linux-ecc-64/qplatformdefs.h index a708a81..578e63a 100644 --- a/mkspecs/linux-ecc-64/qplatformdefs.h +++ b/mkspecs/linux-ecc-64/qplatformdefs.h @@ -82,38 +82,15 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" + +#undef QT_SOCKLEN_T #if defined(__GLIBC__) && (__GLIBC__ >= 2) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) @@ -121,5 +98,4 @@ #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h index 09697e2..23816b1 100644 --- a/mkspecs/linux-g++/qplatformdefs.h +++ b/mkspecs/linux-g++/qplatformdefs.h @@ -81,38 +81,15 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#undef QT_SOCKLEN_T #if defined(__GLIBC__) && (__GLIBC__ >= 2) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) @@ -120,5 +97,4 @@ #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/linux-kcc/qplatformdefs.h b/mkspecs/linux-kcc/qplatformdefs.h index 9150292..3a37ab9 100644 --- a/mkspecs/linux-kcc/qplatformdefs.h +++ b/mkspecs/linux-kcc/qplatformdefs.h @@ -85,38 +85,15 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" + +#undef QT_SOCKLEN_T #if defined(__GLIBC__) && (__GLIBC__ >= 2) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) @@ -124,5 +101,4 @@ #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/linux-llvm/qplatformdefs.h b/mkspecs/linux-llvm/qplatformdefs.h index ea1a0da..a38c86c 100644 --- a/mkspecs/linux-llvm/qplatformdefs.h +++ b/mkspecs/linux-llvm/qplatformdefs.h @@ -82,38 +82,15 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#undef QT_SOCKLEN_T #if defined(__GLIBC__) && (__GLIBC__ >= 2) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) @@ -121,5 +98,4 @@ #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/linux-lsb-g++/qplatformdefs.h b/mkspecs/linux-lsb-g++/qplatformdefs.h index 7731c38..e2a138a 100644 --- a/mkspecs/linux-lsb-g++/qplatformdefs.h +++ b/mkspecs/linux-lsb-g++/qplatformdefs.h @@ -86,52 +86,27 @@ // LSB 3.1 defines htonl and friends here #include -#include "../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" #undef QT_OPEN_LARGEFILE +#undef QT_SOCKLEN_T + #define QT_OPEN_LARGEFILE 0 -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#if defined(__GLIBC__) && (__GLIBC__ >= 2) +#define QT_SOCKLEN_T socklen_t +#else +#define QT_SOCKLEN_T int +#endif #ifndef SIOCGIFBRDADDR # define SIOCGIFBRDADDR 0x8919 #endif -#if defined(__GLIBC__) && (__GLIBC__ >= 2) -#define QT_SOCKLEN_T socklen_t -#else -#define QT_SOCKLEN_T int -#endif - #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/linux-pgcc/qplatformdefs.h b/mkspecs/linux-pgcc/qplatformdefs.h index a708a81..578e63a 100644 --- a/mkspecs/linux-pgcc/qplatformdefs.h +++ b/mkspecs/linux-pgcc/qplatformdefs.h @@ -82,38 +82,15 @@ #include #endif -#include "../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" + +#undef QT_SOCKLEN_T #if defined(__GLIBC__) && (__GLIBC__ >= 2) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) @@ -121,5 +98,4 @@ #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h index 93ed4d5..4d3965d 100644 --- a/mkspecs/lynxos-g++/qplatformdefs.h +++ b/mkspecs/lynxos-g++/qplatformdefs.h @@ -75,64 +75,21 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T - -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat -#define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_LARGEFILE O_LARGEFILE -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS void -#define QT_SIGNAL_IGNORE SIG_IGN +#undef QT_SOCKLEN_T #if defined(__GLIBC__) && (__GLIBC__ >= 2) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif +#define QT_STATBUF4TSTAT struct stat + #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/macx-g++/qplatformdefs.h b/mkspecs/macx-g++/qplatformdefs.h index 890e4bb..5aef821 100644 --- a/mkspecs/macx-g++/qplatformdefs.h +++ b/mkspecs/macx-g++/qplatformdefs.h @@ -75,62 +75,25 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T +#undef QT_OPEN_LARGEFILE +#undef QT_SOCKLEN_T +#undef QT_SIGNAL_IGNORE -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat -#define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir #define QT_OPEN_LARGEFILE 0 -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE (void (*)(int))1 #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif +#define QT_SIGNAL_IGNORE (void (*)(int))1 + +#define QT_STATBUF4TSTAT struct stat + #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/macx-g++40/qplatformdefs.h b/mkspecs/macx-g++40/qplatformdefs.h index 890e4bb..5aef821 100644 --- a/mkspecs/macx-g++40/qplatformdefs.h +++ b/mkspecs/macx-g++40/qplatformdefs.h @@ -75,62 +75,25 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T +#undef QT_OPEN_LARGEFILE +#undef QT_SOCKLEN_T +#undef QT_SIGNAL_IGNORE -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat -#define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir #define QT_OPEN_LARGEFILE 0 -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE (void (*)(int))1 #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif +#define QT_SIGNAL_IGNORE (void (*)(int))1 + +#define QT_STATBUF4TSTAT struct stat + #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/macx-g++42/qplatformdefs.h b/mkspecs/macx-g++42/qplatformdefs.h index 890e4bb..5aef821 100644 --- a/mkspecs/macx-g++42/qplatformdefs.h +++ b/mkspecs/macx-g++42/qplatformdefs.h @@ -75,62 +75,25 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T +#undef QT_OPEN_LARGEFILE +#undef QT_SOCKLEN_T +#undef QT_SIGNAL_IGNORE -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat -#define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir #define QT_OPEN_LARGEFILE 0 -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE (void (*)(int))1 #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif +#define QT_SIGNAL_IGNORE (void (*)(int))1 + +#define QT_STATBUF4TSTAT struct stat + #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/macx-llvm/qplatformdefs.h b/mkspecs/macx-llvm/qplatformdefs.h index 890e4bb..5aef821 100644 --- a/mkspecs/macx-llvm/qplatformdefs.h +++ b/mkspecs/macx-llvm/qplatformdefs.h @@ -75,62 +75,25 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T +#undef QT_OPEN_LARGEFILE +#undef QT_SOCKLEN_T +#undef QT_SIGNAL_IGNORE -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat -#define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir #define QT_OPEN_LARGEFILE 0 -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE (void (*)(int))1 #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif +#define QT_SIGNAL_IGNORE (void (*)(int))1 + +#define QT_STATBUF4TSTAT struct stat + #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/macx-pbuilder/qplatformdefs.h b/mkspecs/macx-pbuilder/qplatformdefs.h index 7a04926..256dba6 100644 --- a/mkspecs/macx-pbuilder/qplatformdefs.h +++ b/mkspecs/macx-pbuilder/qplatformdefs.h @@ -75,62 +75,22 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T - -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat -#define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_LARGEFILE O_LARGEFILE -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE (void (*)(int))1 +#undef QT_SOCKLEN_T +#undef QT_SIGNAL_IGNORE #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif +#define QT_SIGNAL_IGNORE (void (*)(int))1 + +#define QT_STATBUF4TSTAT struct stat + #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/macx-xcode/qplatformdefs.h b/mkspecs/macx-xcode/qplatformdefs.h index 890e4bb..5aef821 100644 --- a/mkspecs/macx-xcode/qplatformdefs.h +++ b/mkspecs/macx-xcode/qplatformdefs.h @@ -75,62 +75,25 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T +#undef QT_OPEN_LARGEFILE +#undef QT_SOCKLEN_T +#undef QT_SIGNAL_IGNORE -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat -#define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir #define QT_OPEN_LARGEFILE 0 -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE (void (*)(int))1 #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #else -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif +#define QT_SIGNAL_IGNORE (void (*)(int))1 + +#define QT_STATBUF4TSTAT struct stat + #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/macx-xlc/qplatformdefs.h b/mkspecs/macx-xlc/qplatformdefs.h index b78d523..380c217 100644 --- a/mkspecs/macx-xlc/qplatformdefs.h +++ b/mkspecs/macx-xlc/qplatformdefs.h @@ -75,58 +75,17 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T +#undef QT_SOCKLEN_T +#undef QT_SIGNAL_IGNORE -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t +#define QT_SOCKLEN_T int +#define QT_SIGNAL_IGNORE (void (*)(int))1 -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_LARGEFILE O_LARGEFILE -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE (void (*)(int))1 - -#define QT_SOCKLEN_T int #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/netbsd-g++/qplatformdefs.h b/mkspecs/netbsd-g++/qplatformdefs.h index 7816703..53be833 100644 --- a/mkspecs/netbsd-g++/qplatformdefs.h +++ b/mkspecs/netbsd-g++/qplatformdefs.h @@ -75,57 +75,16 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T - -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat -#define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir +#undef QT_OPEN_LARGEFILE #define QT_OPEN_LARGEFILE 0 -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +// QT_SOCKLEN_T +// NetBSD 1.0 - 1.3.3 int +// NetBSD 1.4 - 1.5 socklen_t -// NetBSD 1.0 - 1.3.3 int -// NetBSD 1.4 - 1.5 socklen_t -#define QT_SOCKLEN_T socklen_t +#define QT_STATBUF4TSTAT struct stat #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf @@ -135,5 +94,4 @@ #define QT_AOUT_UNDERSCORE #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/openbsd-g++/qplatformdefs.h b/mkspecs/openbsd-g++/qplatformdefs.h index db957c2..f5adf6f 100644 --- a/mkspecs/openbsd-g++/qplatformdefs.h +++ b/mkspecs/openbsd-g++/qplatformdefs.h @@ -76,57 +76,16 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T - -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat -#define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir +#undef QT_OPEN_LARGEFILE #define QT_OPEN_LARGEFILE 0 -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +// QT_SOCKLEN_T +// OpenBSD 2.2 - 2.4 int +// OpenBSD 2.5 - 2.8 socklen_t -// OpenBSD 2.2 - 2.4 int -// OpenBSD 2.5 - 2.8 socklen_t -#define QT_SOCKLEN_T socklen_t +#define QT_STATBUF4TSTAT struct stat #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf @@ -151,5 +110,4 @@ #define QT_AOUT_UNDERSCORE #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/sco-cc/qplatformdefs.h b/mkspecs/sco-cc/qplatformdefs.h index df12900..2ae4b48 100644 --- a/mkspecs/sco-cc/qplatformdefs.h +++ b/mkspecs/sco-cc/qplatformdefs.h @@ -76,58 +76,14 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T +#undef QT_SOCKLEN_T +#define QT_SOCKLEN_T size_t -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_LARGEFILE O_LARGEFILE -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T size_t #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/sco-g++/qplatformdefs.h b/mkspecs/sco-g++/qplatformdefs.h index fe3c1ee..c62fe93 100644 --- a/mkspecs/sco-g++/qplatformdefs.h +++ b/mkspecs/sco-g++/qplatformdefs.h @@ -80,58 +80,14 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#include "../common/posix/qplatformdefs.h" -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T +#undef QT_SOCKLEN_T +#define QT_SOCKLEN_T int -#define QT_FSEEK ::fseeko -#define QT_FTELL ::ftello -#define QT_OFF_T off_t - -#define QT_MMAP ::mmap - -#define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_LARGEFILE O_LARGEFILE -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T int #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/solaris-cc-64/qplatformdefs.h b/mkspecs/solaris-cc-64/qplatformdefs.h index d791e97..d01c48c 100644 --- a/mkspecs/solaris-cc-64/qplatformdefs.h +++ b/mkspecs/solaris-cc-64/qplatformdefs.h @@ -76,41 +76,16 @@ #include #endif -// On 64-bit platforms sockets use socklen_t -#define QT_SOCKLEN_T socklen_t +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" + +#undef QT_SOCKET_CONNECT +#define QT_SOCKET_CONNECT qt_socket_connect // Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T addrlen) { return ::connect(s, addr, addrlen); } -#include "../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT qt_socket_connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - // Only Solaris 7 and better support 64-bit #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf diff --git a/mkspecs/solaris-cc/qplatformdefs.h b/mkspecs/solaris-cc/qplatformdefs.h index 04be413..678d076 100644 --- a/mkspecs/solaris-cc/qplatformdefs.h +++ b/mkspecs/solaris-cc/qplatformdefs.h @@ -76,49 +76,29 @@ #include #endif +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" + +#undef QT_SOCKLEN_T +#undef QT_SOCKET_CONNECT + +#define QT_SOCKET_CONNECT qt_socket_connect + #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) && (_XOPEN_VERSION-0 >= 500) // Solaris 7 and better with specific feature test macros -#define QT_SOCKLEN_T socklen_t +#define QT_SOCKLEN_T socklen_t #elif defined(_XOPEN_SOURCE_EXTENDED) && (_XOPEN_VERSION-0 >= 4) // Solaris 2.6 and better with specific feature test macros -#define QT_SOCKLEN_T size_t +#define QT_SOCKLEN_T size_t #else // always this case in practice -#define QT_SOCKLEN_T int +#define QT_SOCKLEN_T int #endif // Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T addrlen) { return ::connect(s, addr, addrlen); } -#include "../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT qt_socket_connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - #if !defined(_XOPEN_UNIX) // Solaris 2.5.1 // Function usleep() is defined in C library but not declared in header files diff --git a/mkspecs/solaris-g++-64/qplatformdefs.h b/mkspecs/solaris-g++-64/qplatformdefs.h index f9c21d7..bce0d5b 100644 --- a/mkspecs/solaris-g++-64/qplatformdefs.h +++ b/mkspecs/solaris-g++-64/qplatformdefs.h @@ -79,12 +79,11 @@ #include #endif -// On 64-bit platforms sockets use socklen_t -#define QT_SOCKLEN_T socklen_t +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" -// Only Solaris 7 and better support 64-bit -#define QT_SNPRINTF ::snprintf -#define QT_VSNPRINTF ::vsnprintf +#undef QT_SOCKET_CONNECT +#define QT_SOCKET_CONNECT qt_socket_connect // Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T addrlen) @@ -100,32 +99,8 @@ static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addr # undef bind #endif -#include "../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT qt_socket_connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN +// Only Solaris 7 and better support 64-bit +#define QT_SNPRINTF ::snprintf +#define QT_VSNPRINTF ::vsnprintf #endif // QPLATFORMDEFS_H diff --git a/mkspecs/solaris-g++/qplatformdefs.h b/mkspecs/solaris-g++/qplatformdefs.h index 6438e7c..5732388 100644 --- a/mkspecs/solaris-g++/qplatformdefs.h +++ b/mkspecs/solaris-g++/qplatformdefs.h @@ -79,6 +79,16 @@ #include #endif +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../common/posix/qplatformdefs.h" + +#undef QT_SOCKLEN_T +#undef QT_SOCKET_CONNECT +#undef QT_SOCKET_BIND + +#define QT_SOCKET_CONNECT qt_socket_connect +#define QT_SOCKET_BIND qt_socket_bind + #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) && (_XOPEN_VERSION-0 >= 500) // Solaris 7 and better with specific feature test macros #define QT_SOCKLEN_T socklen_t @@ -104,34 +114,6 @@ static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addr # undef bind #endif -#include "../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT qt_socket_connect -#define QT_SOCKET_BIND qt_socket_bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - #if !defined(_XOPEN_UNIX) // Solaris 2.5.1 // Function usleep() is defined in C library but not declared in header files diff --git a/mkspecs/tru64-cxx/qplatformdefs.h b/mkspecs/tru64-cxx/qplatformdefs.h index dc18e1d..15b83aa 100644 --- a/mkspecs/tru64-cxx/qplatformdefs.h +++ b/mkspecs/tru64-cxx/qplatformdefs.h @@ -78,48 +78,23 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#define QT_NO_USE_FSEEKO +#include "../common/posix/qplatformdefs.h" #undef QT_OFF_T +#undef QT_SOCKLEN_T + #define QT_OFF_T off_t -#define QT_MMAP ::mmap +#if defined(_POSIX_PII_SOCKET) +#define QT_SOCKLEN_T socklen_t +#elif defined(_XOPEN_SOURCE_EXTENDED) +#define QT_SOCKLEN_T size_t +#else +#define QT_SOCKLEN_T int +#endif -#define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_LARGEFILE O_LARGEFILE -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN #if defined(_XOPEN_SOURCE) && defined(_OSF_SOURCE) // Not available in the header file of Tru64 4.0F. @@ -127,19 +102,10 @@ extern "C" int usleep(useconds_t); #endif -#if defined(_POSIX_PII_SOCKET) -#define QT_SOCKLEN_T socklen_t -#elif defined(_XOPEN_SOURCE_EXTENDED) -#define QT_SOCKLEN_T size_t -#else -#define QT_SOCKLEN_T int -#endif - #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 400) // Tru64 5.0 and better #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/tru64-g++/qplatformdefs.h b/mkspecs/tru64-g++/qplatformdefs.h index 485879e..15b83aa 100644 --- a/mkspecs/tru64-g++/qplatformdefs.h +++ b/mkspecs/tru64-g++/qplatformdefs.h @@ -78,48 +78,23 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#define QT_NO_USE_FSEEKO +#include "../common/posix/qplatformdefs.h" #undef QT_OFF_T +#undef QT_SOCKLEN_T + #define QT_OFF_T off_t -#define QT_MMAP ::mmap +#if defined(_POSIX_PII_SOCKET) +#define QT_SOCKLEN_T socklen_t +#elif defined(_XOPEN_SOURCE_EXTENDED) +#define QT_SOCKLEN_T size_t +#else +#define QT_SOCKLEN_T int +#endif -#define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_LARGEFILE O_LARGEFILE -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN #if defined(_XOPEN_SOURCE) && defined(_OSF_SOURCE) // Not available in the header file of Tru64 4.0F. @@ -127,19 +102,10 @@ extern "C" int usleep(useconds_t); #endif -#if defined(_POSIX_PII_SOCKET) -# define QT_SOCKLEN_T socklen_t -#elif defined(_XOPEN_SOURCE_EXTENDED) -# define QT_SOCKLEN_T size_t -#else -# define QT_SOCKLEN_T int -#endif - #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 400) // Tru64 5.0 and better #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf #endif - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/unixware-cc/qplatformdefs.h b/mkspecs/unixware-cc/qplatformdefs.h index cdcd3a3..4ad4d6c 100644 --- a/mkspecs/unixware-cc/qplatformdefs.h +++ b/mkspecs/unixware-cc/qplatformdefs.h @@ -76,53 +76,18 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#define QT_NO_USE_FSEEKO +#include "../common/posix/qplatformdefs.h" #undef QT_OFF_T -#define QT_OFF_T off_t +#undef QT_SOCKLEN_T -#define QT_MMAP ::mmap +#define QT_OFF_T off_t +#define QT_SOCKLEN_T size_t -#define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_LARGEFILE O_LARGEFILE -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T size_t #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/unixware-g++/qplatformdefs.h b/mkspecs/unixware-g++/qplatformdefs.h index cdcd3a3..4ad4d6c 100644 --- a/mkspecs/unixware-g++/qplatformdefs.h +++ b/mkspecs/unixware-g++/qplatformdefs.h @@ -76,53 +76,18 @@ #include #endif -#include "../common/c89/qplatformdefs.h" +#define QT_NO_USE_FSEEKO +#include "../common/posix/qplatformdefs.h" #undef QT_OFF_T -#define QT_OFF_T off_t +#undef QT_SOCKLEN_T -#define QT_MMAP ::mmap +#define QT_OFF_T off_t +#define QT_SOCKLEN_T size_t -#define QT_STATBUF struct stat #define QT_STATBUF4TSTAT struct stat -#define QT_STAT ::stat -#define QT_FSTAT ::fstat -#define QT_LSTAT ::lstat -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_OPEN ::open -#define QT_CLOSE ::close -#define QT_TRUNCATE ::truncate -#define QT_FTRUNCATE ::ftruncate -#define QT_LSEEK ::lseek -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_LARGEFILE O_LARGEFILE -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T size_t #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf - #endif // QPLATFORMDEFS_H diff --git a/mkspecs/unsupported/qnx-g++/qplatformdefs.h b/mkspecs/unsupported/qnx-g++/qplatformdefs.h index d86ce26..b5bcee8 100644 --- a/mkspecs/unsupported/qnx-g++/qplatformdefs.h +++ b/mkspecs/unsupported/qnx-g++/qplatformdefs.h @@ -81,35 +81,8 @@ // for htonl #include -#include "../../common/xopen-lfs/qplatformdefs.h" - -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT ::connect -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close -#define QT_READ ::read -#define QT_WRITE ::write -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR ::mkdir -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN - -#define QT_SOCKLEN_T socklen_t +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../../common/posix/qplatformdefs.h" #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h index 47a24a4..b183684 100644 --- a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h +++ b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h @@ -47,45 +47,29 @@ #include "qglobal.h" #include "qfunctions_vxworks.h" -#include "../../common/xopen-lfs/qplatformdefs.h" +#define QT_USE_XOPEN_LFS_EXTENSIONS +#include "../../common/posix/qplatformdefs.h" #undef QT_LSTAT +#undef QT_MKDIR +#undef QT_READ +#undef QT_WRITE +#undef QT_SOCKLEN_T +#undef QT_SOCKET_CONNECT + #define QT_LSTAT QT_STAT +#define QT_MKDIR(dir, perm) ::mkdir(dir) -#define QT_STAT_REG S_IFREG -#define QT_STAT_DIR S_IFDIR -#define QT_STAT_MASK S_IFMT -#define QT_STAT_LNK S_IFLNK -#define QT_SOCKET_CONNECT(sd, to, tolen) \ - ::connect(sd, (struct sockaddr *) to, tolen) -#define QT_SOCKET_BIND ::bind -#define QT_FILENO fileno -#define QT_CLOSE ::close #define QT_READ(fd, buf, len) ::read(fd, (char*) buf, len) #define QT_WRITE(fd, buf, len) ::write(fd, (char*) buf, len) -#define QT_ACCESS ::access -#define QT_GETCWD ::getcwd -#define QT_CHDIR ::chdir -#define QT_MKDIR(dir, perm) ::mkdir(dir) -#define QT_RMDIR ::rmdir -#define QT_OPEN_RDONLY O_RDONLY -#define QT_OPEN_WRONLY O_WRONLY -#define QT_OPEN_RDWR O_RDWR -#define QT_OPEN_CREAT O_CREAT -#define QT_OPEN_TRUNC O_TRUNC -#define QT_OPEN_APPEND O_APPEND - -#define QT_SIGNAL_RETTYPE void -#define QT_SIGNAL_ARGS int -#define QT_SIGNAL_IGNORE SIG_IGN // there IS a socklen_t in sys/socket.h (unsigned int), // but sockLib.h uses int in all function declaration... -//#define QT_SOCKLEN_T socklen_t #define QT_SOCKLEN_T int +#define QT_SOCKET_CONNECT(sd, to, tolen) \ + ::connect(sd, (struct sockaddr *) to, tolen) #define QT_SNPRINTF ::snprintf #define QT_VSNPRINTF ::vsnprintf - #endif // QPLATFORMDEFS_H -- cgit v0.12