summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/corelib/ipc/ipc.pro4
-rw-r--r--src/corelib/global/qconfig-bootstrapped.h2
-rw-r--r--src/corelib/kernel/qcore_unix_p.h4
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/qsharedmemory.pro7
4 files changed, 10 insertions, 7 deletions
diff --git a/examples/corelib/ipc/ipc.pro b/examples/corelib/ipc/ipc.pro
index 4cc5f3be56..101552cea9 100644
--- a/examples/corelib/ipc/ipc.pro
+++ b/examples/corelib/ipc/ipc.pro
@@ -1,6 +1,6 @@
requires(qtHaveModule(widgets))
TEMPLATE = subdirs
-# no QSharedMemory
-!vxworks:!integrity: SUBDIRS = sharedmemory
+
+qtConfig(sharedmemory): SUBDIRS = sharedmemory
qtHaveModule(network): SUBDIRS += localfortuneserver localfortuneclient
diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h
index 2bca82535f..d7849d4699 100644
--- a/src/corelib/global/qconfig-bootstrapped.h
+++ b/src/corelib/global/qconfig-bootstrapped.h
@@ -83,6 +83,8 @@
#define QT_NO_TRANSLATION
#define QT_FEATURE_translation -1
#define QT_NO_GEOM_VARIANT
+#define QT_FEATURE_sharedmemory -1
+#define QT_FEATURE_systemsemaphore -1
#ifdef QT_BUILD_QMAKE
#define QT_FEATURE_commandlineparser -1
diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h
index b5756af994..80058d9115 100644
--- a/src/corelib/kernel/qcore_unix_p.h
+++ b/src/corelib/kernel/qcore_unix_p.h
@@ -370,7 +370,7 @@ union qt_semun {
};
#ifndef QT_POSIX_IPC
-#ifndef QT_NO_SHAREDMEMORY
+#if QT_CONFIG(sharedmemory) || QT_CONFIG(systemsemaphore)
#ifndef Q_OS_ANDROID
static inline key_t qt_safe_ftok(const QByteArray &filename, int proj_id)
{
@@ -379,7 +379,7 @@ static inline key_t qt_safe_ftok(const QByteArray &filename, int proj_id)
return ::ftok(filename.constData(), qHash(filename, proj_id));
}
#endif // !Q_OS_ANDROID
-#endif // !QT_NO_SHAREDMEMORY
+#endif // QT_CONFIG(sharedmemory) || QT_CONFIG(systemsemaphore)
#endif // !QT_POSIX_IPC
QT_END_NAMESPACE
diff --git a/tests/auto/corelib/kernel/qsharedmemory/qsharedmemory.pro b/tests/auto/corelib/kernel/qsharedmemory/qsharedmemory.pro
index 69062a9741..3a4697750e 100644
--- a/tests/auto/corelib/kernel/qsharedmemory/qsharedmemory.pro
+++ b/tests/auto/corelib/kernel/qsharedmemory/qsharedmemory.pro
@@ -1,5 +1,6 @@
TEMPLATE = subdirs
-!winrt: SUBDIRS = sharedmemoryhelper
-
-SUBDIRS += test
+qtConfig(sharedmemory) {
+ !winrt: SUBDIRS = sharedmemoryhelper
+ SUBDIRS += test
+}