2011-02-14 Jakub Jelinek <jakub@redhat.com>
+ PR bootstrap/47736
+ * configure.ac (HAVE_PRINTF_HOOKS): Test if printf_info struct has
+ user field.
+ * printf/quadmath-printf.c (quadmath_snprintf): Clear whole info
+ field instead of setting individual fields to 0. Don't set info.user
+ to -1.
+ * configure: Regenerated.
+
* 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.
int pa_flt128 = register_printf_type (flt128_va);
int mod_Q = register_printf_modifier (L"Q");
int res = register_printf_specifier ('f', flt128_printf_fp, flt128_ais);
+struct printf_info info = { .user = -1 };
;
return 0;
int pa_flt128 = register_printf_type (flt128_va);
int mod_Q = register_printf_modifier (L"Q");
int res = register_printf_specifier ('f', flt128_printf_fp, flt128_ais);
+struct printf_info info = { .user = -1 };
],
[quadmath_printf_hooks=yes],[quadmath_printf_hooks=no])
AC_MSG_RESULT($quadmath_printf_hooks)
return -1;
/* Clear information structure. */
- info.alt = 0;
+ memset (&info, '\0', sizeof info);
+ /* info.alt = 0;
info.space = 0;
info.left = 0;
info.showsign = 0;
info.group = 0;
info.i18n = 0;
- info.extra = 0;
+ info.extra = 0; */
info.pad = ' ';
- info.wide = 0;
+ /* info.wide = 0; */
/* Check for spec modifiers. */
do
va_start (ap, format);
/* Get the field width. */
- info.width = 0;
+ /* info.width = 0; */
if (*format == '*')
{
/* The field width is given in an argument.
}
/* Check for type modifiers. */
- info.is_long_double = 0;
+ /* info.is_long_double = 0;
info.is_short = 0;
info.is_long = 0;
info.is_char = 0;
- info.user = -1;
+ info.user = 0; */
/* We require Q modifier. */
if (*format++ != 'Q')