From 8ece45e4f586abd212d1c02d74d38ef681a45600 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 19 Dec 2022 18:56:55 +0100 Subject: libio: Convert __vdprintf_internal to buffers The internal buffer size is set to 2048 bytes. This is less than the original BUFSIZ value used by buffered_vfprintf before the conversion, but it hopefully covers all cases where write boundaries matter. Reviewed-by: Adhemerval Zanella --- stdio-common/printf_buffer_flush.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'stdio-common') diff --git a/stdio-common/printf_buffer_flush.c b/stdio-common/printf_buffer_flush.c index 14fe1b2df4..922340cc54 100644 --- a/stdio-common/printf_buffer_flush.c +++ b/stdio-common/printf_buffer_flush.c @@ -28,6 +28,7 @@ # pragma weak __printf_buffer_flush_snprintf # pragma weak __printf_buffer_flush_to_file # pragma weak __printf_buffer_flush_asprintf +# pragma weak __printf_buffer_flush_dprintf # pragma weak __printf_buffer_flush_fp # pragma weak __printf_buffer_flush_fp_to_wide # pragma weak __printf_buffer_flush_fphex_to_wide @@ -53,6 +54,9 @@ __printf_buffer_do_flush (struct __printf_buffer *buf) case __printf_buffer_mode_asprintf: __printf_buffer_flush_asprintf ((struct __printf_buffer_asprintf *) buf); return; + case __printf_buffer_mode_dprintf: + __printf_buffer_flush_dprintf ((struct __printf_buffer_dprintf *) buf); + return; case __printf_buffer_mode_strfmon: __set_errno (E2BIG); __printf_buffer_mark_failed (buf); -- cgit 1.4.1