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

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

lib/float.in.h

index 7988cc790d09b8a32f16197f3026011c1e4400a3..6b57ce6adc1eebdcc2fcf01728951ccf2bba2367 100644 (file)
@@ -149,11 +149,14 @@ extern const union gl_long_double_union gl_LDBL_MAX;
 
    Unfortunately, this is not a constant expression, and the latter expression
    does not work well when GCC is optimizing..  */
+# if !GNULIB_defined_long_double_union
 union gl_long_double_union
   {
     struct { double hi; double lo; } dd;
     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)
 #endif