summaryrefslogtreecommitdiff
path: root/libquadmath/printf
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-14 18:49:07 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-14 18:49:07 +0000
commitaa44ed84ca6a99c95220dd9bdb6c70ce603cc9cd (patch)
tree3f066b7988902ded33b9c98f373b1a5fdbcec7d2 /libquadmath/printf
parent09dbccba61a6d917b236fcd68041215ae45fa340 (diff)
downloadgcc-aa44ed84ca6a99c95220dd9bdb6c70ce603cc9cd.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170147 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libquadmath/printf')
-rw-r--r--libquadmath/printf/quadmath-printf.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libquadmath/printf/quadmath-printf.c b/libquadmath/printf/quadmath-printf.c
index 6d17200e3ad..4f5305edee4 100644
--- a/libquadmath/printf/quadmath-printf.c
+++ b/libquadmath/printf/quadmath-printf.c
@@ -121,15 +121,16 @@ quadmath_snprintf (char *str, size_t size, const char *format, ...)
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
@@ -180,7 +181,7 @@ quadmath_snprintf (char *str, size_t size, const char *format, ...)
va_start (ap, format);
/* Get the field width. */
- info.width = 0;
+ /* info.width = 0; */
if (*format == '*')
{
/* The field width is given in an argument.
@@ -213,11 +214,11 @@ quadmath_snprintf (char *str, size_t size, const char *format, ...)
}
/* 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')