Mercurial > hg > octave-lyh > gnulib-hg
changeset 10417:16acbb4dea09
signbit: work around bug of HP-UX 10.20 cc with -0.0 literal
* m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Rewrite test to avoid
literal -0.0.
Reported by Jonathan C. Patschke <jp@centtech.com>.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Fri, 12 Sep 2008 06:30:32 -0600 |
parents | 9a7816903705 |
children | 1e251b3d489c |
files | ChangeLog m4/signbit.m4 |
diffstat | 2 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-12 Eric Blake <ebb9@byu.net> + + signbit: work around bug of HP-UX 10.20 cc with -0.0 literal + * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Rewrite test to avoid + literal -0.0. + Reported by Jonathan C. Patschke <jp@centtech.com>. + 2008-09-11 Yoann Vandoorselaere <yoann.v@prelude-ids.com> * lib/glthread/cond.h: Use dummy implementation also if
--- a/m4/signbit.m4 +++ b/m4/signbit.m4 @@ -124,12 +124,14 @@ ]) AC_DEFUN([gl_SIGNBIT_TEST_PROGRAM], [ +/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. + So we use -p0f instead. */ float p0f = 0.0f; -float m0f = -0.0f; +float m0f = -p0f; double p0d = 0.0; -double m0d = -0.0; +double m0d = -p0d; long double p0l = 0.0L; -long double m0l = -0.0L; +long double m0l = -p0l; int main () { {