This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] math: skip test-fenv-preserve.c if no FE_INVALID.


2014-04-04  Chris Metcalf  <cmetcalf@tilera.com>

	* math/test-fenv-preserve.c [!defined FE_INVALID] (do_test):
	Don't try to compile if the platform doesn't have FE_INVALID.

This is required for the tile architecture.

diff --git a/math/test-fenv-preserve.c b/math/test-fenv-preserve.c
index 8288b2c..bb34bc2 100644
--- a/math/test-fenv-preserve.c
+++ b/math/test-fenv-preserve.c
@@ -22,6 +22,7 @@
 static int
 do_test (void)
 {
+#ifdef FE_INVALID
   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 ("FE_INVALID not defined, cannot test");
+  return 0;
+#endif
 }
 
 #define TEST_FUNCTION do_test ()
-- 
1.7.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]