Add more checks used by Qt

This commit is contained in:
Francois Kritzinger 2022-02-04 10:13:23 +02:00
parent a0aa26a578
commit 802db34adb
5 changed files with 65 additions and 1 deletions

View File

@ -0,0 +1,21 @@
// HAVE_RDRND : HAVE_AVX2
#undef HAVE_RDRND
/* GCC, Clang: -mrdrnd
*
* MSVC: No controlling compiler option nor indicating macro. The
* documentation murkily says it's always enabled on Intel and only
* Intel processors; see:
* https://docs.microsoft.com/en-us/cpp/intrinsics/x86-intrinsics-list
* https://docs.microsoft.com/en-us/cpp/intrinsics/x64-amd64-intrinsics-list)
*
* According to Qt, all processors that support AVX2 support RDRND so
* follow their lead by assuming it's available if AVX2 is.
*
* Note that RDRND intrinsics were added to Visual C++ 2015 according to
* Wikipedia.
*/
#if defined(__RDRND__) || (defined(_MSC_VER) && defined(HAVE_AVX2))
# define HAVE_RDRND 1
#endif

View File

@ -0,0 +1,15 @@
// HAVE_RDSEED
#undef HAVE_RDSEED
/* GCC, Clang: -mrdseed
*
* MSVC: No controlling compiler option nor indicating macro. The
* documentation murkily says it's always enabled on Intel and only
* Intel processors; see:
* https://docs.microsoft.com/en-us/cpp/intrinsics/x86-intrinsics-list
* https://docs.microsoft.com/en-us/cpp/intrinsics/x64-amd64-intrinsics-list)
*/
#ifdef __RDSEED__
# define HAVE_RDSEED 1
#endif

View File

@ -0,0 +1,9 @@
// HAVE_SIGNALING_NAN
#undef HAVE_SIGNALING_NAN
/* Whether implementation's double fulfills the requirements of IEC 559 which
* was released in 2008. See
* https://en.cppreference.com/w/cpp/types/numeric_limits/is_iec559.
*/
#define HAVE_SIGNALING_NAN 1

View File

@ -0,0 +1,19 @@
// HAVE_THREADSAFE_CLOEXEC
#undef HAVE_THREADSAFE_CLOEXEC
/* Define if file descriptor-creating functions taking a *_CLOEXEC flag are
* available. Setting the FD_CLOEXEC flag in a separate fcntl() call opens a
* window for another thread to fork/exec.
*
* The set of functions covered by this check are pipe2(), dup3(), accept4(),
* and a version of socket() which takes the SOCK_CLOEXEC flag.
*
* Since glibc 2.10, FreeBSD 10, OpenBSD 5.7, NetBSD 6.0.
*/
#if BUILD2_AUTOCONF_GLIBC_PREREQ(2, 10) || \
BUILD2_AUTOCONF_FREEBSD_PREREQ(10, 0) || \
BUILD2_AUTOCONF_OPENBSD_PREREQ(201507) || \
BUILD2_AUTOCONF_NETBSD_PREREQ(6, 0)
# define HAVE_THREADSAFE_CLOEXEC 1
#endif

View File

@ -5,7 +5,7 @@
/* GCC, Clang: -mxop
*
* MSVC: No controlling compiler option nor indicating macro. The
* documnetation is murkily says it's always enabled on AMD and only AMD
* documentation murkily says it's always enabled on AMD and only AMD
* processors; see:
* https://docs.microsoft.com/en-us/cpp/intrinsics/x86-intrinsics-list
* https://docs.microsoft.com/en-us/cpp/intrinsics/x64-amd64-intrinsics-list)