summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qcompilerdetection.h2
-rw-r--r--src/corelib/global/qglobal.cpp2
-rw-r--r--src/corelib/global/qnamespace.qdoc8
-rw-r--r--src/corelib/global/qsystemdetection.h25
4 files changed, 20 insertions, 17 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 27fc2d4038..41e11ea652 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -584,7 +584,7 @@
# if __has_feature(cxx_alias_templates)
# define Q_COMPILER_TEMPLATE_ALIAS
# endif
-# if 0 /* not implemented in clang yet */
+# if __has_feature(cxx_thread_local)
# define Q_COMPILER_THREAD_LOCAL
# endif
# if __has_feature(cxx_user_literals)
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index ac347655bc..4ee4235278 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2324,7 +2324,7 @@ Q_GLOBAL_STATIC(SeedStorage, randTLS) // Thread Local Storage for seed value
*/
void qsrand(uint seed)
{
-#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && (_POSIX_THREAD_SAFE_FUNCTIONS - 0 > 0)
SeedStorage *seedStorage = randTLS();
if (seedStorage) {
SeedStorageType *pseed = seedStorage->localData();
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 4a5285fa5d..d8d7b9cbcd 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1211,12 +1211,8 @@
/*! \typedef Qt::HANDLE
- Platform-specific handle type for system objects. This is
- equivalent to \c{void *} on Mac OS X and embedded Linux,
- and to \c{unsigned long} on X11. On Windows it is the
- DWORD returned by the Win32 function getCurrentThreadId().
-
- \warning Using this type is not portable.
+ A handle type for system objects, defined as \c{void *}
+ on all platforms.
*/
/*!
diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h
index 5e68226b60..dc9fa7383a 100644
--- a/src/corelib/global/qsystemdetection.h
+++ b/src/corelib/global/qsystemdetection.h
@@ -62,8 +62,8 @@
SOLARIS - Sun Solaris
HPUX - HP-UX
ULTRIX - DEC Ultrix
- LINUX - Linux
- FREEBSD - FreeBSD
+ LINUX - Linux [has variants]
+ FREEBSD - FreeBSD [has variants]
NETBSD - NetBSD
OPENBSD - OpenBSD
BSDI - BSD/OS
@@ -76,12 +76,20 @@
DGUX - DG/UX
RELIANT - Reliant UNIX
DYNIX - DYNIX/ptx
- QNX - QNX
+ QNX - QNX [has variants]
QNX6 - QNX RTP 6.1
LYNX - LynxOS
BSD4 - Any BSD 4.4 system
UNIX - Any UNIX BSD/SYSV system
ANDROID - Android platform
+
+ The following operating systems have variants:
+ LINUX - both Q_OS_LINUX and Q_OS_ANDROID are defined when building for Android
+ - only Q_OS_LINUX is defined if building for other Linux systems
+ QNX - both Q_OS_QNX and Q_OS_BLACKBERRY are defined when building for Blackberry 10
+ - only Q_OS_QNX is defined if building for other QNX targets
+ FREEBSD - Q_OS_FREEBSD is defined only when building for FreeBSD with a BSD userland
+ - Q_OS_FREEBSD_KERNEL is always defined on FreeBSD, even if the userland is from GNU
*/
#if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))
@@ -118,8 +126,11 @@
# define Q_OS_NACL
#elif defined(__linux__) || defined(__linux)
# define Q_OS_LINUX
-#elif defined(__FreeBSD__) || defined(__DragonFly__)
-# define Q_OS_FREEBSD
+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+# ifndef __FreeBSD_kernel__
+# define Q_OS_FREEBSD
+# endif
+# define Q_OS_FREEBSD_KERNEL
# define Q_OS_BSD4
#elif defined(__NetBSD__)
# define Q_OS_NETBSD
@@ -239,10 +250,6 @@
# if !defined(__IPHONE_7_0)
# define __IPHONE_7_0 70000
# endif
-#
-# if (__MAC_OS_X_VERSION_MAX_ALLOWED > __MAC_10_8)
-# warning "This version of OS X is unsupported"
-# endif
#endif
#ifdef __LSB_VERSION__