From 017e80f87849b6c11a330a1f001bcd8f1f334b11 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 6 Aug 2024 01:05:05 +0200 Subject: [PATCH] math: Fix HUGE_VAL and HUGE_VALL on AIX. * lib/math.in.h (HUGE_VAL, HUGE_VALL): Override on AIX. * doc/posix-headers/math.texi: Mention this AIX problem. --- ChangeLog | 6 ++++++ doc/posix-headers/math.texi | 2 +- lib/math.in.h | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23f13aed61..1dd9a54339 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-08-05 Bruno Haible + + math: Fix HUGE_VAL and HUGE_VALL on AIX. + * lib/math.in.h (HUGE_VAL, HUGE_VALL): Override on AIX. + * doc/posix-headers/math.texi: Mention this AIX problem. + 2024-08-05 Bruno Haible xstrtol, xstrtoll tests: Fix test failures. diff --git a/doc/posix-headers/math.texi b/doc/posix-headers/math.texi index 92b4d1b172..6f07b1e58c 100644 --- a/doc/posix-headers/math.texi +++ b/doc/posix-headers/math.texi @@ -45,7 +45,7 @@ Haiku 2022. @item @code{HUGE_VAL}, @code{HUGE_VALF}, @code{HUGE_VALL} are not compile time constants on some platforms: -FreeBSD 5.2. +FreeBSD 5.2, AIX 7.1. @item @code{INFINITY} and @code{NAN} are not compile time constants diff --git a/lib/math.in.h b/lib/math.in.h index 7730efb7f5..7b1302d883 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -223,7 +223,7 @@ _NaN () #endif /* HUGE_VAL is a 'double' Infinity. */ -#if !defined HUGE_VAL || (defined __FreeBSD__ && __FreeBSD__ < 6) +#if !defined HUGE_VAL || (defined __FreeBSD__ && __FreeBSD__ < 6) || defined _AIX # undef HUGE_VAL # if defined _MSC_VER /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ @@ -236,7 +236,7 @@ _NaN () #endif /* HUGE_VALL is a 'long double' Infinity. */ -#if !defined HUGE_VALL || (defined __FreeBSD__ && __FreeBSD__ < 6) +#if !defined HUGE_VALL || (defined __FreeBSD__ && __FreeBSD__ < 6) || defined _AIX # undef HUGE_VALL # if defined _MSC_VER /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ -- 2.39.5