Merge remote-tracking branch 'origin/stable-2.0'
[bpt/guile.git] / test-suite / standalone / test-round.c
index 862e7d0..150c881 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
 #include <stdio.h>
 
 #if HAVE_FENV_H
-#include <fenv.h>
+# if defined __GNUC__ && defined __GLIBC__
+/* In Glibc 2.17, <bits/fenv.h> defines `feraiseexcept' as an inline
+   without declaring it first, so ignore the warning.  */
+#   pragma GCC diagnostic push
+#   pragma GCC diagnostic ignored "-Wmissing-prototypes"
+# endif
+# include <fenv.h>
+# if defined __GNUC__ && defined __GLIBC__
+#   pragma GCC diagnostic pop
+# endif
 #elif defined HAVE_MACHINE_FPU_H
 /* On Tru64 5.1b, the declaration of fesetround(3) is in <machine/fpu.h>.
    On NetBSD, this header has to be included along with <sys/types.h>.  */
@@ -71,7 +80,7 @@ test_scm_c_round ()
          table.  */
       if (i != 0)
         {
-#if HAVE_FESETROUND
+#ifdef HAVE_FESETROUND
           fesetround (modes[i]);
 #endif
         }