summaryrefslogtreecommitdiffstats
path: root/config.tests
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-11-10 09:48:11 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-11-10 09:48:11 (GMT)
commitd845505fd57ad4b06499b5b125703e80bbae692a (patch)
tree90f7f0d55eec7754fe870a62b117ac8be6e250d1 /config.tests
parent327ef9127aba3aa6bf2238c0aa779613f8edf0b1 (diff)
downloadQt-d845505fd57ad4b06499b5b125703e80bbae692a.zip
Qt-d845505fd57ad4b06499b5b125703e80bbae692a.tar.gz
Qt-d845505fd57ad4b06499b5b125703e80bbae692a.tar.bz2
Avoid XSync-related runtime crashes on HP-UX due to C++ mangling.
HP-UX is missing the extern "C" wrapper for its XSync function declarations. This caused applications to _build_ but not _run_ (i.e., all GUI apps crashed). Adding the wrapper should be harmless on all X11 platforms. Task-number: QTBUG-5524 Reviewed-by: Thiago
Diffstat (limited to 'config.tests')
-rw-r--r--config.tests/x11/xsync/xsync.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/config.tests/x11/xsync/xsync.cpp b/config.tests/x11/xsync/xsync.cpp
index a7175de..8eea850 100644
--- a/config.tests/x11/xsync/xsync.cpp
+++ b/config.tests/x11/xsync/xsync.cpp
@@ -41,12 +41,16 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
+extern "C" {
#include <X11/extensions/sync.h>
+}
int main(int, char **)
{
XSyncValue value;
(void*)&XSyncIntToValue;
(void*)&XSyncCreateCounter;
- return 0;
+ int a, b;
+ Status ret = XSyncInitialize(NULL, &a, &b);
+ return ret;
}