* lib/printf-frexpl.c: Include <config.h>.
(printf_frexpl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
* lib/printf-frexp.c [!USE_LONG_DOUBLE]: Don't include <config.h> a
second time.
* m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Require
gl_LONG_DOUBLE_VS_DOUBLE.
* modules/printf-frexpl (Depends-on): Add printf-frexp. Update
conditions.
+2011-10-10 Bruno Haible <bruno@clisp.org>
+
+ printf-frexpl: Simplify for platforms where 'long double' == 'double'.
+ * lib/printf-frexpl.c: Include <config.h>.
+ (printf_frexpl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
+ * lib/printf-frexp.c [!USE_LONG_DOUBLE]: Don't include <config.h> a
+ second time.
+ * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Require
+ gl_LONG_DOUBLE_VS_DOUBLE.
+ * modules/printf-frexpl (Depends-on): Add printf-frexp. Update
+ conditions.
+
2011-10-10 Bruno Haible <bruno@clisp.org>
frexpl: Simplify for platforms where 'long double' == 'double'.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <config.h>
+#if ! defined USE_LONG_DOUBLE
+# include <config.h>
+#endif
/* Specification. */
#ifdef USE_LONG_DOUBLE
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#define USE_LONG_DOUBLE
-#include "printf-frexp.c"
+#include <config.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+/* Specification. */
+# include "printf-frexpl.h"
+
+# include "printf-frexp.h"
+
+long double
+printf_frexpl (long double x, int *expptr)
+{
+ return printf_frexp (x, expptr);
+}
+
+#else
+
+# define USE_LONG_DOUBLE
+# include "printf-frexp.c"
+
+#endif
-# printf-frexpl.m4 serial 8
+# printf-frexpl.m4 serial 9
dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_DEFUN([gl_FUNC_PRINTF_FREXPL],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+
dnl Subset of gl_FUNC_FREXPL_NO_LIBM.
gl_CHECK_FREXPL_NO_LIBM
if test $gl_cv_func_frexpl_no_libm = yes; then
m4/ldexpl.m4
Depends-on:
-float
-math
-fpucw
+printf-frexp [test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1]
+float [test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+math [test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
+fpucw [test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 0]
configure.ac:
gl_FUNC_PRINTF_FREXPL