diff options
author | Bruno Haible <bruno@clisp.org> | 2011-09-30 03:56:26 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-09-30 03:56:26 +0200 |
commit | c65d65a81e9d66960ae7ce5abe5069d5b7338ed2 (patch) | |
tree | 176dc420fadbad661f5bef33603249c0949dd302 /lib/float.in.h | |
parent | 78b95d5ee8dc73120b0b69e1968d68c3d644db50 (diff) | |
download | gnulib-c65d65a81e9d66960ae7ce5abe5069d5b7338ed2.tar.gz |
float: Fix LDBL_MAX value on Linux/PowerPC.
* m4/float_h.m4 (gl_FLOAT_H): Set FLOAT_H and REPLACE_FLOAT_LDBL also
on Linux/PowerPC.
* lib/float.in.h (LDBL_MAX): Redefine also on Linux/PowerPC.
* lib/float.c (gl_LDBL_MAX): Also define on Linux/PowerPC.
* doc/posix-headers/float.texi: Mention Linux/PowerPC as an affected
platform.
Reported by Andreas Metzler <ametzler@downhill.at.eu.org>.
Diffstat (limited to 'lib/float.in.h')
-rw-r--r-- | lib/float.in.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/float.in.h b/lib/float.in.h index 57b7bc93a2..b132035d83 100644 --- a/lib/float.in.h +++ b/lib/float.in.h @@ -109,7 +109,8 @@ extern const union gl_long_double_union gl_LDBL_MAX; #endif /* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are - wrong. */ + wrong. + On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */ #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP @@ -117,6 +118,8 @@ extern const union gl_long_double_union gl_LDBL_MAX; # define LDBL_MIN_10_EXP DBL_MIN_10_EXP # undef LDBL_MIN # define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ +#endif +#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ # undef LDBL_MAX /* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }. It is not easy to define: |