aboutsummaryrefslogtreecommitdiff
path: root/stdio-common
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-12-19 18:56:55 +0100
committerFlorian Weimer <fweimer@redhat.com>2022-12-19 18:56:55 +0100
commit8ece45e4f586abd212d1c02d74d38ef681a45600 (patch)
tree2289618f579787fd06e2235806575705e7601b29 /stdio-common
parentaf7f4165512ea242b5f711ee03a04f6afe22232d (diff)
downloadglibc-8ece45e4f586abd212d1c02d74d38ef681a45600.zip
glibc-8ece45e4f586abd212d1c02d74d38ef681a45600.tar.gz
glibc-8ece45e4f586abd212d1c02d74d38ef681a45600.tar.bz2
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 <adhemerval.zanella@linaro.org>
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/printf_buffer_flush.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stdio-common/printf_buffer_flush.c b/stdio-common/printf_buffer_flush.c
index 14fe1b2..922340c 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);