init.sh: work around trap limitation of some shells
[pspp] / tests / test-truncf2.c
index 2d78808f9199374e550792191fb8135b0439262f..f19ed837d4123773c2e775969713de079a156bb6 100644 (file)
@@ -16,6 +16,9 @@
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
 
+/* When this test fails on some platform, build it together with the gnulib
+   module 'fprintf-posix' for optimal debugging output.  */
+
 #include <config.h>
 
 #include <math.h>
@@ -123,8 +126,10 @@ check (float x)
       return 0;
     else
       {
+#if GNULIB_TEST_FPRINTF_POSIX
         fprintf (stderr, "truncf %g(%a) = %g(%a) or %g(%a)?\n",
                  x, x, reference, reference, result, result);
+#endif
         return 1;
       }
   }