diff mbox

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

Message ID 201404042100.s34L0Z0f017956@gx-1.internal.tilera.com
State Committed
Headers show

Commit Message

Chris Metcalf April 4, 2014, 8:53 p.m. UTC
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.

Comments

Ondrej Bilka May 23, 2014, 1:40 p.m. UTC | #1
On Fri, Apr 04, 2014 at 04:53:06PM -0400, Chris Metcalf wrote:
> 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.
> 
looks ok for me.
diff mbox

Patch

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 ()