]> Savannah Git Hosting - gnulib.git/commitdiff
float: Fix compilation error when gnulib's float.h exists twice.
authorBruno Haible <bruno@clisp.org>
Sun, 20 Dec 2020 13:41:29 +0000 (14:41 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 20 Dec 2020 13:42:32 +0000 (14:42 +0100)
Reported by Santiago Vila <sanvila@unex.es>.

* lib/float.in.h (GNULIB_defined_long_double_union): New macro.

ChangeLog
lib/float.in.h

index 0d8c2ee6d7be6e77451e419d69869029a740cac6..c9f4f8abed59d0b6ff23d0573db5d5f7c02f255d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-12-20  Bruno Haible  <bruno@clisp.org>
+
+       float: Fix compilation error when gnulib's float.h exists twice.
+       Reported by Santiago Vila <sanvila@unex.es>.
+       * lib/float.in.h (GNULIB_defined_long_double_union): New macro.
+
 2020-12-19  Bruno Haible  <bruno@clisp.org>
 
        free-posix: Assume future POSIX compliance only on OpenBSD and Solaris.
index 8e4d47dc0764e8cd2c49d7ba9206e3b990026fa8..7988cc790d09b8a32f16197f3026011c1e4400a3 100644 (file)
      extern const long double LDBL_MAX;
 
    Unfortunately, this is not a constant expression.  */
+# if !GNULIB_defined_long_double_union
 union gl_long_double_union
   {
     struct { unsigned int lo; unsigned int hi; unsigned int exponent; } xd;
     long double ld;
   };
+#  define GNULIB_defined_long_double_union 1
+# endif
 extern const union gl_long_double_union gl_LDBL_MAX;
 # define LDBL_MAX (gl_LDBL_MAX.ld)
 /* Minimum e such that 10^e is in the range of normalized numbers.  */