From 98689cd2f9d3e9e4dac33ccf6679b90d4b39284f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 16 Jul 2018 12:10:19 +0200 Subject: configure: enable inline tests to refer to PWD ... and use that to inline the xlocalescanprint test. Change-Id: I0973133d7f9ecc9a38b70dc4b83df174a35b2b1f Reviewed-by: Joerg Bornemann --- src/corelib/configure.json | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'src/corelib/configure.json') diff --git a/src/corelib/configure.json b/src/corelib/configure.json index eb213398ca..3b33e6158b 100644 --- a/src/corelib/configure.json +++ b/src/corelib/configure.json @@ -467,7 +467,38 @@ "xlocalescanprint": { "label": "xlocale.h (or equivalents)", "type": "compile", - "test": "xlocalescanprint" + "test": { + "files": { + "qglobal.h": [ + "#ifndef QGLOBAL_H", + "#define QGLOBAL_H", + "#endif" + ] + }, + "tail": [ + "#define QT_BEGIN_NAMESPACE", + "#define QT_END_NAMESPACE", + "", + "#ifdef _MSVC_VER", + "#define Q_CC_MSVC _MSVC_VER", + "#endif", + "", + "#define QT_NO_DOUBLECONVERSION", + "", + "#include QDSP_P_H" + ], + "main": [ + "#ifdef _MSVC_VER", + "_locale_t invalidLocale = NULL;", + "#else", + "locale_t invalidLocale = NULL;", + "#endif", + "double a = 3.4;", + "qDoubleSnprintf(argv[0], 1, invalidLocale, \"invalid format\", a);", + "qDoubleSscanf(argv[0], invalidLocale, \"invalid format\", &a, &argc);" + ], + "qmake": "DEFINES += QDSP_P_H=$$shell_quote(\\\"@PWD@/tools/qdoublescanprint_p.h\\\")" + } } }, -- cgit v1.2.3