From 9ca3443a37284bedaf74475c26af173b00757178 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 2 Jul 2017 23:09:49 -0700 Subject: Rename the "sys_auxv" feature to "getauxval" Change-Id: I8d96dea9955d4c749b99fffd14cdbd1e69940d33 Reviewed-by: Oswald Buddenhagen --- config.tests/unix/getauxval/getauxval.cpp | 34 +++++++++++++++++++++++++++++++ config.tests/unix/getauxval/getauxval.pro | 1 + config.tests/unix/sys_auxv/sys_auxv.cpp | 34 ------------------------------- config.tests/unix/sys_auxv/sys_auxv.pro | 1 - src/corelib/configure.json | 20 +++++++++--------- src/corelib/global/qconfig-bootstrapped.h | 2 +- src/corelib/global/qrandom.cpp | 4 ++-- 7 files changed, 48 insertions(+), 48 deletions(-) create mode 100644 config.tests/unix/getauxval/getauxval.cpp create mode 100644 config.tests/unix/getauxval/getauxval.pro delete mode 100644 config.tests/unix/sys_auxv/sys_auxv.cpp delete mode 100644 config.tests/unix/sys_auxv/sys_auxv.pro diff --git a/config.tests/unix/getauxval/getauxval.cpp b/config.tests/unix/getauxval/getauxval.cpp new file mode 100644 index 0000000000..62f71e95d2 --- /dev/null +++ b/config.tests/unix/getauxval/getauxval.cpp @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2017 Intel Corporation. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +int main() +{ + return getauxval(AT_NULL); +} diff --git a/config.tests/unix/getauxval/getauxval.pro b/config.tests/unix/getauxval/getauxval.pro new file mode 100644 index 0000000000..ea46cb0bae --- /dev/null +++ b/config.tests/unix/getauxval/getauxval.pro @@ -0,0 +1 @@ +SOURCES = getauxval.cpp diff --git a/config.tests/unix/sys_auxv/sys_auxv.cpp b/config.tests/unix/sys_auxv/sys_auxv.cpp deleted file mode 100644 index 62f71e95d2..0000000000 --- a/config.tests/unix/sys_auxv/sys_auxv.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 Intel Corporation. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -int main() -{ - return getauxval(AT_NULL); -} diff --git a/config.tests/unix/sys_auxv/sys_auxv.pro b/config.tests/unix/sys_auxv/sys_auxv.pro deleted file mode 100644 index 6920d80e39..0000000000 --- a/config.tests/unix/sys_auxv/sys_auxv.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES = sys_auxv.cpp diff --git a/src/corelib/configure.json b/src/corelib/configure.json index c32354c771..7e5a7b8fde 100644 --- a/src/corelib/configure.json +++ b/src/corelib/configure.json @@ -162,6 +162,11 @@ "type": "compile", "test": "unix/futimesat" }, + "getauxval": { + "label": "getauxval()", + "type": "compile", + "test": "unix/getauxval" + }, "getentropy": { "label": "getentropy()", "type": "compile", @@ -217,11 +222,6 @@ "type": "compile", "test": "unix/syslog" }, - "sys_auxv": { - "label": "sys/auxv.h", - "type": "compile", - "test": "unix/sys_auxv" - }, "xlocalescanprint": { "label": "xlocale.h (or equivalents)", "type": "compile", @@ -281,6 +281,11 @@ "condition": "!config.win32 && !features.futimens && !features.futimes && tests.futimesat", "output": [ "privateFeature" ] }, + "getauxval": { + "label": "getauxval()", + "condition": "config.linux && tests.getauxval", + "output": [ "privateFeature" ] + }, "getentropy": { "label": "getentropy()", "condition": "config.unix && tests.getentropy", @@ -418,11 +423,6 @@ "condition": "tests.syslog", "output": [ "privateFeature" ] }, - "sys_auxv": { - "label": "sys/auxv.h", - "condition": "config.linux && tests.sys_auxv", - "output": [ "privateFeature" ] - }, "threadsafe-cloexec": { "label": "Threadsafe pipe creation", "condition": "tests.cloexec", diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h index 7dba4ae5da..398da739e1 100644 --- a/src/corelib/global/qconfig-bootstrapped.h +++ b/src/corelib/global/qconfig-bootstrapped.h @@ -76,6 +76,7 @@ # define QT_FEATURE_alloca_malloc_h -1 #endif #define QT_FEATURE_cxx11_random (QT_HAS_INCLUDE() ? 1 : -1) +#define QT_FEATURE_getauxval (QT_HAS_INCLUDE() ? 1 : -1) #define QT_FEATURE_getentropy -1 #define QT_FEATURE_iconv -1 #define QT_FEATURE_icu -1 @@ -98,7 +99,6 @@ #define QT_NO_GEOM_VARIANT #define QT_FEATURE_sharedmemory -1 #define QT_FEATURE_systemsemaphore -1 -#define QT_FEATURE_sys_auxv (QT_HAS_INCLUDE() ? 1 : -1) #ifdef QT_BUILD_QMAKE #define QT_FEATURE_commandlineparser -1 diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp index daa9f25122..6e368ac75b 100644 --- a/src/corelib/global/qrandom.cpp +++ b/src/corelib/global/qrandom.cpp @@ -57,7 +57,7 @@ # include "qhashfunctions.h" # endif -# if QT_CONFIG(sys_auxv) +# if QT_CONFIG(getauxval) # include # endif #endif // !QT_CONFIG(getentropy) @@ -291,7 +291,7 @@ static void fallback_fill(quint32 *ptr, qssize_t left) Q_DECL_NOTHROW if (quint32 v = seed.load()) *end++ = v; // 6 -#if QT_CONFIG(sys_auxv) +#if QT_CONFIG(getauxval) // works on Linux -- all modern libc have getauxval # ifdef AT_RANDOM // ELF's auxv AT_RANDOM has 16 random bytes -- cgit v1.2.3