+2024-08-07 Bruno Haible <bruno@clisp.org>
+
+ math: Fix INFINITY and NAN on mingw.
+ * doc/posix-headers/math.texi: Mention this mingw bug.
+ * lib/math.in.h (INFINITY, NAN): Replace also on mingw.
+
2024-08-07 Bruno Haible <bruno@clisp.org>
doc: Update for OpenBSD 7.5.
@item
@code{INFINITY} and @code{NAN} are of type @code{double} instead of @code{float}
on some platforms:
-FreeBSD 7.1.
+FreeBSD 7.1, mingw 5.0.
@item
The macros @code{NAN}, @code{HUGE_VALL}, and @code{INFINITY} are not
/* Ensure that INFINITY is a constant expression, of type 'float'. */
-#if !defined INFINITY || (defined __FreeBSD__ && __FreeBSD__ < 8) || defined _AIX
+#if !defined INFINITY || (defined __FreeBSD__ && __FreeBSD__ < 8) || defined _AIX || defined __MINGW32__
# undef INFINITY
# if defined __GNUC__ || defined __clang__
# define INFINITY (__builtin_inff ())
it on platforms like Solaris 10, where NAN is present but defined
as a function pointer rather than a floating point constant.
Also ensure that it is a constant expression, of type 'float'. */
-#if !defined NAN || @REPLACE_NAN@ || (defined __FreeBSD__ && __FreeBSD__ < 8) || defined _AIX
+#if !defined NAN || @REPLACE_NAN@ || (defined __FreeBSD__ && __FreeBSD__ < 8) || defined _AIX || defined __MINGW32__
# if !GNULIB_defined_NAN
# undef NAN
/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler