From: Bruno Haible Date: Tue, 9 Sep 2025 10:42:37 +0000 (+0200) Subject: logl: Remove support for OSF/1. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=225ce397196024c1df0922ab18958f8da117e204;p=thirdparty%2Fgnulib.git logl: Remove support for OSF/1. * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Remove test regarding logl (-0.0L). * lib/logl.c (logl): Remove workaround for OSF/1. --- diff --git a/ChangeLog b/ChangeLog index e2b761a453..a0cb819fd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2025-09-09 Bruno Haible + logl: Remove support for OSF/1. + * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Remove test regarding logl (-0.0L). + * lib/logl.c (logl): Remove workaround for OSF/1. + logf: Remove support for OSF/1. * m4/logf.m4 (gl_FUNC_LOGF_WORKS): Remove macro. (gl_FUNC_LOGF): Don't invoke it. diff --git a/lib/logl.c b/lib/logl.c index 90ec485133..a8cb1e7b41 100644 --- a/lib/logl.c +++ b/lib/logl.c @@ -26,19 +26,6 @@ logl (long double x) return log (x); } -#elif 0 /* was: HAVE_LOGL */ - -long double -logl (long double x) -# undef logl -{ - /* Work around the OSF/1 5.1 bug. */ - if (x == 0.0L) - /* Return -Infinity. */ - return -1.0L / 0.0L; - return logl (x); -} - #else /* Code based on glibc/sysdeps/ieee754/ldbl-128/e_logl.c. */ diff --git a/m4/logl.m4 b/m4/logl.m4 index a6e92105e5..8143ca1bd4 100644 --- a/m4/logl.m4 +++ b/m4/logl.m4 @@ -1,5 +1,5 @@ # logl.m4 -# serial 18 +# serial 19 dnl Copyright (C) 2010-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, @@ -104,7 +104,6 @@ AC_DEFUN([gl_FUNC_LOGL], ]) dnl Test whether logl() works. -dnl On OSF/1 5.1, logl(-0.0L) is NaN. dnl On NetBSD 9.3, the result is accurate to only 16 digits. AC_DEFUN([gl_FUNC_LOGL_WORKS], [ @@ -161,13 +160,6 @@ int main (int argc, char *argv[]) { long double (* volatile my_logl) (long double) = argc ? logl : dummy; int result = 0; - /* This test fails on OSF/1 5.1. */ - { - gx = -0.0L; - gy = logl (gx); - if (!(gy + gy == gy)) - result |= 1; - } /* This test fails on musl 1.2.2/arm64, musl 1.2.2/s390x, NetBSD 9.3. */ { const long double TWO_LDBL_MANT_DIG = /* 2^LDBL_MANT_DIG */ @@ -179,7 +171,7 @@ int main (int argc, char *argv[]) long double x = 16.981137113807045L; long double err = (my_logl (x) + my_logl (1.0L / x)) * TWO_LDBL_MANT_DIG; if (!(err >= -100.0L && err <= 100.0L)) - result |= 2; + result |= 1; } return result;