diff options
Diffstat (limited to 'stdio-common/printf_buffer_flush.c')
-rw-r--r-- | stdio-common/printf_buffer_flush.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/stdio-common/printf_buffer_flush.c b/stdio-common/printf_buffer_flush.c index 9b25c0fde5..bfd1f9d733 100644 --- a/stdio-common/printf_buffer_flush.c +++ b/stdio-common/printf_buffer_flush.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ +#include <errno.h> #include <printf_buffer.h> #include "printf_buffer-char.h" @@ -24,7 +25,11 @@ /* The __printf_buffer_flush_* functions are defined together with functions that are pulled in by strong references. */ #ifndef SHARED +# pragma weak __printf_buffer_flush_snprintf # pragma weak __printf_buffer_flush_to_file +# pragma weak __printf_buffer_flush_fp +# pragma weak __printf_buffer_flush_fp_to_wide +# pragma weak __printf_buffer_flush_fphex_to_wide #endif /* !SHARED */ static void @@ -34,9 +39,27 @@ __printf_buffer_do_flush (struct __printf_buffer *buf) { case __printf_buffer_mode_failed: return; + case __printf_buffer_mode_snprintf: + __printf_buffer_flush_snprintf ((struct __printf_buffer_snprintf *) buf); + return; case __printf_buffer_mode_to_file: __printf_buffer_flush_to_file ((struct __printf_buffer_to_file *) buf); return; + case __printf_buffer_mode_strfmon: + __set_errno (E2BIG); + __printf_buffer_mark_failed (buf); + return; + case __printf_buffer_mode_fp: + __printf_buffer_flush_fp ((struct __printf_buffer_fp *) buf); + return; + case __printf_buffer_mode_fp_to_wide: + __printf_buffer_flush_fp_to_wide + ((struct __printf_buffer_fp_to_wide *) buf); + return; + case __printf_buffer_mode_fphex_to_wide: + __printf_buffer_flush_fphex_to_wide + ((struct __printf_buffer_fphex_to_wide *) buf); + return; } __builtin_trap (); } |