]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - math/test-fenv-preserve.c
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / math / test-fenv-preserve.c
index 8288b2c971598fe22b4aa580212e2f31b770caa3..1be1a0c291a8806c02a262eb257f18a5f3b8bf84 100644 (file)
@@ -1,5 +1,5 @@
 /* Test fegetenv preserves exception mask (bug 16198).
-   Copyright (C) 2014 Free Software Foundation, Inc.
+   Copyright (C) 2014-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -14,7 +14,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include <fenv.h>
 #include <stdio.h>
@@ -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 ()