Mercurial > hg > octave-lyh > gnulib-hg
changeset 15905:53e09ee0d19a
*printf: Fix for platforms where 'long double' == 'double'.
* m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
gl_LONG_DOUBLE_VS_DOUBLE. Don't blindly assume 80-bit 'long double'.
* modules/dprintf-posix (Files): Add m4/math_h.m4.
* modules/fprintf-posix (Files): Likewise.
* modules/obstack-printf-posix (Files): Likewise.
* modules/snprintf-posix (Files): Likewise.
* modules/sprintf-posix (Files): Likewise.
* modules/vasnprintf (Files): Likewise.
* modules/vasnprintf-posix (Files): Likewise.
* modules/vasprintf-posix (Files): Likewise.
* modules/vdprintf-posix (Files): Likewise.
* modules/vfprintf-posix (Files): Likewise.
* modules/vsnprintf-posix (Files): Likewise.
* modules/vsprintf-posix (Files): Likewise.
* modules/unistdio/u8-vasnprintf (Files): Likewise.
* modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
* modules/unistdio/u16-vasnprintf (Files): Likewise.
* modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
* modules/unistdio/u32-vasnprintf (Files): Likewise.
* modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
* modules/unistdio/ulc-vasnprintf (Files): Likewise.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 09 Oct 2011 13:06:52 +0200 |
parents | add96b15feb5 |
children | 400649d35651 |
files | ChangeLog m4/printf.m4 modules/dprintf-posix modules/fprintf-posix modules/obstack-printf-posix modules/snprintf-posix modules/sprintf-posix modules/unistdio/u16-u16-vasnprintf modules/unistdio/u16-vasnprintf modules/unistdio/u32-u32-vasnprintf modules/unistdio/u32-vasnprintf modules/unistdio/u8-u8-vasnprintf modules/unistdio/u8-vasnprintf modules/unistdio/ulc-vasnprintf modules/vasnprintf modules/vasnprintf-posix modules/vasprintf-posix modules/vdprintf-posix modules/vfprintf-posix modules/vsnprintf-posix modules/vsprintf-posix |
diffstat | 21 files changed, 45 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,28 @@ 2011-10-09 Bruno Haible <bruno@clisp.org> + *printf: Fix for platforms where 'long double' == 'double'. + * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require + gl_LONG_DOUBLE_VS_DOUBLE. Don't blindly assume 80-bit 'long double'. + * modules/dprintf-posix (Files): Add m4/math_h.m4. + * modules/fprintf-posix (Files): Likewise. + * modules/obstack-printf-posix (Files): Likewise. + * modules/snprintf-posix (Files): Likewise. + * modules/sprintf-posix (Files): Likewise. + * modules/vasnprintf (Files): Likewise. + * modules/vasnprintf-posix (Files): Likewise. + * modules/vasprintf-posix (Files): Likewise. + * modules/vdprintf-posix (Files): Likewise. + * modules/vfprintf-posix (Files): Likewise. + * modules/vsnprintf-posix (Files): Likewise. + * modules/vsprintf-posix (Files): Likewise. + * modules/unistdio/u8-vasnprintf (Files): Likewise. + * modules/unistdio/u8-u8-vasnprintf (Files): Likewise. + * modules/unistdio/u16-vasnprintf (Files): Likewise. + * modules/unistdio/u16-u16-vasnprintf (Files): Likewise. + * modules/unistdio/u32-vasnprintf (Files): Likewise. + * modules/unistdio/u32-u32-vasnprintf (Files): Likewise. + * modules/unistdio/ulc-vasnprintf (Files): Likewise. + isnanl[-nolibm]: Fix for platforms where 'long double' == 'double'. * lib/isnan.c (rpl_isnanl): Don't blindly assume 80-bit 'long double'. * m4/isnanl.m4 (gl_PREREQ_ISNANL): Require gl_LONG_DOUBLE_VS_DOUBLE.
--- a/m4/printf.m4 +++ b/m4/printf.m4 @@ -1,4 +1,4 @@ -# printf.m4 serial 45 +# printf.m4 serial 46 dnl Copyright (C) 2003, 2007-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, @@ -251,6 +251,7 @@ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([gl_BIGENDIAN]) + AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl The user can set or unset the variable gl_printf_safe to indicate dnl that he wishes a safe handling of non-IEEE-754 'long double' values. @@ -321,7 +322,7 @@ if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 || !strisnan (buf, 0, strlen (buf))) result |= 1; -#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) +#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Representation of an 80-bit 'long double' as an initializer for a sequence of 'unsigned int' words. */ # ifdef WORDS_BIGENDIAN
--- a/modules/dprintf-posix +++ b/modules/dprintf-posix @@ -11,6 +11,7 @@ Files: m4/dprintf-posix.m4 m4/printf.m4 +m4/math_h.m4 Depends-on: dprintf
--- a/modules/fprintf-posix +++ b/modules/fprintf-posix @@ -11,6 +11,7 @@ lib/fprintf.c m4/fprintf-posix.m4 m4/printf.m4 +m4/math_h.m4 Depends-on: stdio
--- a/modules/obstack-printf-posix +++ b/modules/obstack-printf-posix @@ -10,6 +10,7 @@ Files: m4/obstack-printf.m4 m4/obstack-printf-posix.m4 +m4/math_h.m4 lib/obstack_printf.c Depends-on:
--- a/modules/snprintf-posix +++ b/modules/snprintf-posix @@ -11,6 +11,7 @@ Files: m4/snprintf-posix.m4 m4/printf.m4 +m4/math_h.m4 Depends-on: snprintf
--- a/modules/sprintf-posix +++ b/modules/sprintf-posix @@ -11,6 +11,7 @@ lib/sprintf.c m4/sprintf-posix.m4 m4/printf.m4 +m4/math_h.m4 Depends-on: stdio
--- a/modules/unistdio/u16-u16-vasnprintf +++ b/modules/unistdio/u16-u16-vasnprintf @@ -6,6 +6,7 @@ lib/vasnprintf.c m4/vasnprintf.m4 m4/printf.m4 +m4/math_h.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/longlong.m4
--- a/modules/unistdio/u16-vasnprintf +++ b/modules/unistdio/u16-vasnprintf @@ -6,6 +6,7 @@ lib/vasnprintf.c m4/vasnprintf.m4 m4/printf.m4 +m4/math_h.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/longlong.m4
--- a/modules/unistdio/u32-u32-vasnprintf +++ b/modules/unistdio/u32-u32-vasnprintf @@ -6,6 +6,7 @@ lib/vasnprintf.c m4/vasnprintf.m4 m4/printf.m4 +m4/math_h.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/longlong.m4
--- a/modules/unistdio/u32-vasnprintf +++ b/modules/unistdio/u32-vasnprintf @@ -6,6 +6,7 @@ lib/vasnprintf.c m4/vasnprintf.m4 m4/printf.m4 +m4/math_h.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/longlong.m4
--- a/modules/unistdio/u8-u8-vasnprintf +++ b/modules/unistdio/u8-u8-vasnprintf @@ -6,6 +6,7 @@ lib/vasnprintf.c m4/vasnprintf.m4 m4/printf.m4 +m4/math_h.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/longlong.m4
--- a/modules/unistdio/u8-vasnprintf +++ b/modules/unistdio/u8-vasnprintf @@ -6,6 +6,7 @@ lib/vasnprintf.c m4/vasnprintf.m4 m4/printf.m4 +m4/math_h.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/longlong.m4
--- a/modules/unistdio/ulc-vasnprintf +++ b/modules/unistdio/ulc-vasnprintf @@ -6,6 +6,7 @@ lib/vasnprintf.c m4/vasnprintf.m4 m4/printf.m4 +m4/math_h.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/longlong.m4
--- a/modules/vasnprintf +++ b/modules/vasnprintf @@ -18,6 +18,7 @@ m4/inttypes_h.m4 m4/vasnprintf.m4 m4/printf.m4 +m4/math_h.m4 Depends-on: alloca-opt
--- a/modules/vasnprintf-posix +++ b/modules/vasnprintf-posix @@ -11,6 +11,7 @@ Files: m4/vasnprintf-posix.m4 m4/printf.m4 +m4/math_h.m4 Depends-on: vasnprintf
--- a/modules/vasprintf-posix +++ b/modules/vasprintf-posix @@ -10,6 +10,7 @@ Files: m4/vasprintf-posix.m4 m4/printf.m4 +m4/math_h.m4 Depends-on: vasprintf
--- a/modules/vdprintf-posix +++ b/modules/vdprintf-posix @@ -11,6 +11,7 @@ Files: m4/vdprintf-posix.m4 m4/printf.m4 +m4/math_h.m4 Depends-on: vdprintf
--- a/modules/vfprintf-posix +++ b/modules/vfprintf-posix @@ -11,6 +11,7 @@ lib/vfprintf.c m4/vfprintf-posix.m4 m4/printf.m4 +m4/math_h.m4 Depends-on: stdio