diff --git a/config.tests/unix/sys_auxv/sys_auxv.cpp b/config.tests/unix/getauxval/getauxval.cpp similarity index 100% rename from config.tests/unix/sys_auxv/sys_auxv.cpp rename to config.tests/unix/getauxval/getauxval.cpp 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.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