Commit fed956a877ca706961ad6536dfd4ad69b17d4467

Bruno Haible 2023-08-20T02:43:01

ldexp: Work around OpenBSD/mips64 bug. * lib/math.in.h (ldexp): New declaration. * lib/ldexp.c: New file, based on lib/ldexpl.c. * lib/ldexpl.c: Moved the implementation to lib/ldexp.c. Just include it. * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_LDEXP. (gl_MATH_H_DEFAULTS): Initialize REPLACE_LDEXP. * m4/ldexp.m4 (gl_FUNC_LDEXP): Require gl_MATH_H_DEFAULTS and gl_FUNC_ISNAND. Invoke gl_FUNC_LDEXP_WORKS. Set REPLACE_LDEXP. Consider it when setting LDEXP_LIBM. (gl_FUNC_LDEXP_WORKS): New macro. * modules/math (Makefile.am): Substitute GNULIB_LDEXP, REPLACE_LDEXP. * modules/ldexp (Files): Add lib/ldexp.c. (Depends-on): Add math, isnand. (configure.ac): Set GL_COND_OBJ_LDEXP. Invoke gl_MATH_MODULE_INDICATOR. (Makefile.am): Conditionally compile ldexp.c. * modules/ldexpl (Files): Add lib/ldexp.c. * doc/posix-functions/ldexp.texi: Mention the OpenBSD bug.