From 9c1a9336a46858cdfe205a9335d7241fdf1fa4c0 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 22 Mar 2007 11:59:06 +0000 Subject: [PATCH] Don't use the system's frexp() if it does not work (example: NetBSD 3.0). --- ChangeLog | 6 ++++++ m4/printf-frexp.m4 | 11 ++++++++--- modules/printf-frexp | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b280df2c3..d71b878f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-03-22 Bruno Haible + * modules/printf-frexp (Files): Add m4/frexp.m4. + * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC + only if the found frexp function actually works. + +2007-03-22 Bruno Haible + * lib/frexp.c: Remove older implementation that uses divisions. 2007-03-21 Bruno Haible diff --git a/m4/printf-frexp.m4 b/m4/printf-frexp.m4 index 9cb68c318..d94e1ad10 100644 --- a/m4/printf-frexp.m4 +++ b/m4/printf-frexp.m4 @@ -1,4 +1,4 @@ -# printf-frexp.m4 serial 1 +# printf-frexp.m4 serial 2 dnl Copyright (C) 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -19,8 +19,13 @@ AC_DEFUN([gl_FUNC_PRINTF_FREXP], [gl_cv_func_frexp_no_libm=no]) ]) if test $gl_cv_func_frexp_no_libm = yes; then - AC_DEFINE([HAVE_FREXP_IN_LIBC], 1, - [Define if the frexp function is available in libc.]) + gl_FUNC_FREXP_WORKS + case "$gl_cv_func_frexp_works" in + *yes) + AC_DEFINE([HAVE_FREXP_IN_LIBC], 1, + [Define if the frexp function is available in libc.]) + ;; + esac fi AC_CACHE_CHECK([whether ldexp can be used without linking with libm], diff --git a/modules/printf-frexp b/modules/printf-frexp index 423a90639..b4dc4f673 100644 --- a/modules/printf-frexp +++ b/modules/printf-frexp @@ -6,6 +6,7 @@ Files: lib/printf-frexp.h lib/printf-frexp.c m4/printf-frexp.m4 +m4/frexp.m4 Depends-on: -- 2.11.0