]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
math: make test-fenv-preserve.c a no-op if FE_ALL_EXCEPT == 0.
authorChris Metcalf <cmetcalf@tilera.com>
Fri, 11 Apr 2014 19:13:42 +0000 (15:13 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Fri, 11 Apr 2014 19:13:42 +0000 (15:13 -0400)
This fixes a testsuite failure for tile (and possibly microblaze).

ChangeLog
math/test-fenv-preserve.c

index 79d3dbf2a4844fc5c446859a91926bbb52dcde74..f9df74509b69ba0120793ee7edd577e78f2fe816 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-11  Chris Metcalf  <cmetcalf@tilera.com>
+
+       * math/test-fenv-preserve.c [FE_ALL_EXCEPT == 0] (do_test):
+       Make the test a no-op if there are no exceptions defined.
+
 2014-04-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
 
        * elf/Makefile (tests): make tst-dlopen-atout conditional on
index 8288b2c971598fe22b4aa580212e2f31b770caa3..89f2e2bd81e369e837d49df52e19d8a37221858e 100644 (file)
@@ -22,6 +22,7 @@
 static int
 do_test (void)
 {
+#if FE_ALL_EXCEPT
   fenv_t env;
 
   if (feenableexcept (FE_INVALID) != 0)
@@ -47,6 +48,10 @@ do_test (void)
       printf ("fegetexcept returned %d, expected %d\n", ret, FE_INVALID);
       return 1;
     }
+#else
+  puts ("No exceptions defined, cannot test");
+  return 0;
+#endif
 }
 
 #define TEST_FUNCTION do_test ()