Don't use the system's frexp() if it does not work (example: NetBSD 3.0).
authorBruno Haible <bruno@clisp.org>
Thu, 22 Mar 2007 11:59:06 +0000 (11:59 +0000)
committerBruno Haible <bruno@clisp.org>
Thu, 22 Mar 2007 11:59:06 +0000 (11:59 +0000)
ChangeLog
m4/printf-frexp.m4
modules/printf-frexp

index b280df2c30b67e814521fe4eb33cf1067c2f6c4d..d71b878f5377953b67ed379da9530e589fc84755 100644 (file)
--- 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.
index 9cb68c318657239b1334d6b041b91065413b310f..d94e1ad10378dd9b62b8a8c700a32e5b2b5d2609 100644 (file)
@@ -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],
index 423a906399166f971af90f037bc918944344da66..b4dc4f673029fc187777a1bc1fa24e172de6e0a7 100644 (file)
@@ -6,6 +6,7 @@ Files:
 lib/printf-frexp.h
 lib/printf-frexp.c
 m4/printf-frexp.m4
+m4/frexp.m4
 
 Depends-on: