From 01c795bcd13e31044e3a3f4f61b218d8ad02845e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 15 Nov 2011 21:43:52 +0100 Subject: uclibc: fenv.h does not define the necessary things. libstdc++ provides the fenv.h found and for uclibc default toolchains the bits/c++config.h has _GLIBCXX_HAVE_FENV_H undefined leading to no import of the uclibc fenv.h Change-Id: I53173b099f3d8791f527f1ccb60991de57cd19db Filed: https://bugs.busybox.net/show_bug.cgi?id=4484 Reviewed-by: Harald Fernengel --- tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/auto/corelib/tools') diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 9a41db153a..a5a247f15a 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -50,7 +50,11 @@ #include #include -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) && !defined(__UCLIBC__) +# define QT_USE_FENV +#endif + +#ifdef QT_USE_FENV # include #endif @@ -729,7 +733,7 @@ void tst_QLocale::fpExceptions() _control87( 0 | _EM_INEXACT, _MCW_EM ); #endif -#ifdef Q_OS_LINUX +#ifdef QT_USE_FENV fenv_t envp; fegetenv(&envp); feclearexcept(FE_ALL_EXCEPT); @@ -747,7 +751,7 @@ void tst_QLocale::fpExceptions() _control87(oldbits, 0xFFFFF); #endif -#ifdef Q_OS_LINUX +#ifdef QT_USE_FENV fesetenv(&envp); #endif } -- cgit v1.2.3