summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/aix-g++-64/qmake.conf1
-rw-r--r--mkspecs/aix-g++-64/qplatformdefs.h127
-rw-r--r--mkspecs/aix-g++/qmake.conf1
-rw-r--r--mkspecs/aix-g++/qplatformdefs.h127
-rw-r--r--mkspecs/aix-xlc-64/qmake.conf1
-rw-r--r--mkspecs/aix-xlc-64/qplatformdefs.h113
-rw-r--r--mkspecs/aix-xlc/qmake.conf1
-rw-r--r--mkspecs/aix-xlc/qplatformdefs.h123
-rw-r--r--mkspecs/common/aix/qplatformdefs.h120
-rw-r--r--mkspecs/common/armcc.conf41
-rw-r--r--mkspecs/common/c89/qplatformdefs.h56
-rw-r--r--mkspecs/common/linux.conf3
-rw-r--r--mkspecs/common/posix/qplatformdefs.h162
-rw-r--r--mkspecs/common/qws.conf1
-rw-r--r--mkspecs/common/symbian/header-wrappers/AknDoc.h1
-rw-r--r--mkspecs/common/symbian/header-wrappers/AknPopupFader.h1
-rw-r--r--mkspecs/common/symbian/header-wrappers/AknServerApp.h1
-rw-r--r--mkspecs/common/symbian/header-wrappers/AknUtils.h1
-rw-r--r--mkspecs/common/symbian/header-wrappers/CDirectoryLocalizer.h1
-rw-r--r--mkspecs/common/symbian/header-wrappers/DocumentHandler.h1
-rw-r--r--mkspecs/common/symbian/qplatformdefs.h79
-rw-r--r--mkspecs/common/symbian/symbian-makefile.conf45
-rw-r--r--mkspecs/common/symbian/symbian-mmp.conf77
-rw-r--r--mkspecs/common/symbian/symbian.conf114
-rw-r--r--mkspecs/common/unix.conf3
-rw-r--r--mkspecs/common/wince/qmake.conf1
-rw-r--r--mkspecs/cygwin-g++/qmake.conf1
-rw-r--r--mkspecs/cygwin-g++/qplatformdefs.h50
-rw-r--r--mkspecs/darwin-g++/qmake.conf1
-rw-r--r--mkspecs/darwin-g++/qplatformdefs.h46
-rw-r--r--mkspecs/features/assistant.prf9
-rw-r--r--mkspecs/features/egl.prf8
-rw-r--r--mkspecs/features/incredibuild_xge.prf2
-rw-r--r--mkspecs/features/moc.prf2
-rw-r--r--mkspecs/features/sis_targets.prf139
-rw-r--r--mkspecs/features/symbian/application_icon.prf46
-rw-r--r--mkspecs/features/symbian/debug.prf1
-rw-r--r--mkspecs/features/symbian/def_files.prf95
-rw-r--r--mkspecs/features/symbian/default_post.prf19
-rw-r--r--mkspecs/features/symbian/do_not_build_as_thumb.prf8
-rw-r--r--mkspecs/features/symbian/moc.prf24
-rw-r--r--mkspecs/features/symbian/platform_paths.prf213
-rw-r--r--mkspecs/features/symbian/qt.prf6
-rw-r--r--mkspecs/features/symbian/qt_config.prf9
-rw-r--r--mkspecs/features/symbian/release.prf1
-rw-r--r--mkspecs/features/symbian/symbian_building.prf277
-rw-r--r--mkspecs/features/symbian/thread.prf2
-rw-r--r--mkspecs/features/unix/opengl.prf5
-rw-r--r--mkspecs/features/win32/thread.prf4
-rw-r--r--mkspecs/freebsd-g++/qmake.conf1
-rw-r--r--mkspecs/freebsd-g++/qplatformdefs.h53
-rw-r--r--mkspecs/freebsd-g++34/qmake.conf1
-rw-r--r--mkspecs/freebsd-g++40/qmake.conf1
-rw-r--r--mkspecs/freebsd-icc/qmake.conf1
-rw-r--r--mkspecs/hpux-acc-64/qmake.conf1
-rw-r--r--mkspecs/hpux-acc-64/qplatformdefs.h74
-rw-r--r--mkspecs/hpux-acc-o64/qmake.conf1
-rw-r--r--mkspecs/hpux-acc-o64/qplatformdefs.h75
-rw-r--r--mkspecs/hpux-acc/qmake.conf1
-rw-r--r--mkspecs/hpux-acc/qplatformdefs.h74
-rw-r--r--mkspecs/hpux-g++-64/qmake.conf1
-rw-r--r--mkspecs/hpux-g++-64/qplatformdefs.h74
-rw-r--r--mkspecs/hpux-g++/qmake.conf1
-rw-r--r--mkspecs/hpux-g++/qplatformdefs.h75
-rw-r--r--mkspecs/hpuxi-acc-32/qmake.conf1
-rw-r--r--mkspecs/hpuxi-acc-32/qplatformdefs.h73
-rw-r--r--mkspecs/hpuxi-acc-64/qmake.conf1
-rw-r--r--mkspecs/hpuxi-acc-64/qplatformdefs.h73
-rw-r--r--mkspecs/hpuxi-g++-64/qmake.conf1
-rw-r--r--mkspecs/hpuxi-g++-64/qplatformdefs.h73
-rw-r--r--mkspecs/hurd-g++/qmake.conf1
-rw-r--r--mkspecs/hurd-g++/qplatformdefs.h48
-rw-r--r--mkspecs/irix-cc-64/qmake.conf1
-rw-r--r--mkspecs/irix-cc-64/qplatformdefs.h75
-rw-r--r--mkspecs/irix-cc/qmake.conf1
-rw-r--r--mkspecs/irix-cc/qplatformdefs.h75
-rw-r--r--mkspecs/irix-g++-64/qmake.conf1
-rw-r--r--mkspecs/irix-g++/qmake.conf1
-rw-r--r--mkspecs/irix-g++/qplatformdefs.h83
-rw-r--r--mkspecs/linux-cxx/qmake.conf1
-rw-r--r--mkspecs/linux-cxx/qplatformdefs.h75
-rw-r--r--mkspecs/linux-ecc-64/qmake.conf1
-rw-r--r--mkspecs/linux-ecc-64/qplatformdefs.h75
-rw-r--r--mkspecs/linux-g++-32/qmake.conf1
-rw-r--r--mkspecs/linux-g++-64/qmake.conf1
-rw-r--r--mkspecs/linux-g++-maemo/qmake.conf4
-rw-r--r--mkspecs/linux-g++/qmake.conf1
-rw-r--r--mkspecs/linux-g++/qplatformdefs.h75
-rw-r--r--mkspecs/linux-icc/qmake.conf1
-rw-r--r--mkspecs/linux-kcc/qmake.conf1
-rw-r--r--mkspecs/linux-kcc/qplatformdefs.h75
-rw-r--r--mkspecs/linux-llvm/qmake.conf1
-rw-r--r--mkspecs/linux-llvm/qplatformdefs.h75
-rw-r--r--mkspecs/linux-lsb-g++/qmake.conf1
-rw-r--r--mkspecs/linux-lsb-g++/qplatformdefs.h81
-rw-r--r--mkspecs/linux-pgcc/qmake.conf1
-rw-r--r--mkspecs/linux-pgcc/qplatformdefs.h75
-rw-r--r--mkspecs/lynxos-g++/qmake.conf1
-rw-r--r--mkspecs/lynxos-g++/qplatformdefs.h50
-rw-r--r--mkspecs/macx-g++/qmake.conf1
-rw-r--r--mkspecs/macx-g++/qplatformdefs.h56
-rw-r--r--mkspecs/macx-g++40/qmake.conf1
-rw-r--r--mkspecs/macx-g++40/qplatformdefs.h56
-rw-r--r--mkspecs/macx-g++42/qmake.conf1
-rw-r--r--mkspecs/macx-g++42/qplatformdefs.h56
-rw-r--r--mkspecs/macx-icc/qmake.conf1
-rw-r--r--mkspecs/macx-llvm/qmake.conf1
-rw-r--r--mkspecs/macx-llvm/qplatformdefs.h56
-rw-r--r--mkspecs/macx-pbuilder/qplatformdefs.h55
-rw-r--r--mkspecs/macx-xcode/qplatformdefs.h56
-rw-r--r--mkspecs/macx-xlc/qmake.conf1
-rw-r--r--mkspecs/macx-xlc/qplatformdefs.h50
-rw-r--r--mkspecs/netbsd-g++/qmake.conf1
-rw-r--r--mkspecs/netbsd-g++/qplatformdefs.h53
-rw-r--r--mkspecs/openbsd-g++/qmake.conf1
-rw-r--r--mkspecs/openbsd-g++/qplatformdefs.h53
-rw-r--r--mkspecs/qws/freebsd-generic-g++/qmake.conf1
-rw-r--r--mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf20
-rw-r--r--mkspecs/qws/linux-arm-gnueabi-g++/qplatformdefs.h (renamed from mkspecs/win32-msvc2002/qplatformdefs.h)2
-rw-r--r--mkspecs/qws/macx-generic-g++/qmake.conf1
-rw-r--r--mkspecs/qws/solaris-generic-g++/qmake.conf1
-rw-r--r--mkspecs/sco-cc/qmake.conf1
-rw-r--r--mkspecs/sco-cc/qplatformdefs.h49
-rw-r--r--mkspecs/sco-g++/qmake.conf1
-rw-r--r--mkspecs/sco-g++/qplatformdefs.h49
-rw-r--r--mkspecs/solaris-cc-64/qmake.conf3
-rw-r--r--mkspecs/solaris-cc-64/qplatformdefs.h76
-rw-r--r--mkspecs/solaris-cc/qmake.conf3
-rw-r--r--mkspecs/solaris-cc/qplatformdefs.h83
-rw-r--r--mkspecs/solaris-g++-64/qmake.conf1
-rw-r--r--mkspecs/solaris-g++-64/qplatformdefs.h80
-rw-r--r--mkspecs/solaris-g++/qmake.conf1
-rw-r--r--mkspecs/solaris-g++/qplatformdefs.h79
-rw-r--r--mkspecs/symbian-abld/qmake.conf3
-rw-r--r--mkspecs/symbian-sbsv2/qmake.conf3
-rw-r--r--mkspecs/symbian/linux-armcc/features/default_post.prf5
-rw-r--r--mkspecs/symbian/linux-armcc/qmake.conf54
-rw-r--r--mkspecs/symbian/linux-armcc/qplatformdefs.h1
-rw-r--r--mkspecs/symbian/linux-gcce/features/default_post.prf5
-rw-r--r--mkspecs/symbian/linux-gcce/qmake.conf92
-rw-r--r--mkspecs/symbian/linux-gcce/qplatformdefs.h2
-rw-r--r--mkspecs/tru64-cxx/qmake.conf1
-rw-r--r--mkspecs/tru64-cxx/qplatformdefs.h64
-rw-r--r--mkspecs/tru64-g++/qmake.conf1
-rw-r--r--mkspecs/tru64-g++/qplatformdefs.h64
-rw-r--r--mkspecs/unixware-cc/qmake.conf1
-rw-r--r--mkspecs/unixware-cc/qplatformdefs.h51
-rw-r--r--mkspecs/unixware-g++/qmake.conf1
-rw-r--r--mkspecs/unixware-g++/qplatformdefs.h51
-rw-r--r--mkspecs/unsupported/linux-host-g++/qmake.conf3
-rw-r--r--mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/qnx-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/qnx-g++/qplatformdefs.h72
-rw-r--r--mkspecs/unsupported/qws/qnx-641/qmake.conf100
-rw-r--r--mkspecs/unsupported/qws/qnx-641/qplatformdefs.h42
-rw-r--r--mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf1
-rw-r--r--mkspecs/unsupported/vxworks-ppc-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf1
-rw-r--r--mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf1
-rw-r--r--mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h79
-rw-r--r--mkspecs/win32-borland/qplatformdefs.h17
-rw-r--r--mkspecs/win32-g++/qplatformdefs.h17
-rw-r--r--mkspecs/win32-icc/qmake.conf2
-rw-r--r--mkspecs/win32-icc/qplatformdefs.h18
-rw-r--r--mkspecs/win32-msvc.net/qmake.conf89
-rw-r--r--mkspecs/win32-msvc.net/qplatformdefs.h147
-rw-r--r--mkspecs/win32-msvc/features/incremental.prf2
-rw-r--r--mkspecs/win32-msvc/features/incremental_off.prf2
-rw-r--r--mkspecs/win32-msvc/qmake.conf86
-rw-r--r--mkspecs/win32-msvc/qplatformdefs.h148
-rw-r--r--mkspecs/win32-msvc2002/qmake.conf88
-rw-r--r--mkspecs/win32-msvc2003/qplatformdefs.h100
-rw-r--r--mkspecs/win32-msvc2005/qplatformdefs.h17
176 files changed, 2043 insertions, 4052 deletions
diff --git a/mkspecs/aix-g++-64/qmake.conf b/mkspecs/aix-g++-64/qmake.conf
index 995178b..d9d9c38 100644
--- a/mkspecs/aix-g++-64/qmake.conf
+++ b/mkspecs/aix-g++-64/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/aix-g++-64/qplatformdefs.h b/mkspecs/aix-g++-64/qplatformdefs.h
index ecc2cf0..d32f994 100644
--- a/mkspecs/aix-g++-64/qplatformdefs.h
+++ b/mkspecs/aix-g++-64/qplatformdefs.h
@@ -42,131 +42,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-// uncomment if you have problems with <sys/proc.h> because your gcc
-// hasn't been built on exactly the same OS version your are using now.
-// typedef int crid_t;
-// typedef unsigned int class_id_t;
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#include <dlfcn.h>
-#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/select.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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
-
-#ifdef _AIX43
-// AIX 4.3 and better
-#define QT_SOCKLEN_T socklen_t
-#elif _AIX42
-// AIX 4.2
-#define QT_SOCKLEN_T size_t
-#else
-// AIX 4.1
-#define QT_SOCKLEN_T size_t
-// override
-#define QT_SOCKOPTLEN_T int
-#endif
-
-#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-// AIX 4.3 and better
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-#endif
+#include "../common/aix/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/aix-g++/qmake.conf b/mkspecs/aix-g++/qmake.conf
index 969aa76..5fc4c17 100644
--- a/mkspecs/aix-g++/qmake.conf
+++ b/mkspecs/aix-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/aix-g++/qplatformdefs.h b/mkspecs/aix-g++/qplatformdefs.h
index ecc2cf0..d32f994 100644
--- a/mkspecs/aix-g++/qplatformdefs.h
+++ b/mkspecs/aix-g++/qplatformdefs.h
@@ -42,131 +42,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-// uncomment if you have problems with <sys/proc.h> because your gcc
-// hasn't been built on exactly the same OS version your are using now.
-// typedef int crid_t;
-// typedef unsigned int class_id_t;
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#include <dlfcn.h>
-#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/select.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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
-
-#ifdef _AIX43
-// AIX 4.3 and better
-#define QT_SOCKLEN_T socklen_t
-#elif _AIX42
-// AIX 4.2
-#define QT_SOCKLEN_T size_t
-#else
-// AIX 4.1
-#define QT_SOCKLEN_T size_t
-// override
-#define QT_SOCKOPTLEN_T int
-#endif
-
-#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-// AIX 4.3 and better
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-#endif
+#include "../common/aix/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/aix-xlc-64/qmake.conf b/mkspecs/aix-xlc-64/qmake.conf
index a18aa9f..c67bd0b 100644
--- a/mkspecs/aix-xlc-64/qmake.conf
+++ b/mkspecs/aix-xlc-64/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/aix-xlc-64/qplatformdefs.h b/mkspecs/aix-xlc-64/qplatformdefs.h
index 2ed0879..d32f994 100644
--- a/mkspecs/aix-xlc-64/qplatformdefs.h
+++ b/mkspecs/aix-xlc-64/qplatformdefs.h
@@ -42,117 +42,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#include <dlfcn.h>
-#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/select.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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
-
-// 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
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-#endif
+#include "../common/aix/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/aix-xlc/qmake.conf b/mkspecs/aix-xlc/qmake.conf
index 42f6f7e..e81fb66 100644
--- a/mkspecs/aix-xlc/qmake.conf
+++ b/mkspecs/aix-xlc/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/aix-xlc/qplatformdefs.h b/mkspecs/aix-xlc/qplatformdefs.h
index 435fc40..d32f994 100644
--- a/mkspecs/aix-xlc/qplatformdefs.h
+++ b/mkspecs/aix-xlc/qplatformdefs.h
@@ -42,127 +42,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#include <dlfcn.h>
-#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/time.h>
-#include <sys/select.h>
-#include <sys/shm.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#ifndef QT_NO_IPV6IFNAME
-#include <net/if.h>
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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
-
-#ifdef _AIX43
-// AIX 4.3 and better
-#define QT_SOCKLEN_T socklen_t
-#elif _AIX42
-// AIX 4.2
-#define QT_SOCKLEN_T size_t
-#else
-// AIX 4.1
-#define QT_SOCKLEN_T size_t
-// override
-#define QT_SOCKOPTLEN_T int
-#endif
-
-#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500)
-// AIX 4.3 and better
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-#endif
+#include "../common/aix/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/common/aix/qplatformdefs.h b/mkspecs/common/aix/qplatformdefs.h
new file mode 100644
index 0000000..b3abf68
--- /dev/null
+++ b/mkspecs/common/aix/qplatformdefs.h
@@ -0,0 +1,120 @@
+/****************************************************************************
+**
+** 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_AIX_QPLATFORMDEFS_H
+#define Q_AIX_QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+// uncomment if you have problems with <sys/proc.h> because your gcc
+// hasn't been built on exactly the same OS version your are using now.
+// typedef int crid_t;
+// typedef unsigned int class_id_t;
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#include <dlfcn.h>
+#include <strings.h> // AIX X11 headers define FD_ZERO using bzero()
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/select.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+// Only AIX 4.3 and better support 64-bit
+
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../posix/qplatformdefs.h"
+
+#undef QT_SOCKLEN_T
+
+#ifdef _AIX43
+// AIX 4.3 and better
+#define QT_SOCKLEN_T socklen_t
+#elif _AIX42
+// AIX 4.2
+#define QT_SOCKLEN_T size_t
+#else
+// AIX 4.1
+#define QT_SOCKLEN_T size_t
+// override
+#define QT_SOCKOPTLEN_T int
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#undef QT_DIR
+#undef QT_OPENDIR
+#undef QT_CLOSEDIR
+
+#define QT_DIR DIR64
+#define QT_OPENDIR ::opendir64
+#define QT_CLOSEDIR ::closedir64
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500)
+// AIX 4.3 and better
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+#endif // include guard
diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf
new file mode 100644
index 0000000..2c765bc
--- /dev/null
+++ b/mkspecs/common/armcc.conf
@@ -0,0 +1,41 @@
+#
+# qmake configuration for armcc
+#
+
+CONFIG += rvct_linker
+QMAKE_CC = armcc
+QMAKE_CFLAGS +=
+QMAKE_CFLAGS_DEPS += -M
+QMAKE_CFLAGS_WARN_ON +=
+QMAKE_CFLAGS_WARN_OFF += -W
+QMAKE_CFLAGS_RELEASE += -O2
+QMAKE_CFLAGS_DEBUG += -g -O0
+QMAKE_CFLAGS_HIDESYMS += --visibility_inlines_hidden
+
+QMAKE_CXX = armcc
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --exceptions --exceptions_unwind
+QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS
+
+QMAKE_LINK = armlink
+QMAKE_LINK_SHLIB = armlink
+QMAKE_LINK_C = armlink
+QMAKE_LINK_C_SHLIB = armlink
+QMAKE_LFLAGS +=
+QMAKE_LFLAGS_RELEASE +=
+QMAKE_LFLAGS_DEBUG +=
+QMAKE_LFLAGS_APP +=
+QMAKE_LFLAGS_SHLIB +=
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_THREAD +=
+
+QMAKE_AR = armar --create
+QMAKE_RANLIB =
+
diff --git a/mkspecs/common/c89/qplatformdefs.h b/mkspecs/common/c89/qplatformdefs.h
new file mode 100644
index 0000000..c6a8e14
--- /dev/null
+++ b/mkspecs/common/c89/qplatformdefs.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef Q_C89_QPLATFORMDEFS_H
+#define Q_C89_QPLATFORMDEFS_H
+
+// #include <stdio.h>
+
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+
+#endif // include guard
diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf
index 1ae5608..4fbe2dc 100644
--- a/mkspecs/common/linux.conf
+++ b/mkspecs/common/linux.conf
@@ -15,8 +15,6 @@ QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL
-QMAKE_INCDIR_OPENGL_ES1CL = $$QMAKE_INCDIR_OPENGL
-QMAKE_LIBDIR_OPENGL_ES1CL = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL =
@@ -33,7 +31,6 @@ QMAKE_LIBS_EGL = -lEGL
QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM
-QMAKE_LIBS_OPENGL_ES1CL = -lGLES_CL
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
QMAKE_LIBS_OPENVG = -lOpenVG
QMAKE_LIBS_THREAD = -lpthread
diff --git a/mkspecs/common/posix/qplatformdefs.h b/mkspecs/common/posix/qplatformdefs.h
new file mode 100644
index 0000000..6310257
--- /dev/null
+++ b/mkspecs/common/posix/qplatformdefs.h
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** 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 <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_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
+
+// Directory iteration
+#define QT_DIR DIR
+
+#define QT_OPENDIR ::opendir
+#define QT_CLOSEDIR ::closedir
+
+#if defined(QT_LARGEFILE_SUPPORT) \
+ && defined(QT_USE_XOPEN_LFS_EXTENSIONS) \
+ && !defined(QT_NO_READDIR64)
+#define QT_DIRENT struct dirent64
+#define QT_READDIR ::readdir64
+#define QT_READDIR_R ::readdir64_r
+#else
+#define QT_DIRENT struct dirent
+#define QT_READDIR ::readdir
+#define QT_READDIR_R ::readdir_r
+#endif
+
+#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/qws.conf b/mkspecs/common/qws.conf
index 0242db4..96341a7 100644
--- a/mkspecs/common/qws.conf
+++ b/mkspecs/common/qws.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui network
diff --git a/mkspecs/common/symbian/header-wrappers/AknDoc.h b/mkspecs/common/symbian/header-wrappers/AknDoc.h
new file mode 100644
index 0000000..d4dbd7d
--- /dev/null
+++ b/mkspecs/common/symbian/header-wrappers/AknDoc.h
@@ -0,0 +1 @@
+#include <akndoc.h>
diff --git a/mkspecs/common/symbian/header-wrappers/AknPopupFader.h b/mkspecs/common/symbian/header-wrappers/AknPopupFader.h
new file mode 100644
index 0000000..60a007a
--- /dev/null
+++ b/mkspecs/common/symbian/header-wrappers/AknPopupFader.h
@@ -0,0 +1 @@
+#include <aknpopupfader.h>
diff --git a/mkspecs/common/symbian/header-wrappers/AknServerApp.h b/mkspecs/common/symbian/header-wrappers/AknServerApp.h
new file mode 100644
index 0000000..b4dc69f
--- /dev/null
+++ b/mkspecs/common/symbian/header-wrappers/AknServerApp.h
@@ -0,0 +1 @@
+#include <aknserverapp.h>
diff --git a/mkspecs/common/symbian/header-wrappers/AknUtils.h b/mkspecs/common/symbian/header-wrappers/AknUtils.h
new file mode 100644
index 0000000..66a3784
--- /dev/null
+++ b/mkspecs/common/symbian/header-wrappers/AknUtils.h
@@ -0,0 +1 @@
+#include <aknutils.h>
diff --git a/mkspecs/common/symbian/header-wrappers/CDirectoryLocalizer.h b/mkspecs/common/symbian/header-wrappers/CDirectoryLocalizer.h
new file mode 100644
index 0000000..f251302
--- /dev/null
+++ b/mkspecs/common/symbian/header-wrappers/CDirectoryLocalizer.h
@@ -0,0 +1 @@
+#include <cdirectorylocalizer.h>
diff --git a/mkspecs/common/symbian/header-wrappers/DocumentHandler.h b/mkspecs/common/symbian/header-wrappers/DocumentHandler.h
new file mode 100644
index 0000000..8981af6
--- /dev/null
+++ b/mkspecs/common/symbian/header-wrappers/DocumentHandler.h
@@ -0,0 +1 @@
+#include <documenthandler.h>
diff --git a/mkspecs/common/symbian/qplatformdefs.h b/mkspecs/common/symbian/qplatformdefs.h
index c8a336b..2b075ba 100644
--- a/mkspecs/common/symbian/qplatformdefs.h
+++ b/mkspecs/common/symbian/qplatformdefs.h
@@ -84,86 +84,25 @@
#endif
#include <arpa/inet.h>
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+// unset large file as symbian doesn't support it
+#undef QT_LARGEFILE_SUPPORT
+#include "../posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#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_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_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/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf
new file mode 100644
index 0000000..3801eff
--- /dev/null
+++ b/mkspecs/common/symbian/symbian-makefile.conf
@@ -0,0 +1,45 @@
+#
+# qmake configuration for makefile based symbian
+#
+
+MAKEFILE_GENERATOR = SYMBIAN_UNIX
+
+include(symbian.conf)
+
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+
+QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+QMAKE_ELF2E32_FLAGS +=
+
+include(../../common/unix.conf)
+
+QMAKE_PREFIX_SHLIB =
+QMAKE_EXTENSION_SHLIB = dll
+CONFIG *= no_plugin_name_prefix
+QMAKE_EXTENSION_PLUGIN = dll
+QMAKE_PREFIX_STATICLIB =
+QMAKE_EXTENSION_STATICLIB = lib
+QMAKE_SYMBIAN_SHLIB = 1
+
+DEFINES *= __PRODUCT_INCLUDE__=\<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh\> \
+ __SYMBIAN32__ \
+ __MARM_INTERWORK__ \
+ _UNICODE \
+ __S60_50__ \
+ __S60_3X__ \
+ __SERIES60_3X__ \
+ __EPOC32__ \
+ __MARM__ \
+ __EABI__ \
+ __MARM_ARMV5__ \
+ __SUPPORT_CPP_EXCEPTIONS__
+
+QMAKE_CFLAGS_DEBUG += -g
+QMAKE_CXXFLAGS_DEBUG += -g
+QMAKE_CFLAGS_RELEASE += -O2 -Otime
+QMAKE_CXXFLAGS_RELEASE += -O2 -Otime
+
diff --git a/mkspecs/common/symbian/symbian-mmp.conf b/mkspecs/common/symbian/symbian-mmp.conf
new file mode 100644
index 0000000..507b60c
--- /dev/null
+++ b/mkspecs/common/symbian/symbian-mmp.conf
@@ -0,0 +1,77 @@
+#
+# qmake configuration for symbian-*
+#
+
+include(symbian.conf)
+
+contains(QMAKE_HOST.os, "Windows") {
+ QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
+ QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
+ QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
+} else {
+ QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc
+ QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic
+ QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc
+}
+
+load(symbian/add_mmp_rules)
+
+symbian-abld {
+# Versions of abld prior to Symbian^3 have a bug where you cannot remove something from the command line without replacing it
+# Rather than figure out which version of abld we're using, we'll replace the command with a macro *that should never be used*
+ MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA = "OPTION_REPLACE ARMCC --export_all_vtbl -D__QT_NOEFFECTMACRO_DONOTUSE"
+} else {
+ MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA = "OPTION_REPLACE ARMCC --export_all_vtbl // don't use --export_all_vtbl"
+}
+MMP_RULES += PAGED BYTEPAIRCOMPRESSTARGET
+MMP_RULES += $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA
+SYMBIAN_PLATFORMS = WINSCW GCCE ARMV5 ARMV6
+
+INCLUDEPATH = \
+ $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off \
+ $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian \
+ $${EPOCROOT}epoc32/include \
+ $$OS_LAYER_LIBC_SYSTEMINCLUDE \
+ $$INCLUDEPATH
+
+# Ensure '.' directory is the first in include path.
+# RVCT seems to do this automatically, but WINSCW compiler does not, so add it here.
+MMP_RULES += "USERINCLUDE ."
+
+# Supports S60 3.0, 3.1, 3.2 and 5.0 by default
+default_deployment.pkg_prerules = \
+ "; Default HW/platform dependencies" \
+ "[0x101F7961],0,0,0,{\"S60ProductID\"}" \
+ "[0x102032BE],0,0,0,{\"S60ProductID\"}" \
+ "[0x102752AE],0,0,0,{\"S60ProductID\"}" \
+ "[0x1028315F],0,0,0,{\"S60ProductID\"}" \
+ " "
+
+DEPLOYMENT += default_deployment
+
+exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) {
+ S60_VERSION = 5.0
+} else {
+ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) {
+ S60_VERSION = 3.2
+ } else {
+ S60_VERSION = 3.1
+ MMP_RULES -= PAGED BYTEPAIRCOMPRESSTARGET
+ }
+}
+
+QMAKE_CXXFLAGS_FAST_VFP.ARMCC = --fpmode fast
+# [TODO] QMAKE_CXXFLAGS_FAST_VFP.GCCE =
+
+symbian {
+ armfpu = $$find(MMP_RULES, "ARMFPU")
+ !isEmpty(armfpu) {
+ vfpv2 = $$find(MMP_RULES, "vfpv2")
+ !isEmpty(vfpv2) {
+ # we will respect fpu setting obtained from configure, but,
+ # if vfpv2 or softvfp+vfpv2 used we want to force RunFast VFP mode
+ QMAKE_CXXFLAGS.ARMCC += $${QMAKE_CXXFLAGS_FAST_VFP.ARMCC}
+ # [TODO] QMAKE_CXXFLAGS.GCCE += $${QMAKE_CXXFLAGS_FAST_VFP.GCCE}
+ }
+ }
+}
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index c39b39d..0b6de5e 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -1,19 +1,22 @@
#
-# qmake configuration for symbian-*
+# qmake configuration for all symbian mkspecs
#
TEMPLATE = app
-CONFIG += qt warn_on release incremental
+CONFIG += qt warn_on release incremental link_prl sis_targets
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
DEFINES += UNICODE QT_KEYPAD_NAVIGATION QT_SOFTKEYS_ENABLED QT_USE_MATH_H_FLOATS
+
+# QNetworkAccessManager to create a network session by default
+DEFINES += QT_QNAM_DEFAULT_NETWORK_SESSION
+
QMAKE_COMPILER_DEFINES += SYMBIAN
QMAKE_EXT_OBJ = .o
QMAKE_EXT_RES = _res.o
-QMAKE_CC = gcc
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = byacc
@@ -26,9 +29,13 @@ QMAKE_CFLAGS_RELEASE =
QMAKE_CFLAGS_DEBUG =
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
-QMAKE_CXX = g++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS.CW =
+# Symbian build system applies -cwd source on the MWCC command line.
+# this causes problems with include paths, -cwd include uses the same
+# rules for include paths as ARMCC
+# This should really be fixed in raptor, as using CXXFLAGS means we pass
+# both on the command line and rely on the compiler using the last specified
+QMAKE_CXXFLAGS.CW = -cwd include
QMAKE_CXXFLAGS.ARMCC = --visibility_inlines_hidden
QMAKE_CXXFLAGS.GCCE = -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
@@ -46,12 +53,6 @@ QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
QMAKE_INCDIR =
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
-
-QMAKE_LINK =
QMAKE_LFLAGS =
QMAKE_LFLAGS.ARMCC =
QMAKE_LFLAGS_EXCEPTIONS_ON =
@@ -65,12 +66,13 @@ QMAKE_LINK_OBJECT_MAX =
QMAKE_LINK_OBJECT_SCRIPT=
QMAKE_LIBS = -llibc -llibm -leuser -llibdl
-QMAKE_LIBS_CORE = $$QMAKE_LIBS -llibpthread -lefsrv
+QMAKE_LIBS_CORE = $$QMAKE_LIBS -lefsrv
QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lhal -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc -lcentralrepository
QMAKE_LIBS_NETWORK =
QMAKE_LIBS_EGL = -llibEGL
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_OPENVG = -llibOpenVG -lfbscli -lbitgdi -lgdi
+QMAKE_LIBS_THREAD = -llibpthread
QMAKE_LIBS_COMPAT =
QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib
QMAKE_LIBS_S60 = -lavkon
@@ -83,9 +85,10 @@ contains(QMAKE_HOST.os,Windows) {
QMAKE_COPY = copy /y
QMAKE_COPY_DIR = xcopy /s /q /y /i
QMAKE_MOVE = move
- QMAKE_DEL_FILE = del
+ QMAKE_DEL_FILE = del 2> NUL
QMAKE_MKDIR = mkdir
QMAKE_DEL_DIR = rmdir
+ QMAKE_DEL_TREE = rmdir /s /q
QMAKE_CHK_DIR_EXISTS = if not exist
} else {
QMAKE_COPY = cp
@@ -94,87 +97,20 @@ contains(QMAKE_HOST.os,Windows) {
QMAKE_DEL_FILE = rm -f
QMAKE_MKDIR = mkdir
QMAKE_DEL_DIR = rmdir
+ QMAKE_DEL_TREE = rm -rf
QMAKE_CHK_DIR_EXISTS = test -d
}
-QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
-QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
-QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
+QMAKE_IDL = midl
+QMAKE_LIB = ar -ru
+QMAKE_RC = windres
+QMAKE_ZIP = zip -r -9
-QMAKE_IDL = midl
-QMAKE_LIB = ar -ru
-QMAKE_RC = windres
-QMAKE_ZIP = zip -r -9
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
-QMAKE_STRIP = strip
-QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+QT_ARCH = symbian
load(qt_config)
-load(platform_paths)
-load(add_mmp_rules)
+load(symbian/platform_paths)
-symbian-abld {
-# Versions of abld prior to Symbian^3 have a bug where you cannot remove something from the command line without replacing it
-# Rather than figure out which version of abld we're using, we'll replace the command with a macro *that should never be used*
- MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA = "OPTION_REPLACE ARMCC --export_all_vtbl -D__QT_NOEFFECTMACRO_DONOTUSE"
-} else {
- MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA = "OPTION_REPLACE ARMCC --export_all_vtbl // don't use --export_all_vtbl"
-}
-MMP_RULES += PAGED BYTEPAIRCOMPRESSTARGET
-MMP_RULES += $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA
-SYMBIAN_PLATFORMS = WINSCW GCCE ARMV5 ARMV6
-
-INCLUDEPATH = \
- $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off \
- $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian \
- $${EPOCROOT}epoc32/include \
- $$OS_LAYER_LIBC_SYSTEMINCLUDE \
- $$INCLUDEPATH
-
-# Ensure '.' directory is the first in include path.
-# RVCT seems to do this automatically, but WINSCW compiler does not, so add it here.
-MMP_RULES += "USERINCLUDE ."
-
-# pkg_depends_webkit, pkg_depends_core, and pkg_platform_dependencies can be removed by developer
-# if multiple languages need to be supported by pkg file. In that case the developer should declare
-# multiple language compatible dependency statements him/herself.
-
-default_deployment.pkg_prerules += pkg_depends_webkit pkg_depends_qt pkg_platform_dependencies
-
-# Supports S60 3.0, 3.1, 3.2 and 5.0 by default
-pkg_platform_dependencies = \
- "; Default HW/platform dependencies" \
- "[0x101F7961],0,0,0,{\"S60ProductID\"}" \
- "[0x102032BE],0,0,0,{\"S60ProductID\"}" \
- "[0x102752AE],0,0,0,{\"S60ProductID\"}" \
- "[0x1028315F],0,0,0,{\"S60ProductID\"}" \
- " "
-
-DEPLOYMENT += default_deployment
-
-exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v5.0.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/Series60v5.0.sis) {
- S60_VERSION = 5.0
-} else {
- exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v3.2.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/Series60v3.2.sis) {
- S60_VERSION = 3.2
- } else {
- S60_VERSION = 3.1
- MMP_RULES -= PAGED BYTEPAIRCOMPRESSTARGET
- }
-}
-
-QMAKE_CXXFLAGS_FAST_VFP.ARMCC = --fpmode fast
-# [TODO] QMAKE_CXXFLAGS_FAST_VFP.GCCE =
-
-symbian {
- armfpu = $$find(MMP_RULES, "ARMFPU")
- !isEmpty(armfpu) {
- vfpv2 = $$find(MMP_RULES, "vfpv2")
- !isEmpty(vfpv2) {
- # we will respect fpu setting obtained from configure, but,
- # if vfpv2 or softvfp+vfpv2 used we want to force RunFast VFP mode
- QMAKE_CXXFLAGS.ARMCC += $${QMAKE_CXXFLAGS_FAST_VFP.ARMCC}
- # [TODO] QMAKE_CXXFLAGS.GCCE += $${QMAKE_CXXFLAGS_FAST_VFP.GCCE}
- }
- }
-}
diff --git a/mkspecs/common/unix.conf b/mkspecs/common/unix.conf
index 4cb171e..c480ba4 100644
--- a/mkspecs/common/unix.conf
+++ b/mkspecs/common/unix.conf
@@ -9,3 +9,6 @@ QMAKE_YACCFLAGS += -d
QMAKE_YACCFLAGS_MANGLE += -p $base -b $base
QMAKE_YACC_HEADER = $base.tab.h
QMAKE_YACC_SOURCE = $base.tab.c
+QMAKE_PREFIX_SHLIB = lib
+QMAKE_PREFIX_STATICLIB = lib
+QMAKE_EXTENSION_STATICLIB = a
diff --git a/mkspecs/common/wince/qmake.conf b/mkspecs/common/wince/qmake.conf
index ff99f1b..705cdc3 100644
--- a/mkspecs/common/wince/qmake.conf
+++ b/mkspecs/common/wince/qmake.conf
@@ -66,7 +66,6 @@ QMAKE_LIBS_COMPAT =
QMAKE_LIBS_EGL = libEGL.lib
QMAKE_LIBS_OPENGL_ES1 = libGLES_CM.lib
-QMAKE_LIBS_OPENGL_ES1CL = libGLES_CL.lib
QMAKE_LIBS_OPENGL_ES2 = libGLESv2.lib
QMAKE_LIBS_QT_ENTRY = -lqtmain
diff --git a/mkspecs/cygwin-g++/qmake.conf b/mkspecs/cygwin-g++/qmake.conf
index 9cbc3d7..af9881b 100644
--- a/mkspecs/cygwin-g++/qmake.conf
+++ b/mkspecs/cygwin-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/cygwin-g++/qplatformdefs.h b/mkspecs/cygwin-g++/qplatformdefs.h
index 9b3be62..a6f57d2 100644
--- a/mkspecs/cygwin-g++/qplatformdefs.h
+++ b/mkspecs/cygwin-g++/qplatformdefs.h
@@ -81,58 +81,14 @@
//#include <windows.h>
#include <netinet/in.h>
+#define QT_NO_USE_FSEEKO
+#include "../common/posix/qplatformdefs.h"
-#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_FOPEN ::fopen
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
-
-#define QT_SOCKLEN_T socklen_t
+#undef QT_OPEN_LARGEFILE
#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++/qmake.conf b/mkspecs/darwin-g++/qmake.conf
index 72baa89..995679e 100644
--- a/mkspecs/darwin-g++/qmake.conf
+++ b/mkspecs/darwin-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release link_prl native_precompiled_headers
QT += core gui
diff --git a/mkspecs/darwin-g++/qplatformdefs.h b/mkspecs/darwin-g++/qplatformdefs.h
index 5aea69f..7a67339 100644
--- a/mkspecs/darwin-g++/qplatformdefs.h
+++ b/mkspecs/darwin-g++/qplatformdefs.h
@@ -74,52 +74,10 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
+#include "../common/posix/qplatformdefs.h"
-#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_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
diff --git a/mkspecs/features/assistant.prf b/mkspecs/features/assistant.prf
deleted file mode 100644
index 25e5d4d..0000000
--- a/mkspecs/features/assistant.prf
+++ /dev/null
@@ -1,9 +0,0 @@
-
-INCLUDEPATH = $$QMAKE_INCDIR_QT/QtAssistant $$INCLUDEPATH
-
-mac:!static:contains(QT_CONFIG, qt_framework) {
- qtAddLibrary(QtAssistant)
-} else {
- qtAddLibrary(QtAssistantClient)
-}
-QT += network
diff --git a/mkspecs/features/egl.prf b/mkspecs/features/egl.prf
index 00f70d3..7e7d098 100644
--- a/mkspecs/features/egl.prf
+++ b/mkspecs/features/egl.prf
@@ -11,14 +11,6 @@ wince*:contains(QT_CONFIG, opengles1) {
exists($$p):LIBS_PRIVATE += -L$$p
}
DEFINES += QT_GLES_EGL
-} else:wince*:contains(QT_CONFIG, opengles1cl) {
- INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES1CL
- LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES1CL
- LIBS += $$QMAKE_LFLAGS_EGL
- for(p, QMAKE_LIBDIR_OPENGL_ES1CL) {
- exists($$p):LIBS_PRIVATE += -L$$p
- }
- DEFINES += QT_GLES_EGL
} else {
INCLUDEPATH += $$QMAKE_INCDIR_EGL
LIBS_PRIVATE += $$QMAKE_LIBS_EGL
diff --git a/mkspecs/features/incredibuild_xge.prf b/mkspecs/features/incredibuild_xge.prf
index 2fce443..e241ca4 100644
--- a/mkspecs/features/incredibuild_xge.prf
+++ b/mkspecs/features/incredibuild_xge.prf
@@ -3,7 +3,7 @@ contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc") {
# The VCPROJ generator will replace the \r\h with the coded \r\n: &#x0d;&#x0a;
# No other generator understands the \h
- win32-msvc.net|win32-msvc2*|wince*msvc*: EOC = \$\$escape_expand(\r\h)
+ win32-msvc2*|wince*msvc*: EOC = \$\$escape_expand(\r\h)
for(xge, INCREDIBUILD_XGE) {
eval($${xge}.commands = Rem IncrediBuild_AllowRemote $$EOC Rem IncrediBuild_OutputFile $$replace($${xge}.output,/,\\) $$EOC $$eval($${xge}.commands))
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index e4b7dae..e806ef6 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -22,7 +22,7 @@ win32:count($$list($$INCPATH), 40, >) {
if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) {
# the VCPROJ generator will replace the \r\h with the coded \r\n: &#x0d;&#x0a;
# No other generator understands the \h
- if(win32-msvc.net|win32-msvc2*|wince*msvc*): EOC = $$escape_expand(\r\h)
+ if(win32-msvc2*|wince*msvc*): EOC = $$escape_expand(\r\h)
else: EOC = $$escape_expand(\\)$$escape_expand(\n\t)
}
diff --git a/mkspecs/features/sis_targets.prf b/mkspecs/features/sis_targets.prf
new file mode 100644
index 0000000..66a7a9d
--- /dev/null
+++ b/mkspecs/features/sis_targets.prf
@@ -0,0 +1,139 @@
+# Sis file creation
+contains(TEMPLATE, app)|!isEmpty(DEPLOYMENT) {
+ symbian-abld|symbian-sbsv2 {
+ sis_destdir =
+ make_cache_name = .make.cache
+ sis_target.target = sis
+ sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \
+ $(if $(wildcard $$make_cache_name), \
+ $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \
+ , \
+ $(if $(QT_SIS_TARGET), \
+ $(MAKE) -f $(MAKEFILE) ok_sis \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nocache \
+ ) \
+ ) \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
+ )
+
+ ok_sis_target.target = ok_sis
+ ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
+ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+ target_sis_target.target = $${sis_destdir}$${TARGET}.sis
+ target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis
+
+ installer_sis_target.target = installer_sis
+ installer_sis_target.commands = $(if $(wildcard $$basename(TARGET)_installer.pkg), \
+ $(MAKE) -f $(MAKEFILE) ok_installer_sis \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
+ )
+ installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis
+
+ ok_installer_sis_target.target = ok_installer_sis
+ ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \
+ $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+ fail_sis_nopkg_target.target = fail_sis_nopkg
+ fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)"
+
+ fail_sis_nocache_target.target = fail_sis_nocache
+ fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)"
+
+ stub_sis_target.target = stub_sis
+ stub_sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \
+ $(if $(wildcard $$make_cache_name), \
+ $(MAKE) -f $(MAKEFILE) ok_stub_sis MAKEFILES=$$make_cache_name \
+ , \
+ $(if $(QT_SIS_TARGET), \
+ $(MAKE) -f $(MAKEFILE) ok_stub_sis \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nocache \
+ ) \
+ ) \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
+ )
+
+ ok_stub_sis_target.target = ok_stub_sis
+ ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
+ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+ QMAKE_EXTRA_TARGETS += sis_target \
+ ok_sis_target \
+ target_sis_target \
+ installer_sis_target \
+ ok_installer_sis_target \
+ fail_sis_nopkg_target \
+ fail_sis_nocache_target \
+ stub_sis_target \
+ ok_stub_sis_target
+ # Sbsv2 has its own store_build target which is using flms.
+ !symbian-sbsv2 {
+ contains(QMAKE_HOST.os, "Windows") {
+ shellFixedHash = $${LITERAL_HASH}
+ } else {
+ shellFixedHash = \\$${LITERAL_HASH}
+ }
+ store_build_target.target = store_build
+ store_build_target.commands = \
+ @echo $${shellFixedHash} ============================================================================== > $$make_cache_name \
+ && echo $${shellFixedHash} This file is generated by make and should not be modified by the user >> $$make_cache_name \
+ && echo $${shellFixedHash} Name : $$make_cache_name >> $$make_cache_name \
+ && echo $${shellFixedHash} Part of : lineedits >> $$make_cache_name \
+ && echo $${shellFixedHash} Description : This file is used to cache last build target for >> $$make_cache_name \
+ && echo $${shellFixedHash} make sis target. >> $$make_cache_name \
+ && echo $${shellFixedHash} Version : >> $$make_cache_name \
+ && echo $${shellFixedHash} >> $$make_cache_name \
+ && echo $${shellFixedHash} ============================================================================== >> $$make_cache_name \
+ && echo. >> $$make_cache_name \
+ && echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name
+
+ QMAKE_EXTRA_TARGETS += store_build_target
+ }
+ } else {
+ sis_destdir = $$DESTDIR
+ !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\]$"):sis_destdir = $${sis_destdir}/
+ contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\")
+
+ sis_target.target = sis
+ sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
+ - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+ sis_target.depends = first
+
+ target_sis_target.target = $${sis_destdir}$${TARGET}.sis
+ target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis
+
+ installer_sis_target.target = installer_sis
+ installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \
+ $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+ installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis
+
+ !isEmpty(DESTDIR) {
+ sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR
+ installer_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR
+ }
+
+ QMAKE_EXTRA_TARGETS += sis_target \
+ target_sis_target \
+ installer_sis_target
+ }
+} else {
+ contains(TEMPLATE, subdirs) {
+ # Enable recursive sis target.
+ sis_target.CONFIG = recursive
+ sis_target.recurse = $$SUBDIRS
+ } else {
+ # Make sure we build everything, since other sis targets in a recursive invocation
+ # may depend on them, even if this one is empty.
+ sis_target.depends = first
+ }
+ sis_target.commands =
+ sis_target.target = sis
+ QMAKE_EXTRA_TARGETS += sis_target
+}
+
+QMAKE_DISTCLEAN += $${sis_destdir}$${TARGET}.sis
diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf
index 3a26325..9979f40 100644
--- a/mkspecs/features/symbian/application_icon.prf
+++ b/mkspecs/features/symbian/application_icon.prf
@@ -15,37 +15,53 @@ contains( CONFIG, no_icon ) {
}
# Try to produce indentical string to fixedTarget in SymbianMakefileGenerator, replaced chars taken
- # from SymbianMakefileGenerator::removeSpecialCharacters.
+ # from SymbianCommonGenerator::removeSpecialCharacters.
#
# Note: it is not a major problem even baseTarget is not 100% identical to fixedTarget since qmake
# only uses filename from RSS_RULES.icon_file when referring to icon file name.
baseTarget = $$basename(TARGET)
baseTarget = $$replace(baseTarget, /,_)
baseTarget = $$replace(baseTarget, \\,_)
- baseTarget = $$replace(baseTarget, -,_)
- baseTarget = $$replace(baseTarget, :,_)
- baseTarget = $$replace(baseTarget, \.,_)
baseTarget = $$replace(baseTarget, " ",_)
+ symbian-abld|symbian-sbsv2 {
+ baseTarget = $$replace(baseTarget, -,_)
+ baseTarget = $$replace(baseTarget, \.,_)
+ baseTarget = $$replace(baseTarget, :,_)
+ }
# Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code
- symbian-abld {
+ !symbian-sbsv2 {
+ !contains(ICON, "^(/|\\\\|.:).*"):ICON = $$_PRO_FILE_PWD_/$$ICON #absolute path
#Makefile: requires paths with backslash
- ICON = $$replace( ICON, /, \\)
+ ICON_backslashed = $$ICON
+
+ symbian-abld {
+ mifIconZDir = ${ZDIR}$$APP_RESOURCE_DIR
+ } else {
+ isEmpty(DESTDIR) {
+ mifIconZDir = .
+ } else {
+ mifIconZDir = $$DESTDIR
+ }
+ }
# Extra compiler rules for mifconv
- mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${baseTarget}.mif
+ mifconv.target = $$mifIconZDir/$${baseTarget}.mif
+ contains(QMAKE_HOST.os, "Windows") {
+ ICON_backslashed = $$replace(ICON_backslashed, /, \\)
+ mifconv.target = $$replace(mifconv.target, /, \\)
+ }
# Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library
# svg-t icons should always use /c32 depth
- mifconv.commands = mifconv ${QMAKE_FILE_OUT} /c32 ${QMAKE_FILE_IN}
- mifconv.input = ICON
- mifconv.CONFIG = no_link combine
- # target_predeps together with combine seems not to work correctly, lets define it by ourselves
- PRE_TARGETDEPS += $$mifconv.output
- QMAKE_EXTRA_COMPILERS += mifconv
+ mifconv.commands = mifconv $$mifconv.target /c32 $$ICON_backslashed
+
+ mifconv.depends = $$ICON
+ PRE_TARGETDEPS += $$mifconv.target
+ QMAKE_EXTRA_TARGETS += mifconv
+ QMAKE_DISTCLEAN += $$mifconv.target
}
# Rules to use generated MIF file from symbian resources
- RSS_RULES.number_of_icons = $$size(ICON)
+ RSS_RULES.number_of_icons = $$size(ICON_backslashed)
RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif
}
}
-
diff --git a/mkspecs/features/symbian/debug.prf b/mkspecs/features/symbian/debug.prf
new file mode 100644
index 0000000..b5afeb6
--- /dev/null
+++ b/mkspecs/features/symbian/debug.prf
@@ -0,0 +1 @@
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/udeb
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf
index 48d91aa..a1f0c8d 100644
--- a/mkspecs/features/symbian/def_files.prf
+++ b/mkspecs/features/symbian/def_files.prf
@@ -3,32 +3,75 @@
CONFIG -= def_files_disabled
-# Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one
-# (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements
-# in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword)
-!contains(MMP_RULES, defBlock) {
- # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files
- # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE
- # statements - they use the qmake generated statements instead
- # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage
- !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): {
- !isEmpty(defFilePath) {
- defBlock = \
- "$${LITERAL_HASH}ifdef WINSCW" \
- "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \
- "$${LITERAL_HASH}elif defined EABI" \
- "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \
- "$${LITERAL_HASH}endif"
- } else {
- # If defFilePath is not defined, then put the folders containing the DEF files at the
- # same level as the .pro (and generated MMP) file(s)
- defBlock = \
- "$${LITERAL_HASH}ifdef WINSCW" \
- "DEFFILE ./bwins/$${TARGET}.def" \
- "$${LITERAL_HASH}elif defined EABI" \
- "DEFFILE ./eabi/$${TARGET}.def" \
- "$${LITERAL_HASH}endif"
+symbian-abld|symbian-sbsv2 {
+ # Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one
+ # (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements
+ # in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword)
+ !contains(MMP_RULES, defBlock) {
+ # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files
+ # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE
+ # statements - they use the qmake generated statements instead
+ # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage
+ !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): {
+ !isEmpty(DEF_FILE) {
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE $$DEF_FILE/bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE $$DEF_FILE/eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ } else:!isEmpty(defFilePath) {
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ } else {
+ # If defFilePath is not defined, then put the folders containing the DEF files at the
+ # same level as the .pro (and generated MMP) file(s)
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE ./bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE ./eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ }
+ MMP_RULES += defBlock
}
- MMP_RULES += defBlock
}
+
+} else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
+ !isEmpty(DEF_FILE) {
+ defFile = $$DEF_FILE
+ } else {
+ defFile = .
+ }
+ system("$$QMAKE_CHK_DIR_EXISTS $$_PRO_FILE_PWD_/$$defFile") {
+ !exists("$$_PRO_FILE_PWD_/$$defFile/eabi") {
+ system("$$QMAKE_MKDIR $$_PRO_FILE_PWD_/$$defFile/eabi")
+ }
+ elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile/eabi/$$basename(TARGET)u.def
+ } else {
+ elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile
+ }
+ QMAKE_ELF2E32_FLAGS += "`test -e $$elf2e32FileToAdd && echo --definput=$$elf2e32FileToAdd`"
+
+ symbianObjdir = $$OBJECTS_DIR
+ isEmpty(symbianObjdir):symbianObjdir = .
+
+ freeze_target.target = freeze
+ freeze_target.depends = first
+ # The perl part is to convert to unix line endings and remove comments, which the s60 tools refuse to do.
+ freeze_target.commands = perl -n -e \'next if (/; NEW/); s/\r//g; if (/MISSING:(.*)/x) { print(\"\$\$1 ABSENT\\n\"); } else { print; }\' < $$symbianObjdir/$${TARGET}.def > $$elf2e32FileToAdd
+ #QMAKE_EXTRA_TARGETS += freeze_target
+} else:contains(TEMPLATE, subdirs) {
+ freeze_target.target = freeze
+ freeze_target.CONFIG = recursive
+ freeze_target.recurse = $$SUBDIRS
+ #QMAKE_EXTRA_TARGETS += freeze_target
+} else {
+ freeze_target.target = freeze
+ freeze_target.commands =
+ #QMAKE_EXTRA_TARGETS += freeze_target
}
diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf
index 0c952b5..0564e9b 100644
--- a/mkspecs/features/symbian/default_post.prf
+++ b/mkspecs/features/symbian/default_post.prf
@@ -28,4 +28,21 @@ contains(TEMPLATE, lib): {
contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG,qt) {
load(application_icon.prf)
-} \ No newline at end of file
+}
+
+isEmpty(TARGET.UID3):TARGET.UID3 = $$generate_uid("$${OUT_PWD}/$${TARGET}")
+isEmpty(TARGET.UID2) {
+ contains(CONFIG, stdbinary) {
+ TARGET.UID2 = 0x20004C45
+ } else {
+ contains(TEMPLATE, app) {
+ contains(QT, gui) {
+ TARGET.UID2 = 0x100039CE
+ } else {
+ TARGET.UID2 = 0
+ }
+ } else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
+ TARGET.UID2 = 0x1000008d
+ }
+ }
+}
diff --git a/mkspecs/features/symbian/do_not_build_as_thumb.prf b/mkspecs/features/symbian/do_not_build_as_thumb.prf
new file mode 100644
index 0000000..60d9382
--- /dev/null
+++ b/mkspecs/features/symbian/do_not_build_as_thumb.prf
@@ -0,0 +1,8 @@
+symbian-abld|symbian-sbsv2 {
+ MMP_RULES += ALWAYS_BUILD_AS_ARM
+} else:linux-armcc {
+ QMAKE_CFLAGS -= --thumb
+ QMAKE_CFLAGS += --arm
+ QMAKE_CXXFLAGS -= --thumb
+ QMAKE_CXXFLAGS += --arm
+}
diff --git a/mkspecs/features/symbian/moc.prf b/mkspecs/features/symbian/moc.prf
index 9c21ed7..29e0d8d 100644
--- a/mkspecs/features/symbian/moc.prf
+++ b/mkspecs/features/symbian/moc.prf
@@ -1,16 +1,18 @@
load(moc)
-RET = $$find(MOC_DIR, "(/|^)\.[^/]+/?$")
-!isEmpty(RET):{
- error("Symbian does not support directories starting with a dot. Please set MOC_DIR to a different value in your profile. MOC_DIR: $$MOC_DIR")
-}
+symbian-abld|symbian-sbsv2 {
+ RET = $$find(MOC_DIR, "(/|^)\.[^/]+/?$")
+ !isEmpty(RET):{
+ error("Symbian does not support directories starting with a dot. Please set MOC_DIR to a different value in your profile. MOC_DIR: $$MOC_DIR")
+ }
-RET = $$find(RCC_DIR, "(/|^)\.[^/]+/?$")
-!isEmpty(RET):{
- error("Symbian does not support directories starting with a dot. Please set RCC_DIR to a different value in your profile. RCC_DIR: $$RCC_DIR")
-}
+ RET = $$find(RCC_DIR, "(/|^)\.[^/]+/?$")
+ !isEmpty(RET):{
+ error("Symbian does not support directories starting with a dot. Please set RCC_DIR to a different value in your profile. RCC_DIR: $$RCC_DIR")
+ }
-RET = $$find(OBJECTS_DIR, "(/|^)\.[^/]+/?$")
-!isEmpty(RET):{
- error("Symbian does not support directories starting with a dot. Please set OBJECTS_DIR to a different value in your profile. OBJECTS_DIR: $$OBJECTS_DIR")
+ RET = $$find(OBJECTS_DIR, "(/|^)\.[^/]+/?$")
+ !isEmpty(RET):{
+ error("Symbian does not support directories starting with a dot. Please set OBJECTS_DIR to a different value in your profile. OBJECTS_DIR: $$OBJECTS_DIR")
+ }
}
diff --git a/mkspecs/features/symbian/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf
index a55e842..f05a885 100644
--- a/mkspecs/features/symbian/platform_paths.prf
+++ b/mkspecs/features/symbian/platform_paths.prf
@@ -50,6 +50,12 @@
#
# ==============================================================================
+symbian-abld|symbian-sbsv2 {
+ epocroot_prefix = /
+} else {
+ epocroot_prefix = $${EPOCROOT}
+}
+
exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# Load platform specific paths
@@ -66,10 +72,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(APP_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/app/$$1)
+ return ($${epocroot_prefix}epoc32/include/app/$$1)
}
defineReplace(APP_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/app/$$1)
+ return ($${epocroot_prefix}epoc32/include/app/$$1)
}
# ---------------------------------------
@@ -77,10 +83,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(APP_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/platform/app/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/app/$$1)
}
defineReplace(APP_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/platform/app/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/app/$$1)
}
# ---------------------------------------
@@ -88,10 +94,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(MW_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/mw/$$1)
+ return ($${epocroot_prefix}epoc32/include/mw/$$1)
}
defineReplace(MW_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/mw/$$1)
+ return ($${epocroot_prefix}epoc32/include/mw/$$1)
}
# ---------------------------------------
@@ -99,10 +105,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(MW_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/platform/mw/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/mw/$$1)
}
defineReplace(MW_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/platform/mw/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/mw/$$1)
}
# ---------------------------------------
@@ -110,11 +116,11 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(OSEXT_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/$$1)
+ return ($${epocroot_prefix}epoc32/include/$$1)
}
# WARNING: If the following path changes see the exists() function around line 219
defineReplace(OS_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/$$1)
+ return ($${epocroot_prefix}epoc32/include/$$1)
}
# ---------------------------------------
@@ -122,10 +128,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(OSEXT_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/platform/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/$$1)
}
defineReplace(OS_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/platform/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/$$1)
}
# ---------------------------------------
@@ -152,18 +158,18 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# the headers come from middleware or os-layer => thus they are first.
APP_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/mw \
- /epoc32/include/platform/mw \
- /epoc32/include/platform \
- /epoc32/include/app \
- /epoc32/include/platform/app \
- /epoc32/include/platform/loc \
- /epoc32/include/platform/mw/loc \
- /epoc32/include/platform/app/loc \
- /epoc32/include/platform/loc/sc \
- /epoc32/include/platform/mw/loc/sc \
- /epoc32/include/platform/app/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/mw \
+ $${epocroot_prefix}epoc32/include/platform/mw \
+ $${epocroot_prefix}epoc32/include/platform \
+ $${epocroot_prefix}epoc32/include/app \
+ $${epocroot_prefix}epoc32/include/platform/app \
+ $${epocroot_prefix}epoc32/include/platform/loc \
+ $${epocroot_prefix}epoc32/include/platform/mw/loc \
+ $${epocroot_prefix}epoc32/include/platform/app/loc \
+ $${epocroot_prefix}epoc32/include/platform/loc/sc \
+ $${epocroot_prefix}epoc32/include/platform/mw/loc/sc \
+ $${epocroot_prefix}epoc32/include/platform/app/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the middleware-layer. It includes all
@@ -171,14 +177,14 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# middleware-layer components.
MW_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/mw \
- /epoc32/include/platform/mw \
- /epoc32/include/platform \
- /epoc32/include/platform/loc \
- /epoc32/include/platform/mw/loc \
- /epoc32/include/platform/loc/sc \
- /epoc32/include/platform/mw/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/mw \
+ $${epocroot_prefix}epoc32/include/platform/mw \
+ $${epocroot_prefix}epoc32/include/platform \
+ $${epocroot_prefix}epoc32/include/platform/loc \
+ $${epocroot_prefix}epoc32/include/platform/mw/loc \
+ $${epocroot_prefix}epoc32/include/platform/loc/sc \
+ $${epocroot_prefix}epoc32/include/platform/mw/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the osextensions-layer. It includes all
@@ -186,10 +192,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# os-layer components.
OS_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/platform \
- /epoc32/include/platform/loc \
- /epoc32/include/platform/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/platform \
+ $${epocroot_prefix}epoc32/include/platform/loc \
+ $${epocroot_prefix}epoc32/include/platform/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the os-layer. This is intended
@@ -198,7 +204,7 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# 2 files already contain the /epoc32/include as system include path.
OS_LAYER_KERNEL_SYSTEMINCLUDE = \
- /epoc32/include/platform
+ $${epocroot_prefix}epoc32/include/platform
# ---------------------------------------
@@ -237,10 +243,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(APP_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/applications/$$1)
+ return ($${epocroot_prefix}epoc32/include/applications/$$1)
}
defineReplace(APP_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/applications/$$1)
+ return ($${epocroot_prefix}epoc32/include/applications/$$1)
}
# ---------------------------------------
@@ -248,10 +254,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(APP_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/domain/applications/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/applications/$$1)
}
defineReplace(APP_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/domain/applications/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/applications/$$1)
}
# ---------------------------------------
@@ -259,10 +265,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(MW_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/middleware/$$1)
+ return ($${epocroot_prefix}epoc32/include/middleware/$$1)
}
defineReplace(MW_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/middleware/$$1)
+ return ($${epocroot_prefix}epoc32/include/middleware/$$1)
}
# ---------------------------------------
@@ -270,10 +276,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(MW_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/domain/middleware/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/middleware/$$1)
}
defineReplace(MW_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/domain/middleware/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/middleware/$$1)
}
# ---------------------------------------
@@ -281,11 +287,11 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(OSEXT_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/osextensions/$$1)
+ return ($${epocroot_prefix}epoc32/include/osextensions/$$1)
}
# WARNING: If the following path changes see the exists() function around line 430
defineReplace(OS_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/osextensions/$$1)
+ return ($${epocroot_prefix}epoc32/include/osextensions/$$1)
}
# ---------------------------------------
@@ -293,10 +299,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(OSEXT_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/domain/osextensions/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/osextensions/$$1)
}
defineReplace(OS_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/domain/osextensions/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/osextensions/$$1)
}
# ---------------------------------------
@@ -323,20 +329,20 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# the headers come from middleware or os-layer => thus they are first.
APP_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/oem \
- /epoc32/include/middleware \
- /epoc32/include/domain/middleware \
- /epoc32/include/osextensions \
- /epoc32/include/domain/osextensions \
- /epoc32/include/applications \
- /epoc32/include/domain/applications \
- /epoc32/include/domain/osextensions/loc \
- /epoc32/include/domain/middleware/loc \
- /epoc32/include/domain/applications/loc \
- /epoc32/include/domain/osextensions/loc/sc \
- /epoc32/include/domain/middleware/loc/sc \
- /epoc32/include/domain/applications/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/middleware \
+ $${epocroot_prefix}epoc32/include/domain/middleware \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions \
+ $${epocroot_prefix}epoc32/include/applications \
+ $${epocroot_prefix}epoc32/include/domain/applications \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc \
+ $${epocroot_prefix}epoc32/include/domain/middleware/loc \
+ $${epocroot_prefix}epoc32/include/domain/applications/loc \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc/sc \
+ $${epocroot_prefix}epoc32/include/domain/middleware/loc/sc \
+ $${epocroot_prefix}epoc32/include/domain/applications/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the middleware-layer. It includes all
@@ -344,16 +350,16 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# middleware-layer components.
MW_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/oem \
- /epoc32/include/middleware \
- /epoc32/include/domain/middleware \
- /epoc32/include/osextensions \
- /epoc32/include/domain/osextensions \
- /epoc32/include/domain/osextensions/loc \
- /epoc32/include/domain/middleware/loc \
- /epoc32/include/domain/osextensions/loc/sc \
- /epoc32/include/domain/middleware/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/middleware \
+ $${epocroot_prefix}epoc32/include/domain/middleware \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc \
+ $${epocroot_prefix}epoc32/include/domain/middleware/loc \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc/sc \
+ $${epocroot_prefix}epoc32/include/domain/middleware/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the osextensions-layer. It includes all
@@ -361,12 +367,12 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# os-layer components.
OS_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/oem \
- /epoc32/include/osextensions \
- /epoc32/include/domain/osextensions \
- /epoc32/include/domain/osextensions/loc \
- /epoc32/include/domain/osextensions/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the os-layer. This is intended
@@ -375,9 +381,9 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# 2 files already contain the /epoc32/include as system include path.
OS_LAYER_KERNEL_SYSTEMINCLUDE = \
- /epoc32/include/oem \
- /epoc32/include/osextensions \
- /epoc32/include/domain/osextensions
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions
# ---------------------------------------
@@ -387,41 +393,41 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
OS_LAYER_LIBC_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) \
$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/sys) \
- /epoc32/include/stdapis \
- /epoc32/include/stdapis/sys
+ $${epocroot_prefix}epoc32/include/stdapis \
+ $${epocroot_prefix}epoc32/include/stdapis/sys
OS_LAYER_GLIB_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0) \
$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/glib) \
$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/gObject) \
- /epoc32/include/stdapis/glib-2.0 \
- /epoc32/include/stdapis/glib-2.0/glib \
- /epoc32/include/stdapis/glib-2.0/gObject
+ $${epocroot_prefix}epoc32/include/stdapis/glib-2.0 \
+ $${epocroot_prefix}epoc32/include/stdapis/glib-2.0/glib \
+ $${epocroot_prefix}epoc32/include/stdapis/glib-2.0/gObject
OS_LAYER_SSL_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/openssl) \
- /epoc32/include/stdapis/openssl
+ $${epocroot_prefix}epoc32/include/stdapis/openssl
# stlportv5 is preferred over stlport as it has the throwing version of operator new
OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5) \
- /epoc32/include/stdapis/stlportv5
+ $${epocroot_prefix}epoc32/include/stdapis/stlportv5
exists($${EPOCROOT}epoc32/include/osextensions/stdapis/stlport) \
|exists($${EPOCROOT}epoc32/include/stdapis/stlport) {
!exists($${EPOCROOT}epoc32/include/osextensions/stdapis/stlportv5) \
:!exists($${EPOCROOT}epoc32/include/stdapis/stlportv5) {
OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) \
- /epoc32/include/stdapis/stlport
+ $${epocroot_prefix}epoc32/include/stdapis/stlport
}
}
OS_LAYER_BOOST_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/boost) \
- /epoc32/include/stdapis/boost
+ $${epocroot_prefix}epoc32/include/stdapis/boost
OS_LAYER_DBUS_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0) \
$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0/dbus) \
- /epoc32/include/stdapis/dbus-1.0 \
- /epoc32/include/stdapis/dbus-1.0/dbus
+ $${epocroot_prefix}epoc32/include/stdapis/dbus-1.0 \
+ $${epocroot_prefix}epoc32/include/stdapis/dbus-1.0/dbus
OS_LAYER_LIBUTILITY_SYSTEMINCLUDE = $$OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/utility) \
- /epoc32/include/stdapis/utility
+ $${epocroot_prefix}epoc32/include/stdapis/utility
}
@@ -433,31 +439,31 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(CORE_APP_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/core/app/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/core/app/$$1)
}
defineReplace(CORE_MW_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/core/mw/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/core/mw/$$1)
}
defineReplace(LANGUAGE_APP_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/language/app/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/language/app/$$1)
}
defineReplace(LANGUAGE_MW_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/language/mw/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/language/mw/$$1)
}
defineReplace(CUSTOMER_APP_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/customer/app/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/customer/app/$$1)
}
defineReplace(CUSTOMER_MW_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/customer/mw/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/customer/mw/$$1)
}
defineReplace(CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/customervariant/app/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/customervariant/app/$$1)
}
defineReplace(CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/customervariant/mw/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/customervariant/mw/$$1)
}
# You need to define the following in pro-file, if you are using the stllib:
@@ -468,5 +474,4 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
}
-
-
+epocroot_prefix =
diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf
index b2156a9..bcb2867 100644
--- a/mkspecs/features/symbian/qt.prf
+++ b/mkspecs/features/symbian/qt.prf
@@ -43,3 +43,9 @@ contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0
isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000
isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000
+
+# Workaround for the fact that Gnupoc and Symbian chose different approaches to
+# the letter casing of headers.
+contains(CONFIG, is_using_gnupoc) {
+ INCLUDEPATH += $$QMAKESPEC/../../common/symbian/header-wrappers
+}
diff --git a/mkspecs/features/symbian/qt_config.prf b/mkspecs/features/symbian/qt_config.prf
new file mode 100644
index 0000000..2f446dc
--- /dev/null
+++ b/mkspecs/features/symbian/qt_config.prf
@@ -0,0 +1,9 @@
+load(qt_config)
+
+!contains(QMAKE_HOST.os, "Windows") {
+ # Test for the existence of lower cased headers, a sign of using Gnupoc.
+ # Note that the qmake "exists" test won't do because it is case insensitive.
+ system("test -f $${EPOCROOT}/epoc32/include/akndoc.h") {
+ CONFIG += is_using_gnupoc
+ }
+}
diff --git a/mkspecs/features/symbian/release.prf b/mkspecs/features/symbian/release.prf
new file mode 100644
index 0000000..8164495
--- /dev/null
+++ b/mkspecs/features/symbian/release.prf
@@ -0,0 +1 @@
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/urel
diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
new file mode 100644
index 0000000..9ccfd2f
--- /dev/null
+++ b/mkspecs/features/symbian/symbian_building.prf
@@ -0,0 +1,277 @@
+# we have some module specific options (defined in qt.prf) lets add them
+eval(TMPVAR = \$\$QMAKE_$${TARGET}_CXXFLAGS)
+!isEmpty(TMPVAR):QMAKE_CXXFLAGS += $$TMPVAR
+eval(TMPVAR = \$\$QMAKE_$${TARGET}_LFLAGS)
+!isEmpty(TMPVAR) {
+ QMAKE_LFLAGS += $$TMPVAR
+} else :linux-gcce { # lets provide a simple default. Without elf2e32 complains
+ QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000
+}
+
+symbianObjdir=$$OBJECTS_DIR
+isEmpty(symbianObjdir) {
+ symbianObjdir = .
+}
+symbianDestdir=$$DESTDIR
+isEmpty(symbianDestdir) {
+ symbianDestdir = .
+}
+
+contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb")|contains(QMAKE_CFLAGS, "-mthumb")|contains(QMAKE_CXXFLAGS, "-mthumb") {
+ DEFINES += __MARM_THUMB__
+}
+
+defineReplace(processSymbianLibraries) {
+ library = $$replace(1, "\.dll$", ".dso")
+ library = $$replace(library, "^-l", "")
+ isFullName = $$find(library, \.)
+ isEmpty(isFullName):library="$${library}.dso"
+ linux-gcce {
+ newLIB = "-l:$${library}"
+ } else {
+ newLIB = "$${library}"
+ }
+ contains(library, "\.dso$")|contains(library, ".lib$"):PRE_TARGETDEPS += $$library
+ return($$newLIB)
+}
+
+for(libraries, LIBS) {
+ newLIBS += $$processSymbianLibraries($$libraries)
+}
+LIBS = $$newLIBS
+newLIBS =
+for(libraries, QMAKE_LIBS) {
+ newLIBS += $$processSymbianLibraries($$libraries)
+}
+QMAKE_LIBS = $$newLIBS
+
+linux-gcce {
+ QMAKE_LIBS += -l:usrt2_2.lib \
+ -l:dfpaeabi.dso \
+ -l:drtaeabi.dso \
+ -l:scppnwdl.dso \
+ -lsupc++ \
+ -lgcc
+}
+
+elf2e32_LIBPATH =
+for(libPath, QMAKE_LIBDIR) {
+ elf2e32_LIBPATH += "--libpath=$$libPath"
+}
+
+isEmpty(VERSION) {
+ VERSION = $$QT_VERSION
+}
+
+# Check for version validity.
+!isEmpty(VERSION):!contains(VERSION, "[0-9]+"):!contains(VERSION, "[0-9]+\.[0-9]+")!contains(VERSION, "[0-9]+(\.[0-9]+){2}") {
+ error("Invalid VERSION for Symbian: $$VERSION")
+}
+
+splitVersion = $$split(VERSION, ".")
+count(splitVersion, 0) {
+ # Default Symbian version if none is specified.
+ hexVersion = "000a0000"
+ decVersion = "10.0"
+} else {
+ count(splitVersion, 3) {
+ hexVersion = $$system("sh -c 'printf %02x $$member(splitVersion, 0)'")
+ hexPart2 = $$system("sh -c 'printf %02x $$member(splitVersion, 1)'")"
+ hexPart2 = $$hexPart2$$system("sh -c 'printf %02x $$member(splitVersion, 2)'")"
+ decVersion = $$system("sh -c 'printf %1d 0x$$hexVersion'").
+ hexVersion = $$hexVersion$$hexPart2
+ decVersion = $$decVersion$$system("sh -c 'printf %d 0x$$hexPart2'")
+ !contains(hexVersion, "[0-9a-f]{8}"):hexVersion = "00$${hexVersion}"
+ } else { # app code may have different numbering...
+ hexVersion = $$VERSION
+ decVersion = $$VERSION
+ }
+}
+#error ("hexVersion: $$hexVersion, decVersion: $$decVersion")
+
+intUid3 = $$lower($$replace(TARGET.UID3, "^0x", ""))
+isEmpty(TARGET.SID):TARGET.SID = $$TARGET.UID3
+isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000
+
+capability = $$replace(TARGET.CAPABILITY, " ", "+")
+capability = $$join(capability, "+")
+capability = $$replace(capability, "\+-", "-")
+isEmpty(capability): capability = "None"
+capability = "--capability=$$capability"
+
+contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
+ !isEmpty(QMAKE_POST_LINK) {
+ # No way to honor the '@' :-(
+ QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "")
+ QMAKE_POST_LINK = && $$QMAKE_POST_LINK
+ }
+ # The tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error.
+ # The comparison of dso files is to avoid extra building of modules that depend on this dso, in
+ # case it has not changed.
+ QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym \
+ && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 \
+ --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 \
+ --stack=0x00014000 --fpu=softvfp --targettype=DLL \
+ --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.dll \
+ --dso=$$symbianObjdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def \
+ --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \
+ --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \
+ $$QMAKE_ELF2E32_FLAGS \
+ | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \
+ && if ! diff -q $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso \
+ > /dev/null 2>&1; then \
+ $$QMAKE_COPY $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso; \
+ fi \
+ $$QMAKE_POST_LINK
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso
+ QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.dso
+ QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def
+
+ linux-armcc: {
+ QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\)
+ } else :linux-gcce {
+ #QMAKE_LIBS += -l:edllstub.lib -l:edll.lib
+ }
+
+ QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll
+ DEFINES += __DLL__
+}
+
+contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") {
+ !isEmpty(QMAKE_POST_LINK) {
+ # No way to honor the '@' :-(
+ QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "")
+ QMAKE_POST_LINK = && $$QMAKE_POST_LINK
+ }
+ # the tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error
+ QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym \
+ && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a \
+ --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 \
+ --stack=0x00014000 --fpu=softvfp --targettype=EXE \
+ --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe \
+ --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \
+ --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \
+ $$QMAKE_ELF2E32_FLAGS \
+ | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \
+ && ln "$${symbianDestdir}/$${TARGET}.exe" "$${symbianDestdir}/$$TARGET" \
+ $$QMAKE_POST_LINK
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe
+ QMAKE_CLEAN += $${symbianDestdir}/$${TARGET}
+
+ linux-armcc: {
+ QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\)
+ } else :linux-gcce {
+ #QMAKE_LIBS += -l:eexe.lib
+ }
+
+ QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe
+# TODO gcce added --shared here...
+ DEFINES += __EXE__
+}
+
+# Symbian resource files
+linux-armcc: {
+ SYMBIAN_RVCT22INC=$$(RVCT22INC)
+ !isEmpty(SYMBIAN_RVCT22INC):symbian_resources_INCLUDES = -I$${SYMBIAN_RVCT22INC}
+}
+symbian_resources_INCLUDES = $$replace(symbian_resources_INCLUDES, ",", " -I")
+symbian_resources_INCLUDES += $$join(INCLUDEPATH, " -I", "-I")
+symbian_resources_DEFINES = $$join(DEFINES, " -D", "-D")
+symbian_resources_RCC_DIR = $$replace(RCC_DIR, "/$", "")
+symbian_resources_INCLUDES += "-I $$symbian_resources_RCC_DIR"
+
+for(symbian_resource, SYMBIAN_RESOURCES) {
+ symbian_resource = $$basename(symbian_resource)
+ symbian_resource_clean = $$replace(symbian_resource, "\.rss$", ".rsc")
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${symbian_resource_clean}
+ symbian_resource_clean = $$replace(symbian_resource, "\.rss$", ".rpp")
+ QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${symbian_resource_clean}
+}
+
+symbianresources.input = SYMBIAN_RESOURCES
+symbianresources.output = $$symbian_resources_RCC_DIR/${QMAKE_FILE_BASE}.rsg
+symbianresources.commands = cpp -nostdinc -undef \
+ $$symbian_resources_INCLUDES \
+ $$symbian_resources_DEFINES \
+ ${QMAKE_FILE_NAME} \
+ -o $${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \
+ && rcomp -u -m045,046,047 \
+ -s$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \
+ -o$${symbianDestdir}/${QMAKE_FILE_BASE}.rsc \
+ -h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsg \
+ -i${QMAKE_FILE_NAME}
+symbianresources.dependency_type = TYPE_C
+symbianresources.CONFIG = no_link target_predeps
+
+QMAKE_EXTRA_COMPILERS += symbianresources
+
+contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
+ baseTarget = $$basename(TARGET)
+ # If you change this, also see application_icon.prf
+ baseTarget = $$replace(baseTarget, " ",_)
+
+ # Make our own extra target in order to get dependencies for generated
+ # files right. This also avoids the warning about files not found.
+ symbianGenResource.target = $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
+ symbianGenResource.commands = cpp -nostdinc -undef \
+ $$symbian_resources_INCLUDES \
+ $$symbian_resources_DEFINES \
+ $${baseTarget}.rss \
+ -o $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
+ && rcomp -u -m045,046,047 \
+ -s$${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
+ -o$${symbianDestdir}/$${baseTarget}.rsc \
+ -h$${symbian_resources_RCC_DIR}/$${baseTarget}.rsg \
+ -i$${baseTarget}.rss
+ symbianGenResource.depends = $${baseTarget}.rss
+ PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
+ QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
+ QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp
+ QMAKE_DISTCLEAN += $${baseTarget}.rss
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.rsc
+
+ symbianGenRegResource.target = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
+ symbianGenRegResource.commands = cpp -nostdinc -undef \
+ $$symbian_resources_INCLUDES \
+ $$symbian_resources_DEFINES \
+ $${baseTarget}_reg.rss \
+ -o $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
+ && rcomp -u -m045,046,047 \
+ -s$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
+ -o$${symbianDestdir}/$${baseTarget}_reg.rsc \
+ -h$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg \
+ -i$${baseTarget}_reg.rss
+ symbianGenRegResource.depends = $${baseTarget}_reg.rss $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
+ PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
+ QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
+ QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp
+ QMAKE_DISTCLEAN += $${TARGET}_reg.rss
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}_reg.rsc
+
+ # Trick to get qmake to create the RCC_DIR for us.
+ symbianRccDirCreation.input = SOURCES
+ symbianRccDirCreation.commands =
+ symbianRccDirCreation.output = $${symbian_resources_RCC_DIR}/symbian_resource_dummy
+ symbianRccDirCreation.CONFIG = no_link combine
+
+ QMAKE_EXTRA_TARGETS += symbianGenResource symbianGenRegResource
+ QMAKE_EXTRA_COMPILERS += symbianRccDirCreation
+
+ QMAKE_DISTCLEAN += $${TARGET}.loc
+}
+
+# Generated pkg files
+
+QMAKE_DISTCLEAN += $${TARGET}_template.pkg
+
+# Pre 2.6.23 Linux kernels have a limit on the environment size that can be passed to
+# a forked process. We quite easily overstep this boundary when building big projects
+# on Symbian, and since we depend on running the system() command, this causes the build
+# to fail. Test here that system() can be successfully run. It is important that this
+# check happens as late as possible, otherwise it will not be caught.
+execve_sanity_test = $$system("echo testing")
+!contains(execve_sanity_test, "testing") {
+ error("Running system() failed. Maybe your kernel is too old? (Linux kernels need at least version 2.6.23)")
+}
diff --git a/mkspecs/features/symbian/thread.prf b/mkspecs/features/symbian/thread.prf
new file mode 100644
index 0000000..885438a
--- /dev/null
+++ b/mkspecs/features/symbian/thread.prf
@@ -0,0 +1,2 @@
+# Symbian behaves like POSIX when it comes to threads.
+include(../unix/thread.prf)
diff --git a/mkspecs/features/unix/opengl.prf b/mkspecs/features/unix/opengl.prf
index f2db819..74a5149 100644
--- a/mkspecs/features/unix/opengl.prf
+++ b/mkspecs/features/unix/opengl.prf
@@ -3,11 +3,6 @@ contains(QT_CONFIG, opengles1) {
!isEmpty(QMAKE_LIBDIR_OPENGL_ES1):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES1
target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES1
else:LIBS += $$QMAKE_LIBS_OPENGL_ES1
-} else:contains(QT_CONFIG, opengles1cl) {
- INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES1CL
- !isEmpty(QMAKE_LIBDIR_OPENGL_ES1CL):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES1CL
- target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES1CL
- else:LIBS += $$QMAKE_LIBS_OPENGL_ES1CL
} else:contains(QT_CONFIG, opengles2) {
INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
!isEmpty(QMAKE_LIBDIR_OPENGL_ES2):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2
diff --git a/mkspecs/features/win32/thread.prf b/mkspecs/features/win32/thread.prf
index aa844d2..76354a8 100644
--- a/mkspecs/features/win32/thread.prf
+++ b/mkspecs/features/win32/thread.prf
@@ -23,8 +23,4 @@ debug {
}
}
-win32-msvc|win32-msvc.net {
- !contains(DEFINES, QT_DLL):!target_qt:!isEqual(TARGET, qtmain):QMAKE_LFLAGS += /NODEFAULTLIB:"libc"
-}
-
QMAKE_LIBS += $$QMAKE_LIBS_RTMT
diff --git a/mkspecs/freebsd-g++/qmake.conf b/mkspecs/freebsd-g++/qmake.conf
index acd2a6a..51a1960 100644
--- a/mkspecs/freebsd-g++/qmake.conf
+++ b/mkspecs/freebsd-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/freebsd-g++/qplatformdefs.h b/mkspecs/freebsd-g++/qplatformdefs.h
index b5d1b2f..5afb965 100644
--- a/mkspecs/freebsd-g++/qplatformdefs.h
+++ b/mkspecs/freebsd-g++/qplatformdefs.h
@@ -76,57 +76,19 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_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
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#define QT_OPEN_LARGEFILE 0
#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_SNPRINTF ::snprintf
@@ -143,5 +105,4 @@
#define QT_AOUT_UNDERSCORE
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/freebsd-g++34/qmake.conf b/mkspecs/freebsd-g++34/qmake.conf
index 9627b46..3e6bf6a 100644
--- a/mkspecs/freebsd-g++34/qmake.conf
+++ b/mkspecs/freebsd-g++34/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/freebsd-g++40/qmake.conf b/mkspecs/freebsd-g++40/qmake.conf
index e3a3c86..43d6980 100644
--- a/mkspecs/freebsd-g++40/qmake.conf
+++ b/mkspecs/freebsd-g++40/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/freebsd-icc/qmake.conf b/mkspecs/freebsd-icc/qmake.conf
index 60fa7ee..c9c3140 100644
--- a/mkspecs/freebsd-icc/qmake.conf
+++ b/mkspecs/freebsd-icc/qmake.conf
@@ -28,6 +28,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/hpux-acc-64/qmake.conf b/mkspecs/hpux-acc-64/qmake.conf
index 8757459..b138ef8 100644
--- a/mkspecs/hpux-acc-64/qmake.conf
+++ b/mkspecs/hpux-acc-64/qmake.conf
@@ -46,6 +46,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/hpux-acc-64/qplatformdefs.h b/mkspecs/hpux-acc-64/qplatformdefs.h
index 50da616..c1a9ab8 100644
--- a/mkspecs/hpux-acc-64/qplatformdefs.h
+++ b/mkspecs/hpux-acc-64/qplatformdefs.h
@@ -76,76 +76,14 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#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_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 int
-
+#define QT_SOCKLEN_T int
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpux-acc-o64/qmake.conf b/mkspecs/hpux-acc-o64/qmake.conf
index d4d2c7d..b703540 100644
--- a/mkspecs/hpux-acc-o64/qmake.conf
+++ b/mkspecs/hpux-acc-o64/qmake.conf
@@ -46,6 +46,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/hpux-acc-o64/qplatformdefs.h b/mkspecs/hpux-acc-o64/qplatformdefs.h
index 1aee3f9..c622d80 100644
--- a/mkspecs/hpux-acc-o64/qplatformdefs.h
+++ b/mkspecs/hpux-acc-o64/qplatformdefs.h
@@ -77,76 +77,11 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
+#undef QT_SOCKLEN_T
+#define QT_SOCKLEN_T int
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpux-acc/qmake.conf b/mkspecs/hpux-acc/qmake.conf
index 19ee00f..8223a07 100644
--- a/mkspecs/hpux-acc/qmake.conf
+++ b/mkspecs/hpux-acc/qmake.conf
@@ -25,6 +25,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/hpux-acc/qplatformdefs.h b/mkspecs/hpux-acc/qplatformdefs.h
index 475c85a..c18ad49 100644
--- a/mkspecs/hpux-acc/qplatformdefs.h
+++ b/mkspecs/hpux-acc/qplatformdefs.h
@@ -79,76 +79,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#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_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 int
+#define QT_SOCKLEN_T int
// presence of _XOPEN_UNIX can be used to detect HP-UX 10 or higher
#if !defined(_XOPEN_UNIX)
@@ -156,5 +95,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/qmake.conf b/mkspecs/hpux-g++-64/qmake.conf
index f76bd4e..734a5f7 100644
--- a/mkspecs/hpux-g++-64/qmake.conf
+++ b/mkspecs/hpux-g++-64/qmake.conf
@@ -6,6 +6,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/hpux-g++-64/qplatformdefs.h b/mkspecs/hpux-g++-64/qplatformdefs.h
index 6082632..e9a9e75 100644
--- a/mkspecs/hpux-g++-64/qplatformdefs.h
+++ b/mkspecs/hpux-g++-64/qplatformdefs.h
@@ -76,76 +76,8 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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
-
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpux-g++/qmake.conf b/mkspecs/hpux-g++/qmake.conf
index 1ed2ee6..6935ea9 100644
--- a/mkspecs/hpux-g++/qmake.conf
+++ b/mkspecs/hpux-g++/qmake.conf
@@ -6,6 +6,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl plugin_no_soname
QT += core gui
diff --git a/mkspecs/hpux-g++/qplatformdefs.h b/mkspecs/hpux-g++/qplatformdefs.h
index 161474e..9296ac2 100644
--- a/mkspecs/hpux-g++/qplatformdefs.h
+++ b/mkspecs/hpux-g++/qplatformdefs.h
@@ -78,76 +78,12 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#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_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
+#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)
@@ -155,5 +91,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/qmake.conf b/mkspecs/hpuxi-acc-32/qmake.conf
index 00b400f..93006e5 100644
--- a/mkspecs/hpuxi-acc-32/qmake.conf
+++ b/mkspecs/hpuxi-acc-32/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release plugin_no_soname
QT += core gui
diff --git a/mkspecs/hpuxi-acc-32/qplatformdefs.h b/mkspecs/hpuxi-acc-32/qplatformdefs.h
index 04ce3cd..6aafed2 100644
--- a/mkspecs/hpuxi-acc-32/qplatformdefs.h
+++ b/mkspecs/hpuxi-acc-32/qplatformdefs.h
@@ -77,75 +77,14 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#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_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 int
+#define QT_SOCKLEN_T int
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpuxi-acc-64/qmake.conf b/mkspecs/hpuxi-acc-64/qmake.conf
index feefd30..2fa1f01 100644
--- a/mkspecs/hpuxi-acc-64/qmake.conf
+++ b/mkspecs/hpuxi-acc-64/qmake.conf
@@ -46,6 +46,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release plugin_no_soname
QT += core gui
diff --git a/mkspecs/hpuxi-acc-64/qplatformdefs.h b/mkspecs/hpuxi-acc-64/qplatformdefs.h
index 04ce3cd..6aafed2 100644
--- a/mkspecs/hpuxi-acc-64/qplatformdefs.h
+++ b/mkspecs/hpuxi-acc-64/qplatformdefs.h
@@ -77,75 +77,14 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#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_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 int
+#define QT_SOCKLEN_T int
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hpuxi-g++-64/qmake.conf b/mkspecs/hpuxi-g++-64/qmake.conf
index e8fa053..05b0691 100644
--- a/mkspecs/hpuxi-g++-64/qmake.conf
+++ b/mkspecs/hpuxi-g++-64/qmake.conf
@@ -11,6 +11,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/hpuxi-g++-64/qplatformdefs.h b/mkspecs/hpuxi-g++-64/qplatformdefs.h
index ba62e24..f6789ee 100644
--- a/mkspecs/hpuxi-g++-64/qplatformdefs.h
+++ b/mkspecs/hpuxi-g++-64/qplatformdefs.h
@@ -76,75 +76,14 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#define QT_NO_READDIR64
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#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_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 int
+#define QT_SOCKLEN_T int
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hurd-g++/qmake.conf b/mkspecs/hurd-g++/qmake.conf
index f213f2d..6570e40 100644
--- a/mkspecs/hurd-g++/qmake.conf
+++ b/mkspecs/hurd-g++/qmake.conf
@@ -6,6 +6,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
QT += core gui
CONFIG += qt warn_on release link_prl
diff --git a/mkspecs/hurd-g++/qplatformdefs.h b/mkspecs/hurd-g++/qplatformdefs.h
index 68ee2d8..b734a68 100644
--- a/mkspecs/hurd-g++/qplatformdefs.h
+++ b/mkspecs/hurd-g++/qplatformdefs.h
@@ -82,57 +82,11 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_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
+#include "../common/posix/qplatformdefs.h"
#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/qmake.conf b/mkspecs/irix-cc-64/qmake.conf
index bf5febb..4b651b2 100644
--- a/mkspecs/irix-cc-64/qmake.conf
+++ b/mkspecs/irix-cc-64/qmake.conf
@@ -35,6 +35,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/irix-cc-64/qplatformdefs.h b/mkspecs/irix-cc-64/qplatformdefs.h
index f1078df..c95c2e5 100644
--- a/mkspecs/irix-cc-64/qplatformdefs.h
+++ b/mkspecs/irix-cc-64/qplatformdefs.h
@@ -75,79 +75,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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
+#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
@@ -156,5 +92,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/irix-cc/qmake.conf b/mkspecs/irix-cc/qmake.conf
index 99e8064..0070d42 100644
--- a/mkspecs/irix-cc/qmake.conf
+++ b/mkspecs/irix-cc/qmake.conf
@@ -35,6 +35,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/irix-cc/qplatformdefs.h b/mkspecs/irix-cc/qplatformdefs.h
index f1078df..c95c2e5 100644
--- a/mkspecs/irix-cc/qplatformdefs.h
+++ b/mkspecs/irix-cc/qplatformdefs.h
@@ -75,79 +75,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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
+#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
@@ -156,5 +92,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/irix-g++-64/qmake.conf b/mkspecs/irix-g++-64/qmake.conf
index d614b9d..56f02f1 100644
--- a/mkspecs/irix-g++-64/qmake.conf
+++ b/mkspecs/irix-g++-64/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/irix-g++/qmake.conf b/mkspecs/irix-g++/qmake.conf
index 1f1df30..c1eafdb 100644
--- a/mkspecs/irix-g++/qmake.conf
+++ b/mkspecs/irix-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/irix-g++/qplatformdefs.h b/mkspecs/irix-g++/qplatformdefs.h
index 49d0bfb..be7fb69 100644
--- a/mkspecs/irix-g++/qplatformdefs.h
+++ b/mkspecs/irix-g++/qplatformdefs.h
@@ -75,83 +75,22 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_ARGS
-#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_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
-#if defined(_LANGUAGE_C_PLUS_PLUS) || !defined(_SGIAPI)
-#define QT_SIGNAL_ARGS int
+#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
@@ -160,6 +99,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
-
diff --git a/mkspecs/linux-cxx/qmake.conf b/mkspecs/linux-cxx/qmake.conf
index 633b738..879c78a 100644
--- a/mkspecs/linux-cxx/qmake.conf
+++ b/mkspecs/linux-cxx/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/linux-cxx/qplatformdefs.h b/mkspecs/linux-cxx/qplatformdefs.h
index 11b5ac0..578e63a 100644
--- a/mkspecs/linux-cxx/qplatformdefs.h
+++ b/mkspecs/linux-cxx/qplatformdefs.h
@@ -82,79 +82,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#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_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
+#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)
@@ -162,5 +98,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-ecc-64/qmake.conf b/mkspecs/linux-ecc-64/qmake.conf
index 359d44b..21f2960 100644
--- a/mkspecs/linux-ecc-64/qmake.conf
+++ b/mkspecs/linux-ecc-64/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/linux-ecc-64/qplatformdefs.h b/mkspecs/linux-ecc-64/qplatformdefs.h
index 11b5ac0..578e63a 100644
--- a/mkspecs/linux-ecc-64/qplatformdefs.h
+++ b/mkspecs/linux-ecc-64/qplatformdefs.h
@@ -82,79 +82,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#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_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
+#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)
@@ -162,5 +98,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf
index 44866cf..1e5c50b 100644
--- a/mkspecs/linux-g++-32/qmake.conf
+++ b/mkspecs/linux-g++-32/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf
index 4f8794f..e7372cc 100644
--- a/mkspecs/linux-g++-64/qmake.conf
+++ b/mkspecs/linux-g++-64/qmake.conf
@@ -6,6 +6,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/linux-g++-maemo/qmake.conf b/mkspecs/linux-g++-maemo/qmake.conf
index 38c26a6..e272e72 100644
--- a/mkspecs/linux-g++-maemo/qmake.conf
+++ b/mkspecs/linux-g++-maemo/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
CONFIG += nostrip
@@ -32,4 +33,7 @@ DEFINES += QT_GL_NO_SCISSOR_TEST
# Work round SGX 1.4 driver bug (text corrupted), modify glyph cache width:
DEFINES += QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH=1024
+# QNetworkAccessManager to create a network session by default
+DEFINES += QT_QNAM_DEFAULT_NETWORK_SESSION
+
load(qt_config)
diff --git a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf
index 47784e2..4b21896 100644
--- a/mkspecs/linux-g++/qmake.conf
+++ b/mkspecs/linux-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
index a879279..23816b1 100644
--- a/mkspecs/linux-g++/qplatformdefs.h
+++ b/mkspecs/linux-g++/qplatformdefs.h
@@ -81,79 +81,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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
+#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)
@@ -161,5 +97,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index 965de0c..eeb24a3 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -11,6 +11,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/linux-kcc/qmake.conf b/mkspecs/linux-kcc/qmake.conf
index 009c486..217572f 100644
--- a/mkspecs/linux-kcc/qmake.conf
+++ b/mkspecs/linux-kcc/qmake.conf
@@ -14,6 +14,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/linux-kcc/qplatformdefs.h b/mkspecs/linux-kcc/qplatformdefs.h
index 30b3c25..3a37ab9 100644
--- a/mkspecs/linux-kcc/qplatformdefs.h
+++ b/mkspecs/linux-kcc/qplatformdefs.h
@@ -85,79 +85,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#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_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
+#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)
@@ -165,5 +101,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-llvm/qmake.conf b/mkspecs/linux-llvm/qmake.conf
index 9c34377..73d6609 100644
--- a/mkspecs/linux-llvm/qmake.conf
+++ b/mkspecs/linux-llvm/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/linux-llvm/qplatformdefs.h b/mkspecs/linux-llvm/qplatformdefs.h
index 8e59249..a38c86c 100644
--- a/mkspecs/linux-llvm/qplatformdefs.h
+++ b/mkspecs/linux-llvm/qplatformdefs.h
@@ -82,79 +82,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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
+#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)
@@ -162,5 +98,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-lsb-g++/qmake.conf b/mkspecs/linux-lsb-g++/qmake.conf
index b603a16..4b4deab 100644
--- a/mkspecs/linux-lsb-g++/qmake.conf
+++ b/mkspecs/linux-lsb-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/linux-lsb-g++/qplatformdefs.h b/mkspecs/linux-lsb-g++/qplatformdefs.h
index ce0b461..e2a138a 100644
--- a/mkspecs/linux-lsb-g++/qplatformdefs.h
+++ b/mkspecs/linux-lsb-g++/qplatformdefs.h
@@ -86,90 +86,27 @@
// LSB 3.1 defines htonl and friends here
#include <arpa/inet.h>
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#undef QT_OPEN_LARGEFILE
+#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_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_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(__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/qmake.conf b/mkspecs/linux-pgcc/qmake.conf
index 756f1af..19af8ee 100644
--- a/mkspecs/linux-pgcc/qmake.conf
+++ b/mkspecs/linux-pgcc/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/linux-pgcc/qplatformdefs.h b/mkspecs/linux-pgcc/qplatformdefs.h
index 11b5ac0..578e63a 100644
--- a/mkspecs/linux-pgcc/qplatformdefs.h
+++ b/mkspecs/linux-pgcc/qplatformdefs.h
@@ -82,79 +82,15 @@
#include <net/if.h>
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#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_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
+#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)
@@ -162,5 +98,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/lynxos-g++/qmake.conf b/mkspecs/lynxos-g++/qmake.conf
index 40f2b9f..eae3308 100644
--- a/mkspecs/lynxos-g++/qmake.conf
+++ b/mkspecs/lynxos-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h
index bdb492e..cac71d1 100644
--- a/mkspecs/lynxos-g++/qplatformdefs.h
+++ b/mkspecs/lynxos-g++/qplatformdefs.h
@@ -75,55 +75,14 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
+#include "../common/posix/qplatformdefs.h"
-#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
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
@@ -131,5 +90,4 @@
#define QT_VSNPRINTF ::vsnprintf
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-g++/qmake.conf b/mkspecs/macx-g++/qmake.conf
index 4355073..4464686 100644
--- a/mkspecs/macx-g++/qmake.conf
+++ b/mkspecs/macx-g++/qmake.conf
@@ -7,6 +7,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
QT += core gui
diff --git a/mkspecs/macx-g++/qplatformdefs.h b/mkspecs/macx-g++/qplatformdefs.h
index 03bdce9..99d64ef 100644
--- a/mkspecs/macx-g++/qplatformdefs.h
+++ b/mkspecs/macx-g++/qplatformdefs.h
@@ -75,59 +75,23 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_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
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
+#define QT_OPEN_LARGEFILE 0
#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_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-g++40/qmake.conf b/mkspecs/macx-g++40/qmake.conf
index d6fd09d..784f5fc 100644
--- a/mkspecs/macx-g++40/qmake.conf
+++ b/mkspecs/macx-g++40/qmake.conf
@@ -7,6 +7,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
QT += core gui
diff --git a/mkspecs/macx-g++40/qplatformdefs.h b/mkspecs/macx-g++40/qplatformdefs.h
index 03bdce9..99d64ef 100644
--- a/mkspecs/macx-g++40/qplatformdefs.h
+++ b/mkspecs/macx-g++40/qplatformdefs.h
@@ -75,59 +75,23 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_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
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
+#define QT_OPEN_LARGEFILE 0
#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_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-g++42/qmake.conf b/mkspecs/macx-g++42/qmake.conf
index 06bbdcb..fb93697 100644
--- a/mkspecs/macx-g++42/qmake.conf
+++ b/mkspecs/macx-g++42/qmake.conf
@@ -7,6 +7,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
QT += core gui
diff --git a/mkspecs/macx-g++42/qplatformdefs.h b/mkspecs/macx-g++42/qplatformdefs.h
index 03bdce9..99d64ef 100644
--- a/mkspecs/macx-g++42/qplatformdefs.h
+++ b/mkspecs/macx-g++42/qplatformdefs.h
@@ -75,59 +75,23 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_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
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
+#define QT_OPEN_LARGEFILE 0
#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_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-icc/qmake.conf b/mkspecs/macx-icc/qmake.conf
index b7753d8..00de6c4 100644
--- a/mkspecs/macx-icc/qmake.conf
+++ b/mkspecs/macx-icc/qmake.conf
@@ -13,6 +13,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release link_prl app_bundle
QT += core gui
diff --git a/mkspecs/macx-llvm/qmake.conf b/mkspecs/macx-llvm/qmake.conf
index de8040c..d46baea 100644
--- a/mkspecs/macx-llvm/qmake.conf
+++ b/mkspecs/macx-llvm/qmake.conf
@@ -7,6 +7,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
QT += core gui
diff --git a/mkspecs/macx-llvm/qplatformdefs.h b/mkspecs/macx-llvm/qplatformdefs.h
index 03bdce9..99d64ef 100644
--- a/mkspecs/macx-llvm/qplatformdefs.h
+++ b/mkspecs/macx-llvm/qplatformdefs.h
@@ -75,59 +75,23 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_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
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
+#define QT_OPEN_LARGEFILE 0
#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_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-pbuilder/qplatformdefs.h b/mkspecs/macx-pbuilder/qplatformdefs.h
index c8e49af..66afad2 100644
--- a/mkspecs/macx-pbuilder/qplatformdefs.h
+++ b/mkspecs/macx-pbuilder/qplatformdefs.h
@@ -75,59 +75,20 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_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
+#include "../common/posix/qplatformdefs.h"
+
+#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_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-xcode/qplatformdefs.h b/mkspecs/macx-xcode/qplatformdefs.h
index 03bdce9..99d64ef 100644
--- a/mkspecs/macx-xcode/qplatformdefs.h
+++ b/mkspecs/macx-xcode/qplatformdefs.h
@@ -75,59 +75,23 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_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
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
+#define QT_OPEN_LARGEFILE 0
#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_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-xlc/qmake.conf b/mkspecs/macx-xlc/qmake.conf
index 6a8c246..f84524b 100644
--- a/mkspecs/macx-xlc/qmake.conf
+++ b/mkspecs/macx-xlc/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release app_bundle global_init_link_order lib_version_first plugin_no_soname link_prl
QT += core gui
diff --git a/mkspecs/macx-xlc/qplatformdefs.h b/mkspecs/macx-xlc/qplatformdefs.h
index 43c3158..b830041 100644
--- a/mkspecs/macx-xlc/qplatformdefs.h
+++ b/mkspecs/macx-xlc/qplatformdefs.h
@@ -75,55 +75,15 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
+#include "../common/posix/qplatformdefs.h"
-#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
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE (void (*)(int))1
-
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
+#define QT_SIGNAL_IGNORE (void (*)(int))1
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/netbsd-g++/qmake.conf b/mkspecs/netbsd-g++/qmake.conf
index 622bace..1cb449f 100644
--- a/mkspecs/netbsd-g++/qmake.conf
+++ b/mkspecs/netbsd-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/netbsd-g++/qplatformdefs.h b/mkspecs/netbsd-g++/qplatformdefs.h
index f455a86..2ce5b4a 100644
--- a/mkspecs/netbsd-g++/qplatformdefs.h
+++ b/mkspecs/netbsd-g++/qplatformdefs.h
@@ -75,54 +75,14 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_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
+#include "../common/posix/qplatformdefs.h"
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_OPEN_LARGEFILE
+#define QT_OPEN_LARGEFILE 0
-// NetBSD 1.0 - 1.3.3 int
-// NetBSD 1.4 - 1.5 socklen_t
-#define QT_SOCKLEN_T socklen_t
+// QT_SOCKLEN_T
+// NetBSD 1.0 - 1.3.3 int
+// NetBSD 1.4 - 1.5 socklen_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
@@ -132,5 +92,4 @@
#define QT_AOUT_UNDERSCORE
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/openbsd-g++/qmake.conf b/mkspecs/openbsd-g++/qmake.conf
index 4204f65..c948c90 100644
--- a/mkspecs/openbsd-g++/qmake.conf
+++ b/mkspecs/openbsd-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/openbsd-g++/qplatformdefs.h b/mkspecs/openbsd-g++/qplatformdefs.h
index 0a9ea21..b3a9ad5 100644
--- a/mkspecs/openbsd-g++/qplatformdefs.h
+++ b/mkspecs/openbsd-g++/qplatformdefs.h
@@ -76,54 +76,14 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-
-#define QT_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
+#include "../common/posix/qplatformdefs.h"
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_OPEN_LARGEFILE
+#define QT_OPEN_LARGEFILE 0
-// OpenBSD 2.2 - 2.4 int
-// OpenBSD 2.5 - 2.8 socklen_t
-#define QT_SOCKLEN_T socklen_t
+// QT_SOCKLEN_T
+// OpenBSD 2.2 - 2.4 int
+// OpenBSD 2.5 - 2.8 socklen_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
@@ -148,5 +108,4 @@
#define QT_AOUT_UNDERSCORE
#endif
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/qws/freebsd-generic-g++/qmake.conf b/mkspecs/qws/freebsd-generic-g++/qmake.conf
index 19d6709..6e30d4f 100644
--- a/mkspecs/qws/freebsd-generic-g++/qmake.conf
+++ b/mkspecs/qws/freebsd-generic-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release
QT += core gui network
diff --git a/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf b/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf
new file mode 100644
index 0000000..3611421
--- /dev/null
+++ b/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for building with arm-none-linux-gnueabi-g++
+#
+
+include(../../common/g++.conf)
+include(../../common/linux.conf)
+include(../../common/qws.conf)
+
+# modifications to g++.conf
+QMAKE_CC = arm-none-linux-gnueabi-gcc
+QMAKE_CXX = arm-none-linux-gnueabi-g++
+QMAKE_LINK = arm-none-linux-gnueabi-g++
+QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++
+
+# modifications to linux.conf
+QMAKE_AR = arm-none-linux-gnueabi-ar cqs
+QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
+QMAKE_STRIP = arm-none-linux-gnueabi-strip
+
+load(qt_config)
diff --git a/mkspecs/win32-msvc2002/qplatformdefs.h b/mkspecs/qws/linux-arm-gnueabi-g++/qplatformdefs.h
index 6d71abf..b0551e5 100644
--- a/mkspecs/win32-msvc2002/qplatformdefs.h
+++ b/mkspecs/qws/linux-arm-gnueabi-g++/qplatformdefs.h
@@ -39,4 +39,4 @@
**
****************************************************************************/
-#include "../win32-msvc.net/qplatformdefs.h"
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/qws/macx-generic-g++/qmake.conf b/mkspecs/qws/macx-generic-g++/qmake.conf
index b724cbc..f753222 100644
--- a/mkspecs/qws/macx-generic-g++/qmake.conf
+++ b/mkspecs/qws/macx-generic-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui network
diff --git a/mkspecs/qws/solaris-generic-g++/qmake.conf b/mkspecs/qws/solaris-generic-g++/qmake.conf
index db83a57..f5874c2 100644
--- a/mkspecs/qws/solaris-generic-g++/qmake.conf
+++ b/mkspecs/qws/solaris-generic-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui network
diff --git a/mkspecs/sco-cc/qmake.conf b/mkspecs/sco-cc/qmake.conf
index f682f49..6eb5ca1 100644
--- a/mkspecs/sco-cc/qmake.conf
+++ b/mkspecs/sco-cc/qmake.conf
@@ -8,6 +8,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
QT += core gui
CONFIG += qt warn_on release link_prl
diff --git a/mkspecs/sco-cc/qplatformdefs.h b/mkspecs/sco-cc/qplatformdefs.h
index b5427c9..078cb45 100644
--- a/mkspecs/sco-cc/qplatformdefs.h
+++ b/mkspecs/sco-cc/qplatformdefs.h
@@ -76,55 +76,12 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
+#include "../common/posix/qplatformdefs.h"
-#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
+#undef QT_SOCKLEN_T
+#define QT_SOCKLEN_T size_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/sco-g++/qmake.conf b/mkspecs/sco-g++/qmake.conf
index 268bf32..746cf2c 100644
--- a/mkspecs/sco-g++/qmake.conf
+++ b/mkspecs/sco-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/sco-g++/qplatformdefs.h b/mkspecs/sco-g++/qplatformdefs.h
index 058ab78..a09f77d 100644
--- a/mkspecs/sco-g++/qplatformdefs.h
+++ b/mkspecs/sco-g++/qplatformdefs.h
@@ -80,55 +80,12 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
+#include "../common/posix/qplatformdefs.h"
-#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
+#undef QT_SOCKLEN_T
+#define QT_SOCKLEN_T int
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-cc-64/qmake.conf b/mkspecs/solaris-cc-64/qmake.conf
index eb594d9..3d35d62 100644
--- a/mkspecs/solaris-cc-64/qmake.conf
+++ b/mkspecs/solaris-cc-64/qmake.conf
@@ -22,6 +22,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
@@ -41,6 +42,7 @@ QMAKE_CFLAGS_SHLIB = -KPIC
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_THREAD = -mt
+QMAKE_CFLAGS_HIDESYMS = -xldscope=hidden
QMAKE_CXX = CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -53,6 +55,7 @@ QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS
QMAKE_INCDIR = /usr/sfw/include
QMAKE_LIBDIR = /usr/sfw/lib/64
diff --git a/mkspecs/solaris-cc-64/qplatformdefs.h b/mkspecs/solaris-cc-64/qplatformdefs.h
index 8de7c20..d01c48c 100644
--- a/mkspecs/solaris-cc-64/qplatformdefs.h
+++ b/mkspecs/solaris-cc-64/qplatformdefs.h
@@ -76,82 +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); }
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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
-
// Only Solaris 7 and better support 64-bit
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
diff --git a/mkspecs/solaris-cc/qmake.conf b/mkspecs/solaris-cc/qmake.conf
index ad430d1..0c97620 100644
--- a/mkspecs/solaris-cc/qmake.conf
+++ b/mkspecs/solaris-cc/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
@@ -24,6 +25,7 @@ QMAKE_CFLAGS_SHLIB = -KPIC
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_THREAD = -mt
+QMAKE_CFLAGS_HIDESYMS = -xldscope=hidden
QMAKE_CXX = CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -36,6 +38,7 @@ QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS
QMAKE_INCDIR = /usr/sfw/include
QMAKE_LIBDIR = /usr/sfw/lib
diff --git a/mkspecs/solaris-cc/qplatformdefs.h b/mkspecs/solaris-cc/qplatformdefs.h
index 128cd8f..678d076 100644
--- a/mkspecs/solaris-cc/qplatformdefs.h
+++ b/mkspecs/solaris-cc/qplatformdefs.h
@@ -76,90 +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); }
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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_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/qmake.conf b/mkspecs/solaris-g++-64/qmake.conf
index e89aff3..587c630 100644
--- a/mkspecs/solaris-g++-64/qmake.conf
+++ b/mkspecs/solaris-g++-64/qmake.conf
@@ -26,6 +26,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/solaris-g++-64/qplatformdefs.h b/mkspecs/solaris-g++-64/qplatformdefs.h
index d7aebaf..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,73 +99,8 @@ static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addr
# undef bind
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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
+// 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++/qmake.conf b/mkspecs/solaris-g++/qmake.conf
index bce0889..0814980 100644
--- a/mkspecs/solaris-g++/qmake.conf
+++ b/mkspecs/solaris-g++/qmake.conf
@@ -9,6 +9,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/solaris-g++/qplatformdefs.h b/mkspecs/solaris-g++/qplatformdefs.h
index 9984a38..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,75 +114,6 @@ static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addr
# undef bind
#endif
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
-
-#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_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_UNIX)
// Solaris 2.5.1
// Function usleep() is defined in C library but not declared in header files
diff --git a/mkspecs/symbian-abld/qmake.conf b/mkspecs/symbian-abld/qmake.conf
index 499bf63..fe9cd60 100644
--- a/mkspecs/symbian-abld/qmake.conf
+++ b/mkspecs/symbian-abld/qmake.conf
@@ -5,5 +5,6 @@
#
MAKEFILE_GENERATOR = SYMBIAN_ABLD
+option(recursive)
-include(../common/symbian/symbian.conf)
+include(../common/symbian/symbian-mmp.conf)
diff --git a/mkspecs/symbian-sbsv2/qmake.conf b/mkspecs/symbian-sbsv2/qmake.conf
index 0a5e878..73d3ee3 100644
--- a/mkspecs/symbian-sbsv2/qmake.conf
+++ b/mkspecs/symbian-sbsv2/qmake.conf
@@ -5,5 +5,6 @@
#
MAKEFILE_GENERATOR = SYMBIAN_SBSV2
+option(recursive)
-include(../common/symbian/symbian.conf)
+include(../common/symbian/symbian-mmp.conf)
diff --git a/mkspecs/symbian/linux-armcc/features/default_post.prf b/mkspecs/symbian/linux-armcc/features/default_post.prf
new file mode 100644
index 0000000..7aa1f4d
--- /dev/null
+++ b/mkspecs/symbian/linux-armcc/features/default_post.prf
@@ -0,0 +1,5 @@
+load(default_post.prf)
+
+# It is important that this config be executed last,
+# and qmake does them in reverse order.
+CONFIG = symbian_building $$CONFIG
diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf
new file mode 100644
index 0000000..6042fa4
--- /dev/null
+++ b/mkspecs/symbian/linux-armcc/qmake.conf
@@ -0,0 +1,54 @@
+#
+# qmake configuration for symbian/linux-armcc
+#
+
+include(../../common/symbian/symbian-makefile.conf)
+
+include(../../common/armcc.conf)
+
+QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\)
+
+QMAKE_RVCT_LINKSTYLE = 1
+
+# notice that the middle part of the following set of vars matches the TARGET content of the libs
+
+#QMAKE_qtmain_CXXFLAGS = --arm
+#QMAKE_QtCore_CXXFLAGS =
+QMAKE_QtGui_LFLAGS = "--rw-base 0x800000"
+#QMAKE_QtDBus_CXXFLAGS =
+#QMAKE_QtDeclarative_CXXFLAGS =
+#QMAKE_QtMultimedia_CXXFLAGS =
+#QMAKE_QtNetwork_CXXFLAGS =
+#QMAKE_QtOpenGL_CXXFLAGS =
+#QMAKE_QtOpenVG_CXXFLAGS =
+#QMAKE_phonon_CXXFLAGS =
+#QMAKE_QtScript_CXXFLAGS =
+#QMAKE_QtScriptTools_CXXFLAGS =
+#QMAKE_QtSql_CXXFLAGS =
+#QMAKE_QtSvg_CXXFLAGS =
+#QMAKE_QtTest_CXXFLAGS =
+#QMAKE_QtXmlPatterns_CXXFLAGS =
+#QMAKE_QtXml_CXXFLAGS =
+# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
+QMAKE_QtWebKit_LFLAGS = --rw-base 0xE00000
+
+QMAKE_CFLAGS += --dllimport_runtime --preinclude rvct2_2.h --diag_suppress 186,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --export_all_vtbl --no_vfe --apcs /inter $$QMAKE_CFLAGS.ARMCC
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates $$QMAKE_CXXFLAGS.ARMCC
+QMAKE_LFLAGS += --symver_soname --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --dll --no_scanlib
+QMAKE_LFLAGS_APP += --entry _E32Startup
+QMAKE_LFLAGS_SHLIB += --entry _E32Dll
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+
+DEFINES += EKA2 \
+ __ARMCC__ \
+ __ARMcc_2__ \
+ __ARMCC_2_2__
+
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib
+QMAKE_LIBDIR *= $$(RVCT22LIB)
+
+INCLUDEPATH = $${EPOCROOT}epoc32/include \
+ $${EPOCROOT}epoc32/include/rvct2_2 \
+ $${EPOCROOT}epoc32/include/variant \
+ $${EPOCROOT}epoc32/include/stdapis \
+ $$INCLUDEPATH
diff --git a/mkspecs/symbian/linux-armcc/qplatformdefs.h b/mkspecs/symbian/linux-armcc/qplatformdefs.h
new file mode 100644
index 0000000..db67648
--- /dev/null
+++ b/mkspecs/symbian/linux-armcc/qplatformdefs.h
@@ -0,0 +1 @@
+#include "../../common/symbian/qplatformdefs.h"
diff --git a/mkspecs/symbian/linux-gcce/features/default_post.prf b/mkspecs/symbian/linux-gcce/features/default_post.prf
new file mode 100644
index 0000000..7aa1f4d
--- /dev/null
+++ b/mkspecs/symbian/linux-gcce/features/default_post.prf
@@ -0,0 +1,5 @@
+load(default_post.prf)
+
+# It is important that this config be executed last,
+# and qmake does them in reverse order.
+CONFIG = symbian_building $$CONFIG
diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf
new file mode 100644
index 0000000..de3791c
--- /dev/null
+++ b/mkspecs/symbian/linux-gcce/qmake.conf
@@ -0,0 +1,92 @@
+#
+# qmake configuration for symbian/linux-gcce
+#
+
+include(../../common/symbian/symbian-makefile.conf)
+
+include(../../common/g++.conf)
+
+QMAKE_CC = arm-none-symbianelf-gcc
+QMAKE_CXX = arm-none-symbianelf-g++
+QMAKE_LINK = arm-none-symbianelf-ld
+QMAKE_LINK_SHLIB = arm-none-symbianelf-ld
+QMAKE_LINK_C = arm-none-symbianelf-ld
+QMAKE_LINK_C_SHLIB = arm-none-symbianelf-ld
+QMAKE_AR = arm-none-symbianelf-ar cqs
+
+# gcce defaults to 'arm' instruction set. Lets use the better 'thumb' if possible
+# notice that the middle part of the following set of vars matches the TARGET content of the libs
+
+QMAKE_qtmain_CXXFLAGS = -mthumb
+QMAKE_QtCore_CXXFLAGS = -mthumb
+QMAKE_QtGui_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000
+QMAKE_QtDBus_CXXFLAGS = -mthumb
+QMAKE_QtDeclarative_CXXFLAGS = -mthumb
+QMAKE_QtMultimedia_CXXFLAGS = -mthumb
+QMAKE_QtNetwork_CXXFLAGS = -mthumb
+QMAKE_QtOpenGL_CXXFLAGS = -mthumb
+QMAKE_QtOpenVG_CXXFLAGS = -mthumb
+QMAKE_phonon_CXXFLAGS = -mthumb
+QMAKE_QtScript_CXXFLAGS = -mthumb
+QMAKE_QtScriptTools_CXXFLAGS = -mthumb
+QMAKE_QtSql_CXXFLAGS = -mthumb
+QMAKE_QtSvg_CXXFLAGS = -mthumb
+QMAKE_QtTest_CXXFLAGS = -mthumb
+QMAKE_QtXmlPatterns_CXXFLAGS = -mthumb
+QMAKE_QtXml_CXXFLAGS = -mthumb
+#TODO fails with; arm-none-symbianelf-ld: section .data loaded at [00e00000,00e05973] overlaps section .text loaded at [00008000,00fe748b]
+QMAKE_QtWebKit_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000
+
+# never use -fPIC, gcce-linker doesn't like it.
+# g++ conf above adds it if the host platform is 64 bit, so we remove it again
+QMAKE_CFLAGS_SHLIB -= -fPIC
+QMAKE_CFLAGS_STATIC_LIB -= -fPIC
+QMAKE_CXXFLAGS_SHLIB -= -fPIC
+QMAKE_CXXFLAGS_STATIC_LIB -= -fPIC
+
+QMAKE_LFLAGS_SONAME =
+#QMAKE_LFLAGS_THREAD +=
+#QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
+QMAKE_RPATH = --rpath=
+
+DEFINES += __GCCE__ \
+ UNICODE \
+ _STLP_NO_EXCEPTION_HEADER
+
+QMAKE_LFLAGS_APP += --entry _E32Startup
+QMAKE_LFLAGS_SHLIB += --default-symver --entry _E32Dll
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+
+gcceExtraFlags = --include=${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -fvisibility-inlines-hidden -msoft-float -T script
+QMAKE_CFLAGS += $${gcceExtraFlags}
+QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time
+
+QMAKE_LFLAGS += --target1-abs \
+ --no-undefined \
+ --strip-debug \
+ --nostdlib
+
+QMAKE_LIBDIR += ${EPOCROOT}/epoc32/release/armv5/udeb/
+
+# g++ knows the path to the gcc-shipped-libs, ld doesn't. So cache the full path in the generate Makefile
+QMAKE_GCC_SEARCH_DIRS =$$system($$QMAKE_CXX -print-search-dirs)
+for(line, QMAKE_GCC_SEARCH_DIRS) {
+ contains(line, "libraries:") {
+ foundIt="1"
+ } else {
+ contains(foundIt, "1") {
+ QMAKE_LFLAGS += $$replace(line, "[=:]", " -L")
+ }
+ }
+}
+
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib
+
+INCLUDEPATH = ${EPOCROOT}epoc32/include/ \
+ $${EPOCROOT}epoc32/include/variant \
+ $${EPOCROOT}epoc32/include/stdapis \
+ $${EPOCROOT}epoc32/include/gcce \
+ ${EPOCROOT}epoc32/include/stdapis/sys \
+ ${EPOCROOT}epoc32/include/stdapis/stlport \
+ $$INCLUDEPATH
+
diff --git a/mkspecs/symbian/linux-gcce/qplatformdefs.h b/mkspecs/symbian/linux-gcce/qplatformdefs.h
new file mode 100644
index 0000000..4a658c5
--- /dev/null
+++ b/mkspecs/symbian/linux-gcce/qplatformdefs.h
@@ -0,0 +1,2 @@
+#include "../../common/symbian/qplatformdefs.h"
+
diff --git a/mkspecs/tru64-cxx/qmake.conf b/mkspecs/tru64-cxx/qmake.conf
index 8cef84d..88021df 100644
--- a/mkspecs/tru64-cxx/qmake.conf
+++ b/mkspecs/tru64-cxx/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl plugin_no_soname
QT += core gui
diff --git a/mkspecs/tru64-cxx/qplatformdefs.h b/mkspecs/tru64-cxx/qplatformdefs.h
index 54fb139..ed07d5b 100644
--- a/mkspecs/tru64-cxx/qplatformdefs.h
+++ b/mkspecs/tru64-cxx/qplatformdefs.h
@@ -78,50 +78,21 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
+#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_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(_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) && defined(_OSF_SOURCE)
// Not available in the <unistd.h> header file of Tru64 4.0F.
@@ -129,19 +100,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++/qmake.conf b/mkspecs/tru64-g++/qmake.conf
index 7749013..71e5682 100644
--- a/mkspecs/tru64-g++/qmake.conf
+++ b/mkspecs/tru64-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl plugin_no_soname
QT += core gui
diff --git a/mkspecs/tru64-g++/qplatformdefs.h b/mkspecs/tru64-g++/qplatformdefs.h
index 44c23f1..ed07d5b 100644
--- a/mkspecs/tru64-g++/qplatformdefs.h
+++ b/mkspecs/tru64-g++/qplatformdefs.h
@@ -78,50 +78,21 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
+#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_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(_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) && defined(_OSF_SOURCE)
// Not available in the <unistd.h> header file of Tru64 4.0F.
@@ -129,19 +100,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/qmake.conf b/mkspecs/unixware-cc/qmake.conf
index 978aaa1..5fb2b2c 100644
--- a/mkspecs/unixware-cc/qmake.conf
+++ b/mkspecs/unixware-cc/qmake.conf
@@ -8,6 +8,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/unixware-cc/qplatformdefs.h b/mkspecs/unixware-cc/qplatformdefs.h
index e314713..3a26042 100644
--- a/mkspecs/unixware-cc/qplatformdefs.h
+++ b/mkspecs/unixware-cc/qplatformdefs.h
@@ -76,55 +76,16 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_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_NO_USE_FSEEKO
+#include "../common/posix/qplatformdefs.h"
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_OFF_T
+#undef QT_SOCKLEN_T
-#define QT_SOCKLEN_T size_t
+#define QT_OFF_T off_t
+#define QT_SOCKLEN_T size_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unixware-g++/qmake.conf b/mkspecs/unixware-g++/qmake.conf
index ce1a0f1..b6a438a 100644
--- a/mkspecs/unixware-g++/qmake.conf
+++ b/mkspecs/unixware-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/unixware-g++/qplatformdefs.h b/mkspecs/unixware-g++/qplatformdefs.h
index e314713..3a26042 100644
--- a/mkspecs/unixware-g++/qplatformdefs.h
+++ b/mkspecs/unixware-g++/qplatformdefs.h
@@ -76,55 +76,16 @@
#include <net/if.h>
#endif
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_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_NO_USE_FSEEKO
+#include "../common/posix/qplatformdefs.h"
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#undef QT_OFF_T
+#undef QT_SOCKLEN_T
-#define QT_SOCKLEN_T size_t
+#define QT_OFF_T off_t
+#define QT_SOCKLEN_T size_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/linux-host-g++/qmake.conf b/mkspecs/unsupported/linux-host-g++/qmake.conf
index 8a480c4..7b17789 100644
--- a/mkspecs/unsupported/linux-host-g++/qmake.conf
+++ b/mkspecs/unsupported/linux-host-g++/qmake.conf
@@ -88,8 +88,6 @@ QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL
-QMAKE_INCDIR_OPENGL_ES1CL = $$QMAKE_INCDIR_OPENGL
-QMAKE_LIBDIR_OPENGL_ES1CL = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL =
@@ -106,7 +104,6 @@ QMAKE_LIBS_EGL = -lEGL
QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM
-QMAKE_LIBS_OPENGL_ES1CL = -lGLES_CL
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
QMAKE_LIBS_OPENVG = -lOpenVG
QMAKE_LIBS_THREAD = -lpthread
diff --git a/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf b/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf
index 1ade6b9..28e7754 100644
--- a/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf
+++ b/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf
@@ -12,6 +12,7 @@
# $staging/usr/lib/pkgconfig)
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl
QT += core gui
diff --git a/mkspecs/unsupported/qnx-g++/qmake.conf b/mkspecs/unsupported/qnx-g++/qmake.conf
index 2e568dc..37e7bce 100644
--- a/mkspecs/unsupported/qnx-g++/qmake.conf
+++ b/mkspecs/unsupported/qnx-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/unsupported/qnx-g++/qplatformdefs.h b/mkspecs/unsupported/qnx-g++/qplatformdefs.h
index 9fe67dd..b5bcee8 100644
--- a/mkspecs/unsupported/qnx-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/qnx-g++/qplatformdefs.h
@@ -81,76 +81,8 @@
// for htonl
#include <arpa/inet.h>
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseeko
-#define QT_FTELL ::ftello
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T off_t
-#endif
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::lstat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#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_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
-
-#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_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
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../../common/posix/qplatformdefs.h"
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
diff --git a/mkspecs/unsupported/qws/qnx-641/qmake.conf b/mkspecs/unsupported/qws/qnx-641/qmake.conf
new file mode 100644
index 0000000..12eaf1d
--- /dev/null
+++ b/mkspecs/unsupported/qws/qnx-641/qmake.conf
@@ -0,0 +1,100 @@
+#
+# qmake configuration for qnx
+#
+# Written for QNX 6.4.1 without X11.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl
+QT += core gui
+DEFINES += QT_NO_NIS QT_NO_TEXTODFWRITER QT_OPENGL
+
+QMAKE_CC = qcc
+QMAKE_CFLAGS += -V4.3.3,gcc_ntox86_acpp-ne -pipe
+QMAKE_CFLAGS_DEPS += -M
+QMAKE_CFLAGS_WARN_ON += -Wall -W
+QMAKE_CFLAGS_WARN_OFF += -w
+QMAKE_CFLAGS_RELEASE += -O2
+QMAKE_CFLAGS_DEBUG += -g
+QMAKE_CFLAGS_SHLIB += -fPIC
+QMAKE_CFLAGS_STATIC_LIB += -fPIC
+QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
+QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
+QMAKE_COMPILER_DEFINES += __QNXNTO__
+
+QMAKE_CXX = qcc
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+QMAKE_LINK = qcc
+QMAKE_LINK_SHLIB = qcc
+QMAKE_LINK_SHLIB_CMD = $(LINK) $(LFLAGS) -o ../../lib/$(TARGET) $(OBJECTS) $(LIBS)
+QMAKE_LFLAGS = -V4.3.3,gcc_ntox86 -lang-c++ -Y_acpp-ne
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -shared
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -Wl,-soname,
+QMAKE_LFLAGS_THREAD =
+QMAKE_LN_SHLIB = -cp
+QMAKE_RPATH = -Wl,-rpath,
+
+QMAKE_PCH_OUTPUT_EXT = .gch
+
+# -Bsymbolic-functions (ld) support
+QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
+QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
+
+include(../../common/unix.conf)
+
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR =
+QMAKE_LIBDIR =
+QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+
+
+QMAKE_LIBS = -lm -lz
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_THREAD =
+QMAKE_LIBS_NETWORK += -lsocket
+QMAKE_LIBS_GUI += -lsocket
+QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
+QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
+QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
+
+QMAKE_AR = ntox86-ar cqs
+QMAKE_RANLIB =
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_COPY_FILE = $(COPY)
+QMAKE_COPY_DIR = $(COPY) -r
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+QMAKE_STRIP = strip
+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = mkdir -p
+load(qt_config)
diff --git a/mkspecs/unsupported/qws/qnx-641/qplatformdefs.h b/mkspecs/unsupported/qws/qnx-641/qplatformdefs.h
new file mode 100644
index 0000000..5912a51
--- /dev/null
+++ b/mkspecs/unsupported/qws/qnx-641/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#include "../../qnx-g++/qplatformdefs.h"
diff --git a/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf b/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf
index 51fe697..62857bf 100644
--- a/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf
+++ b/mkspecs/unsupported/qws/qnx-generic-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf b/mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf
index fffb80f..dce60ea 100644
--- a/mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf
+++ b/mkspecs/unsupported/qws/qnx-i386-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf b/mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf
index 56a9c66..93d04ff 100644
--- a/mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf
+++ b/mkspecs/unsupported/qws/qnx-ppc-g++/qmake.conf
@@ -5,6 +5,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release link_prl
QT += core gui
diff --git a/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf b/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf
index a8f7e49..fc0b125 100644
--- a/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf
+++ b/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl vxworks
QT += core gui network
diff --git a/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf b/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf
index be8c13d..80b5f3e 100644
--- a/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf
+++ b/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl vxworks
QT += core gui network
diff --git a/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf b/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf
index 6228a6b..be35172 100644
--- a/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf
+++ b/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl vxworks
QT += core gui network
diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf b/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf
index 29e9c70..83f46c0 100644
--- a/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf
+++ b/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf
@@ -3,6 +3,7 @@
#
MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl vxworks
QT += core gui network
diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
index 33ffd96..b183684 100644
--- a/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/vxworks-simpentium-g++/qplatformdefs.h
@@ -47,84 +47,29 @@
#include "qglobal.h"
#include "qfunctions_vxworks.h"
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../../common/posix/qplatformdefs.h"
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct stat64
-#define QT_STATBUF4TSTAT struct stat64
-#define QT_STAT ::stat64
-#define QT_FSTAT ::fstat64
-#define QT_LSTAT ::stat64
-#define QT_OPEN ::open64
-#define QT_TRUNCATE ::truncate64
-#define QT_FTRUNCATE ::ftruncate64
-#define QT_LSEEK ::lseek64
-#else
-#define QT_STATBUF struct stat
-#define QT_STATBUF4TSTAT struct stat
-#define QT_STAT ::stat
-#define QT_FSTAT ::fstat
-#define QT_LSTAT ::stat
-#define QT_OPEN ::open
-#define QT_TRUNCATE ::truncate
-#define QT_FTRUNCATE ::ftruncate
-#define QT_LSEEK ::lseek
-#endif
+#undef QT_LSTAT
+#undef QT_MKDIR
+#undef QT_READ
+#undef QT_WRITE
+#undef QT_SOCKLEN_T
+#undef QT_SOCKET_CONNECT
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FOPEN ::fopen64
-#define QT_FSEEK ::fseeko64
-#define QT_FTELL ::ftello64
-#define QT_FGETPOS ::fgetpos64
-#define QT_FSETPOS ::fsetpos64
-#define QT_MMAP ::mmap64
-#define QT_FPOS_T fpos64_t
-#define QT_OFF_T off64_t
-#else
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-#endif
+#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_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
// 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
diff --git a/mkspecs/win32-borland/qplatformdefs.h b/mkspecs/win32-borland/qplatformdefs.h
index 4efae9a..d8fa4c2 100644
--- a/mkspecs/win32-borland/qplatformdefs.h
+++ b/mkspecs/win32-borland/qplatformdefs.h
@@ -96,21 +96,16 @@
# define QT_STAT_LNK _S_IFLNK
#endif
-#define QT_FOPEN ::fopen
+#include "../common/c89/qplatformdefs.h"
+
#ifdef QT_LARGEFILE_SUPPORT
+#undef QT_FSEEK
+#undef QT_FTELL
+#undef QT_OFF_T
+
#define QT_FSEEK ::_fseeki64
#define QT_FTELL ::_ftelli64
-#else
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#endif
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_FPOS_T fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
#define QT_OFF_T __int64
-#else
-#define QT_OFF_T long
#endif
#define QT_FILENO _fileno
diff --git a/mkspecs/win32-g++/qplatformdefs.h b/mkspecs/win32-g++/qplatformdefs.h
index 12828d1..36333b6 100644
--- a/mkspecs/win32-g++/qplatformdefs.h
+++ b/mkspecs/win32-g++/qplatformdefs.h
@@ -133,21 +133,16 @@ typedef enum {
# define QT_OPEN_BINARY _O_BINARY
#endif
-#define QT_FOPEN ::fopen
+#include "../common/c89/qplatformdefs.h"
+
#ifdef QT_LARGEFILE_SUPPORT
+#undef QT_FSEEK
+#undef QT_FTELL
+#undef QT_OFF_T
+
#define QT_FSEEK ::fseeko64
#define QT_FTELL ::ftello64
-#else
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#endif
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_FPOS_T fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
#define QT_OFF_T off64_t
-#else
-#define QT_OFF_T long
#endif
#define QT_SIGNAL_ARGS int
diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf
index 78c947d..fcc7691 100644
--- a/mkspecs/win32-icc/qmake.conf
+++ b/mkspecs/win32-icc/qmake.conf
@@ -4,7 +4,7 @@
# Written for Intel C++
#
-MAKEFILE_GENERATOR = MSVC
+MAKEFILE_GENERATOR = MSVC.NET
TEMPLATE = app
CONFIG += qt warn_on release incremental flat link_prl copy_dir_files debug_and_release debug_and_release_target
QT += core gui
diff --git a/mkspecs/win32-icc/qplatformdefs.h b/mkspecs/win32-icc/qplatformdefs.h
index 6abfef2..833846f 100644
--- a/mkspecs/win32-icc/qplatformdefs.h
+++ b/mkspecs/win32-icc/qplatformdefs.h
@@ -113,21 +113,19 @@
# define QT_OPEN_BINARY _O_BINARY
#endif
-#define QT_FOPEN ::fopen
+#include "../common/c89/qplatformdefs.h"
+
#if defined(QT_LARGEFILE_SUPPORT) && _MSC_VER > 1310
+#undef QT_FSEEK
+#undef QT_FTELL
+
#define QT_FSEEK ::_fseeki64
#define QT_FTELL ::_ftelli64
-#else
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
#endif
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_FPOS_T fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
+
+#if defined(QT_LARGEFILE_SUPPORT)
+#undef QT_OFF_T
#define QT_OFF_T __int64
-#else
-#define QT_OFF_T long
#endif
#define QT_SIGNAL_ARGS int
diff --git a/mkspecs/win32-msvc.net/qmake.conf b/mkspecs/win32-msvc.net/qmake.conf
deleted file mode 100644
index 89fa00d..0000000
--- a/mkspecs/win32-msvc.net/qmake.conf
+++ /dev/null
@@ -1,89 +0,0 @@
-#
-# qmake configuration for win32-msvc.net (used by 2002 & 2003 before, but now deprecated. Use win32-msvc2002 or win32-msvc2003 instead)
-#
-# Written for Microsoft C++.NET
-#
-!build_pass:message("The mkspec/win32-msvc.net is now deprecated, use win32-msvc2002 or win32-msvc2003")
-
-MAKEFILE_GENERATOR = MSVC.NET
-TEMPLATE = app
-CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target
-QT += core gui
-DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT
-QMAKE_COMPILER_DEFINES += _MSC_VER=1300 WIN32
-
-QMAKE_CC = cl
-QMAKE_LEX = flex
-QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
-QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -nologo -Zm300
-QMAKE_CFLAGS_WARN_ON = -W3
-QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD
-QMAKE_CFLAGS_DEBUG = -Zi -MDd
-QMAKE_CFLAGS_YACC =
-
-QMAKE_CXX = $$QMAKE_CC
-QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189
-QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_STL_ON = -EHsc
-QMAKE_CXXFLAGS_STL_OFF =
-QMAKE_CXXFLAGS_RTTI_ON = -GR
-QMAKE_CXXFLAGS_RTTI_OFF =
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
-QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
-
-QMAKE_INCDIR =
-QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
-QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
-
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
-
-QMAKE_LINK = link
-QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_DEBUG = /DEBUG
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
-QMAKE_LFLAGS_DLL = /DLL
-
-QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
-QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
-QMAKE_LIBS_NETWORK = ws2_32.lib
-QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib gdi32.lib user32.lib
-QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
-
-QMAKE_LIBS_QT_ENTRY = -lqtmain
-
-QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
-QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
-QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe
-
-QMAKE_IDL = midl
-QMAKE_LIB = lib /NOLOGO
-QMAKE_RC = rc
-
-QMAKE_ZIP = zip -r -9
-
-QMAKE_COPY = copy /y
-QMAKE_COPY_DIR = xcopy /s /q /y /i
-QMAKE_MOVE = move
-QMAKE_DEL_FILE = del
-QMAKE_DEL_DIR = rmdir
-QMAKE_CHK_DIR_EXISTS = if not exist
-QMAKE_MKDIR = mkdir
-
-VCPROJ_EXTENSION = .vcproj
-VCSOLUTION_EXTENSION = .sln
-VCPROJ_KEYWORD = Qt4VSv1.0
-load(qt_config)
diff --git a/mkspecs/win32-msvc.net/qplatformdefs.h b/mkspecs/win32-msvc.net/qplatformdefs.h
deleted file mode 100644
index dcfaec5..0000000
--- a/mkspecs/win32-msvc.net/qplatformdefs.h
+++ /dev/null
@@ -1,147 +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 QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
-
-#ifdef UNICODE
-#ifndef _UNICODE
-#define _UNICODE
-#endif
-#endif
-
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-#define _POSIX_
-#include <limits.h>
-#undef _POSIX_
-
-#include <tchar.h>
-#include <io.h>
-#include <direct.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <windows.h>
-
-#define Q_FS_FAT
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct _stati64 // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-#define QT_STAT ::_stati64
-#define QT_FSTAT ::_fstati64
-#else
-#define QT_STATBUF struct _stat // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
-#define QT_STAT ::_stat
-#define QT_FSTAT ::_fstat
-#endif
-#define QT_STAT_REG _S_IFREG
-#define QT_STAT_DIR _S_IFDIR
-#define QT_STAT_MASK _S_IFMT
-#if defined(_S_IFLNK)
-# define QT_STAT_LNK _S_IFLNK
-#endif
-#define QT_FILENO _fileno
-#define QT_OPEN ::_open
-#define QT_CLOSE ::_close
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK ::_lseeki64
-#define QT_TSTAT ::_tstati64
-#else
-#define QT_LSEEK ::_lseek
-#define QT_TSTAT ::_tstat
-#endif
-#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
-#if defined(O_TEXT)
-# define QT_OPEN_TEXT _O_TEXT
-# define QT_OPEN_BINARY _O_BINARY
-#endif
-
-#define QT_FOPEN ::fopen
-#ifdef QT_LARGEFILE_SUPPORT
-// 64-bit versions of fseek/ftell not always available. E.g., when linking
-// dynamically to CRT (/MT)
-#define QT_FSEEK ::fseek
-#define QT_FTELL (QT_OFF_T)::ftell
-#else
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#endif
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_FPOS_T fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_OFF_T __int64
-#else
-#define QT_OFF_T long
-#endif
-
-#define QT_SIGNAL_ARGS int
-
-#define QT_VSNPRINTF ::_vsnprintf
-#define QT_SNPRINTF ::_snprintf
-
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
-
-typedef int mode_t;
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/win32-msvc/features/incremental.prf b/mkspecs/win32-msvc/features/incremental.prf
deleted file mode 100644
index 67596ca..0000000
--- a/mkspecs/win32-msvc/features/incremental.prf
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG -= incremental_off
-QMAKE_LFLAGS_DEBUG += /incremental:yes
diff --git a/mkspecs/win32-msvc/features/incremental_off.prf b/mkspecs/win32-msvc/features/incremental_off.prf
deleted file mode 100644
index 9b6d19e..0000000
--- a/mkspecs/win32-msvc/features/incremental_off.prf
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG -= incremental
-QMAKE_LFLAGS += /incremental:no
diff --git a/mkspecs/win32-msvc/qmake.conf b/mkspecs/win32-msvc/qmake.conf
deleted file mode 100644
index 64ab84a..0000000
--- a/mkspecs/win32-msvc/qmake.conf
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# qmake configuration for win32-msvc
-#
-# Written for Microsoft C++
-#
-
-MAKEFILE_GENERATOR = MSVC
-TEMPLATE = app
-CONFIG += qt warn_on release incremental flat link_prl precompile_header copy_dir_files no_delete_multiple_files debug_and_release debug_and_release_target
-QT += core gui
-DEFINES += UNICODE QT_LARGEFILE_SUPPORT
-QMAKE_COMPILER_DEFINES += _MSC_VER=1200 WIN32
-
-QMAKE_CC = cl
-QMAKE_LEX = flex
-QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
-QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -nologo -Zm200
-QMAKE_CFLAGS_WARN_ON = -W3
-QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O1 -MD
-QMAKE_CFLAGS_DEBUG = -Zi -MDd
-QMAKE_CFLAGS_YACC =
-
-QMAKE_CXX = $$QMAKE_CC
-QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
-QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_STL_ON = -GX
-QMAKE_CXXFLAGS_STL_OFF =
-QMAKE_CXXFLAGS_RTTI_ON = -GR
-QMAKE_CXXFLAGS_RTTI_OFF =
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -GX
-QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
-
-QMAKE_INCDIR =
-QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
-QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
-
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
-
-QMAKE_LINK = link
-QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_DEBUG = /DEBUG
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:console
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:windows
-QMAKE_LFLAGS_DLL = /DLL
-
-QMAKE_LIBS =
-QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
-QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
-QMAKE_LIBS_NETWORK = ws2_32.lib
-QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib gdi32.lib user32.lib delayimp.lib
-QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
-QMAKE_LIBS_QT_ENTRY = -lqtmain
-
-QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
-QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
-QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe
-
-QMAKE_IDL = midl
-QMAKE_LIB = lib /NOLOGO
-QMAKE_RC = rc
-
-QMAKE_ZIP = zip -r -9
-
-QMAKE_COPY = copy /y
-QMAKE_COPY_DIR = xcopy /s /q /y /i
-QMAKE_MOVE = move
-QMAKE_DEL_FILE = del
-QMAKE_DEL_DIR = rmdir
-QMAKE_CHK_DIR_EXISTS = if not exist
-QMAKE_MKDIR = mkdir
-
-DSP_EXTENSION = .dsp
-load(qt_config)
diff --git a/mkspecs/win32-msvc/qplatformdefs.h b/mkspecs/win32-msvc/qplatformdefs.h
deleted file mode 100644
index 5dee28c..0000000
--- a/mkspecs/win32-msvc/qplatformdefs.h
+++ /dev/null
@@ -1,148 +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 QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
-
-#ifdef UNICODE
-#ifndef _UNICODE
-#define _UNICODE
-#endif
-#endif
-
-// Get Qt defines/settings
-
-#include "qglobal.h"
-
-#define _POSIX_
-#include <limits.h>
-#undef _POSIX_
-
-#include <tchar.h>
-#include <io.h>
-#include <direct.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <windows.h>
-
-#define Q_FS_FAT
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct _stati64 // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-#define QT_STAT ::_stati64
-#define QT_FSTAT ::_fstati64
-#else
-#define QT_STATBUF struct _stat // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
-#define QT_STAT ::_stat
-#define QT_FSTAT ::_fstat
-#endif
-#define QT_STAT_REG _S_IFREG
-#define QT_STAT_DIR _S_IFDIR
-#define QT_STAT_MASK _S_IFMT
-#if defined(_S_IFLNK)
-# define QT_STAT_LNK _S_IFLNK
-#endif
-#define QT_FILENO _fileno
-#define QT_OPEN ::_open
-#define QT_CLOSE ::_close
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK ::_lseeki64
-#define QT_TSTAT ::_tstati64
-#else
-#define QT_LSEEK ::_lseek
-#define QT_TSTAT ::_tstat
-#endif
-#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
-#if defined(O_TEXT)
-# define QT_OPEN_TEXT _O_TEXT
-# define QT_OPEN_BINARY _O_BINARY
-#endif
-
-#define QT_FOPEN ::fopen
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#else
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#endif
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_FPOS_T fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_OFF_T __int64
-#else
-#define QT_OFF_T long
-#endif
-
-#define QT_SIGNAL_ARGS int
-
-#if defined(_MSC_VER) && _MSC_VER < 1400
-# define QT_VSNPRINTF ::_vsnprintf
-#endif
-#define QT_SNPRINTF ::_snprintf
-
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
-
-typedef int mode_t;
-
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/win32-msvc2002/qmake.conf b/mkspecs/win32-msvc2002/qmake.conf
deleted file mode 100644
index 13fbfb0..0000000
--- a/mkspecs/win32-msvc2002/qmake.conf
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# qmake configuration for win32-msvc2002
-#
-# Written for Microsoft C++.NET
-#
-
-MAKEFILE_GENERATOR = MSVC.NET
-TEMPLATE = app
-CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target
-QT += core gui
-DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT
-QMAKE_COMPILER_DEFINES += _MSC_VER=1300 WIN32
-
-QMAKE_CC = cl
-QMAKE_LEX = flex
-QMAKE_LEXFLAGS =
-QMAKE_YACC = byacc
-QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -nologo -Zm300
-QMAKE_CFLAGS_WARN_ON = -W3
-QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD
-QMAKE_CFLAGS_DEBUG = -Zi -MDd
-QMAKE_CFLAGS_YACC =
-
-QMAKE_CXX = $$QMAKE_CC
-QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189
-QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_STL_ON = -EHsc
-QMAKE_CXXFLAGS_STL_OFF =
-QMAKE_CXXFLAGS_RTTI_ON = -GR
-QMAKE_CXXFLAGS_RTTI_OFF =
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
-QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
-
-QMAKE_INCDIR =
-QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
-QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
-
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
-
-QMAKE_LINK = link
-QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_DEBUG = /DEBUG
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
-QMAKE_LFLAGS_DLL = /DLL
-
-QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
-QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
-QMAKE_LIBS_NETWORK = ws2_32.lib
-QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib gdi32.lib user32.lib
-QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
-
-QMAKE_LIBS_QT_ENTRY = -lqtmain
-
-QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
-QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
-QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe
-
-QMAKE_IDL = midl
-QMAKE_LIB = lib /NOLOGO
-QMAKE_RC = rc
-
-QMAKE_ZIP = zip -r -9
-
-QMAKE_COPY = copy /y
-QMAKE_COPY_DIR = xcopy /s /q /y /i
-QMAKE_MOVE = move
-QMAKE_DEL_FILE = del
-QMAKE_DEL_DIR = rmdir
-QMAKE_CHK_DIR_EXISTS = if not exist
-QMAKE_MKDIR = mkdir
-
-VCPROJ_EXTENSION = .vcproj
-VCSOLUTION_EXTENSION = .sln
-VCPROJ_KEYWORD = Qt4VSv1.0
-load(qt_config)
diff --git a/mkspecs/win32-msvc2003/qplatformdefs.h b/mkspecs/win32-msvc2003/qplatformdefs.h
index 6d71abf..05584c9 100644
--- a/mkspecs/win32-msvc2003/qplatformdefs.h
+++ b/mkspecs/win32-msvc2003/qplatformdefs.h
@@ -39,4 +39,102 @@
**
****************************************************************************/
-#include "../win32-msvc.net/qplatformdefs.h"
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+#ifdef UNICODE
+#ifndef _UNICODE
+#define _UNICODE
+#endif
+#endif
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+#define _POSIX_
+#include <limits.h>
+#undef _POSIX_
+
+#include <tchar.h>
+#include <io.h>
+#include <direct.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <windows.h>
+
+#define Q_FS_FAT
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct _stati64 // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
+#define QT_STAT ::_stati64
+#define QT_FSTAT ::_fstati64
+#else
+#define QT_STATBUF struct _stat // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
+#define QT_STAT ::_stat
+#define QT_FSTAT ::_fstat
+#endif
+#define QT_STAT_REG _S_IFREG
+#define QT_STAT_DIR _S_IFDIR
+#define QT_STAT_MASK _S_IFMT
+#if defined(_S_IFLNK)
+# define QT_STAT_LNK _S_IFLNK
+#endif
+#define QT_FILENO _fileno
+#define QT_OPEN ::_open
+#define QT_CLOSE ::_close
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_LSEEK ::_lseeki64
+#define QT_TSTAT ::_tstati64
+#else
+#define QT_LSEEK ::_lseek
+#define QT_TSTAT ::_tstat
+#endif
+#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
+#if defined(O_TEXT)
+# define QT_OPEN_TEXT _O_TEXT
+# define QT_OPEN_BINARY _O_BINARY
+#endif
+
+#include "../common/c89/qplatformdefs.h"
+
+#ifdef QT_LARGEFILE_SUPPORT
+#undef QT_FTELL
+#undef QT_OFF_T
+
+// 64-bit versions of fseek/ftell not always available. E.g., when linking
+// dynamically to CRT (/MT)
+#define QT_FTELL (QT_OFF_T)::ftell
+#define QT_OFF_T __int64
+#endif
+
+#define QT_SIGNAL_ARGS int
+
+#define QT_VSNPRINTF ::_vsnprintf
+#define QT_SNPRINTF ::_snprintf
+
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
+
+typedef int mode_t;
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/win32-msvc2005/qplatformdefs.h b/mkspecs/win32-msvc2005/qplatformdefs.h
index b87ea48..33360b7 100644
--- a/mkspecs/win32-msvc2005/qplatformdefs.h
+++ b/mkspecs/win32-msvc2005/qplatformdefs.h
@@ -113,21 +113,16 @@
# define QT_OPEN_BINARY _O_BINARY
#endif
-#define QT_FOPEN ::fopen
+#include "../common/c89/qplatformdefs.h"
+
#ifdef QT_LARGEFILE_SUPPORT
+#undef QT_FSEEK
+#undef QT_FTELL
+#undef QT_OFF_T
+
#define QT_FSEEK ::_fseeki64
#define QT_FTELL ::_ftelli64
-#else
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#endif
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_FPOS_T fpos_t
-#ifdef QT_LARGEFILE_SUPPORT
#define QT_OFF_T __int64
-#else
-#define QT_OFF_T long
#endif
#define QT_SIGNAL_ARGS int