2025-09-09 Bruno Haible <bruno@clisp.org>
+ log10: Remove support for OSF/1.
+ * m4/log10.m4 (gl_FUNC_LOG10_WORKS): Remove macro.
+ (gl_FUNC_LOG10): Don't invoke it.
+ * lib/log10.c (log10): Assume that log10 (±0.0) is correct.
+
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.
# log10.m4
-# serial 14
+# serial 15
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,
dnl Determine LOG10_LIBM.
gl_COMMON_DOUBLE_MATHFUNC([log10])
- saved_LIBS="$LIBS"
- LIBS="$LIBS $LOG10_LIBM"
- gl_FUNC_LOG10_WORKS
- LIBS="$saved_LIBS"
- case "$gl_cv_func_log10_works" in
- *yes) ;;
- *) REPLACE_LOG10=1 ;;
- esac
-
m4_ifdef([gl_FUNC_LOG10_IEEE], [
- if test $gl_log10_required = ieee && test $REPLACE_LOG10 = 0; then
+ if test $gl_log10_required = ieee; then
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether log10 works according to ISO C 99 with IEC 60559],
[gl_cv_func_log10_ieee],
fi
])
])
-
-dnl Test whether log10() works.
-dnl On OSF/1 5.1, log10(-0.0) is NaN.
-AC_DEFUN([gl_FUNC_LOG10_WORKS],
-[
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CACHE_CHECK([whether log10 works], [gl_cv_func_log10_works],
- [
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <math.h>
-volatile double x;
-double y;
-int main ()
-{
- x = -0.0;
- y = log10 (x);
- if (!(y + y == y))
- return 1;
- return 0;
-}
-]])],
- [gl_cv_func_log10_works=yes],
- [gl_cv_func_log10_works=no],
- [case "$host_os" in
- osf*) gl_cv_func_log10_works="guessing no" ;;
- # Guess yes on native Windows.
- mingw* | windows*) gl_cv_func_log10_works="guessing yes" ;;
- *) gl_cv_func_log10_works="guessing yes" ;;
- esac
- ])
- ])
-])