From: Bruno Haible Date: Wed, 10 Sep 2025 21:01:20 +0000 (+0200) Subject: log10l: Remove support for IRIX. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3661cbe3a119583b514cc6d97cdb5d45be2861ab;p=thirdparty%2Fgnulib.git log10l: Remove support for IRIX. * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Remove IRIX workaround. * lib/log10l.c (log10l): Remove code for IRIX. --- diff --git a/ChangeLog b/ChangeLog index 40c33997cf..71a860ea8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2025-09-10 Bruno Haible + log10l: Remove support for IRIX. + * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Remove IRIX workaround. + * lib/log10l.c (log10l): Remove code for IRIX. + logl: Remove support for IRIX. * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Remove IRIX workaround. diff --git a/lib/log10l.c b/lib/log10l.c index a607db8920..139aac0df8 100644 --- a/lib/log10l.c +++ b/lib/log10l.c @@ -35,19 +35,11 @@ long double log10l (long double x) # undef log10l { - /* Work around the AIX, IRIX bug. */ + /* Work around the AIX bug. */ if (x == 0.0L) /* Return -Infinity. */ return -1.0L / 0.0L; - { - long double y = log10l (x); -# ifdef __sgi - /* Normalize the +Infinity value. */ - if (y > LDBL_MAX) - y = 1.0L / 0.0L; -# endif - return y; - } + return log10l (x); } #else diff --git a/m4/log10l.m4 b/m4/log10l.m4 index 8242d984e5..21e0038707 100644 --- a/m4/log10l.m4 +++ b/m4/log10l.m4 @@ -1,5 +1,5 @@ # log10l.m4 -# serial 16 +# serial 17 dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -56,9 +56,6 @@ AC_DEFUN([gl_FUNC_LOG10L], ]) dnl Test whether log10l() works. -dnl On IRIX 6.5, log10l(-0.0L) is an unnormalized negative infinity -dnl 0xFFF00000000000007FF0000000000000, should be -dnl 0xFFF00000000000000000000000000000. dnl On AIX 5.1, log10l(-0.0L) is finite if it's not the first log10l call dnl in the program. dnl On NetBSD 9.3, the result is accurate to only 16 digits. @@ -96,14 +93,6 @@ AC_DEFUN([gl_FUNC_LOG10L_WORKS], # undef LDBL_MIN_EXP # define LDBL_MIN_EXP DBL_MIN_EXP #endif -#if defined __sgi && (LDBL_MANT_DIG >= 106) -# undef LDBL_MANT_DIG -# define LDBL_MANT_DIG 106 -# if defined __GNUC__ -# undef LDBL_MIN_EXP -# define LDBL_MIN_EXP DBL_MIN_EXP -# endif -#endif #undef log10l /* for AIX */ extern #ifdef __cplusplus @@ -126,7 +115,7 @@ int main (int argc, char *argv[]) /* Dummy call, to trigger the AIX 5.1 bug. */ gx = 0.6L; gy = log10l (gx); - /* This test fails on AIX 5.1, IRIX 6.5. */ + /* This test fails on AIX 5.1. */ { gx = -0.0L; gy = log10l (gx);