changeset 8495:eff68e94da66

Don't use the system's frexp() if it does not work (example: NetBSD 3.0).
author Bruno Haible <bruno@clisp.org>
date Thu, 22 Mar 2007 11:59:06 +0000
parents b556de32ce5a
children 1f851f8ed15e
files ChangeLog m4/printf-frexp.m4 modules/printf-frexp
diffstat 3 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-22  Bruno Haible  <bruno@clisp.org>
+
+	* 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  <bruno@clisp.org>
 
 	* lib/frexp.c: Remove older implementation that uses divisions.
--- 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 @@
         [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],
--- a/modules/printf-frexp
+++ b/modules/printf-frexp
@@ -6,6 +6,7 @@
 lib/printf-frexp.h
 lib/printf-frexp.c
 m4/printf-frexp.m4
+m4/frexp.m4
 
 Depends-on: