aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2014-02-02 12:34:00 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-02 14:29:07 +0100
commitae19cdacbeade9e55bd4bf15314221c8fa182b5f (patch)
tree4b81c40b6bd1c5eb2b7a89417c2d8058486ae16a /tests
parent3408bd9d08630687515401cfaadaf818912d72d7 (diff)
alloca() is declared in stdlib.h on BSD systems
... except on Darwin. Bonus change: Updated auto-tests trying to include 'alloca.h'. This is a follow up on 24c43a5748b8502. Change-Id: I299de00bf0dca7842470b158282daea221a10f2d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp7
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp7
2 files changed, 2 insertions, 12 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index ba99b34935..529b97ed89 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -48,6 +48,7 @@
#include <qstandarditemmodel.h>
#include <QtCore/qnumeric.h>
#include <stdlib.h>
+#include <private/qv4alloca_p.h>
#ifdef Q_CC_MSVC
#define NO_INLINE __declspec(noinline)
@@ -55,12 +56,6 @@
#define NO_INLINE __attribute__((noinline))
#endif
-#if defined(Q_OS_WIN)
-#include <malloc.h>
-#else
-#include <alloca.h>
-#endif
-
Q_DECLARE_METATYPE(QList<int>)
Q_DECLARE_METATYPE(QObjectList)
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 9ad4a20207..f9f3ac2d4c 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -55,6 +55,7 @@
#include "../../shared/util.h"
#include <private/qv4functionobject_p.h>
#include <private/qv4scopedvalue_p.h>
+#include <private/qv4alloca_p.h>
#ifdef Q_CC_MSVC
#define NO_INLINE __declspec(noinline)
@@ -62,12 +63,6 @@
#define NO_INLINE __attribute__((noinline))
#endif
-#if defined(Q_OS_WIN)
-#include <malloc.h>
-#else
-#include <alloca.h>
-#endif
-
/*
This test covers evaluation of ECMAScript expressions and bindings from within
QML. This does not include static QML language issues.