2012-11-23 Tobias Burnus <burnus@net-b.de>
Joseph Myers <joseph@codesourcery.com>
* quadmath-rounding-mode.h: New.
* printf/fpioconst.c: Update from GLIBC. Fix strtod rounding.
* printf/fpioconst.h: Ditto.
* printf/printf_fp.c (__quadmath_printf_fp): Update from GLIBC.
Make printf respect the rounding mode for decimal output.
* printf/printf_fphex.c (__quadmath_printf_fphex): Update from
GLIBC. Make printf respect the rounding mode for hex output.
* strtod/strtod_l.c: Update from GLIBC. Make strtod respect the
rounding mode. Fix strtod handling of underflow.
Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
From-SVN: r193770
* printf/quadmath-printf.c: Also check __GLIBC__ when checking
whether workarounds for printf hook handling should be added.
* configure.ac: Check for locale.h too.
(USE_LOCALE_SUPPORT): Remove check.
(USE_NL_LANGINFO, USE_NL_LANGINFO_WC, USE_LOCALECONV): New checks.
(USE_I18_NUMBER_H): Check also for _NL_CTYPE_MB_CUR_MAX.
* printf/printf_fphex.c (__quadmath_printf_fphex): Use nl_langinfo
or localeconv for narrow version and nl_langinfo if USE_NL_LANGINFO_WC
for wide version.
* printf/quadmath-printf.h: Include locale.h if HAVE_LOCALE_H.
* printf/printf_fp.c (USE_I18N_NUMBER_H): Don't define to 0.
(__quadmath_printf_fp): Use nl_langinfo or localeconv for narrow
version and nl_langinfo if USE_NL_LANGINFO_WC for wide version.
Guard nl_langinfo (_NL_CTYPE_MB_CUR_MAX) use with
USE_I18N_NUMBER_H #ifdef.
* configure: Regenerated.
* config.h.in: Regenerated.
From-SVN: r170211
* configure.ac (HAVE_HIDDEN_VISIBILITY): Test with -Werror in CFLAGS.
* printf/printf_fp.c: Don't include <alloca.h>.
* printf/quadmath-printf.h (_itoa): Redefine to __quadmath_itoa.
* configure: Regenerated.
From-SVN: r170139