From 2deb7d2cffb76dbcaf7ba051e616ccb7e275ed54 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 18 Aug 2022 08:49:54 +0200 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. --- stdio-common/printf_buffer_flush.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'stdio-common/printf_buffer_flush.c') 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 v1.2.3