From f47acf246c172f5f21f1437fb3c9e619cc33d929 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 20 Dec 2020 14:50:18 +0100 Subject: [PATCH] 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. --- lib/float.in.h | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.39.5