* m4/roundf.m4 (gl_FUNC_ROUNDF): Test also the sign of roundf (-0.3f).
* modules/roundf-ieee (Depends-on): Add floorf-ieee, ceilf-ieee.
* doc/posix-functions/roundf.texi: Mention problem with negative
arguments.
* doc/posix-functions/ceilf.texi: Mention problem on OSF/1 5.1.
+2011-06-19 Bruno Haible <bruno@clisp.org>
+
+ roundf-ieee: Fix test failures on AIX 7.1 and OSF/1 5.1.
+ * m4/roundf.m4 (gl_FUNC_ROUNDF): Test also the sign of roundf (-0.3f).
+ * modules/roundf-ieee (Depends-on): Add floorf-ieee, ceilf-ieee.
+ * doc/posix-functions/roundf.texi: Mention problem with negative
+ arguments.
+ * doc/posix-functions/ceilf.texi: Mention problem on OSF/1 5.1.
+
2011-06-19 Bruno Haible <bruno@clisp.org>
ceilf-ieee: Work around bug on MacOS X 10.5.
@item
This function returns a positive zero for an argument between -1 and 0
on some platforms:
-MacOS X 10.5, AIX 7.1.
+MacOS X 10.5, AIX 7.1, OSF/1 5.1.
@item
This function returns a positive zero for a minus zero argument
on some platforms:
Portability problems fixed by Gnulib module @code{roundf-ieee}:
@itemize
@item
+This function returns a positive zero for an argument between -0.5 and 0
+on some platforms:
+AIX 7.1, OSF/1 5.1.
+@item
This function returns a positive zero for a minus zero argument
on some platforms:
OSF/1 5.1.
-# roundf.m4 serial 12
+# roundf.m4 serial 13
dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
int main (int argc, char *argv[])
{
float (*my_roundf) (float) = argc ? roundf : dummy;
+ int result = 0;
/* Test whether roundf (-0.0f) is -0.0f. */
if (signbitf (minus_zerof) && !signbitf (my_roundf (minus_zerof)))
- return 1;
- return 0;
+ result |= 1;
+ /* Test whether roundf (-0.3f) is -0.0f. */
+ if (signbitf (-0.3f) && !signbitf (my_roundf (-0.3f)))
+ result |= 2;
+ return result;
}
]])],
[gl_cv_func_roundf_ieee=yes],
Depends-on:
roundf
+floorf-ieee [test $HAVE_DECL_ROUNDF = 0 || test $REPLACE_ROUNDF = 1]
+ceilf-ieee [test $HAVE_DECL_ROUNDF = 0 || test $REPLACE_ROUNDF = 1]
configure.ac:
gl_FUNC_ROUNDF_IEEE