diff options
author | Bruno Haible <bruno@clisp.org> | 2011-06-19 15:05:39 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-06-19 15:05:39 +0200 |
commit | 42477674eaabe9da1eb5d5d8fc2cca5e2de319a0 (patch) | |
tree | 81107aa64228306329e940252b09a5eb4be85001 /m4/roundl.m4 | |
parent | a111084192c1d6768cddd62614fa8234d41db34d (diff) | |
download | gnulib-42477674eaabe9da1eb5d5d8fc2cca5e2de319a0.tar.gz |
roundl-ieee: Fix test failure on AIX 7.1.
* m4/roundl.m4 (gl_FUNC_ROUNDL): Test also the sign of roundl (-0.3L).
* doc/posix-functions/roundl.texi: Mention problem with negative
arguments.
Diffstat (limited to 'm4/roundl.m4')
-rw-r--r-- | m4/roundl.m4 | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/m4/roundl.m4 b/m4/roundl.m4 index 4f47e3389e..9d0d381c72 100644 --- a/m4/roundl.m4 +++ b/m4/roundl.m4 @@ -1,4 +1,4 @@ -# roundl.m4 serial 10 +# roundl.m4 serial 11 dnl Copyright (C) 2007, 2009-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, @@ -35,10 +35,14 @@ static long double dummy (long double f) { return 0; } int main (int argc, char *argv[]) { long double (*my_roundl) (long double) = argc ? roundl : dummy; + int result = 0; /* Test whether roundl (-0.0L) is -0.0L. */ if (signbitl (minus_zerol) && !signbitl (my_roundl (minus_zerol))) - return 1; - return 0; + result |= 1; + /* Test whether roundl (-0.3L) is -0.0L. */ + if (signbitl (-0.3L) && !signbitl (my_roundl (-0.3L))) + result |= 2; + return result; } ]])], [gl_cv_func_roundl_ieee=yes], |