From: Bruno Haible Date: Sun, 20 Dec 2020 13:50:18 +0000 (+0100) Subject: float: Fix compilation error when gnulib's float.h exists twice, part 2. X-Git-Tag: v1.0~3345 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=f47acf246c172f5f21f1437fb3c9e619cc33d929;p=gnulib.git float: Fix compilation error when gnulib's float.h exists twice, part 2. Reported by Santiago Vila . * lib/float.in.h (GNULIB_defined_long_double_union): New macro. --- diff --git a/lib/float.in.h b/lib/float.in.h index 7988cc790d..6b57ce6adc 100644 --- a/lib/float.in.h +++ b/lib/float.in.h @@ -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