diff options
author | João Abecasis <joao@trolltech.com> | 2010-01-15 17:05:06 (GMT) |
---|---|---|
committer | João Abecasis <joao@trolltech.com> | 2010-01-22 16:50:19 (GMT) |
commit | 0f8519368e2cfdaddb49cea60096fd03df69fd62 (patch) | |
tree | dd9b46cd1f5930de4c26554adc35da37272ec1f1 | |
parent | 784946b8ea8b932924a831504387661d66170ca0 (diff) | |
download | Qt-0f8519368e2cfdaddb49cea60096fd03df69fd62.zip Qt-0f8519368e2cfdaddb49cea60096fd03df69fd62.tar.gz Qt-0f8519368e2cfdaddb49cea60096fd03df69fd62.tar.bz2 |
Refactor common POSIX support out of individual qplatformdefs.h
POSIX header incorporates previously refactored X/Open LFS extensions.
Reviewed-by: Thiago Macieira
50 files changed, 373 insertions, 1799 deletions
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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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/xopen-lfs/qplatformdefs.h b/mkspecs/common/posix/qplatformdefs.h index 2599d62..fe50de2 100644 --- a/mkspecs/common/xopen-lfs/qplatformdefs.h +++ b/mkspecs/common/posix/qplatformdefs.h @@ -39,13 +39,18 @@ ** ****************************************************************************/ -#ifndef Q_XOPEN_LFS_QPLATFORMDEFS_H -#define Q_XOPEN_LFS_QPLATFORMDEFS_H +#ifndef Q_POSIX_QPLATFORMDEFS_H +#define Q_POSIX_QPLATFORMDEFS_H -#ifdef QT_LARGEFILE_SUPPORT +#include <signal.h> + +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/stat.h> + +#if defined(QT_USE_XOPEN_LFS_EXTENSIONS) && defined(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 @@ -53,11 +58,13 @@ #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 @@ -66,32 +73,72 @@ #define QT_MMAP ::mmap64 -#else // !QT_LARGEFILE_SUPPORT +#else // !defined(QT_USE_XOPEN_LFS_EXTENSIONS) || !defined(QT_LARGEFILE_SUPPORT) + +#include "../c89/qplatformdefs.h" #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 +// File I/O #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 +// 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 // QT_LARGEFILE_SUPPORT +#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 <arpa/inet.h> -#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/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 <windows.h> #include <netinet/in.h> -#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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <arpa/inet.h> -#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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <net/if.h> #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 <unistd.h> 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 <net/if.h> #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 <unistd.h> 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 <net/if.h> #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 <net/if.h> #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 <arpa/inet.h> -#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 |