[libc] add fprintf and file_writer
authorMichael Jones <michaelrj@google.com>
Wed, 18 May 2022 23:58:17 +0000 (16:58 -0700)
committerMichael Jones <michaelrj@google.com>
Tue, 31 May 2022 20:59:19 +0000 (13:59 -0700)
commitba7e1cddda621adb90175e060a3e2ad8bdef35f8
treeeae94329b5ce924808af3233f3eb772ab39c4aa8
parent13e1a653278ba4a9805f0247c5bc92dad720aab3
[libc] add fprintf and file_writer

This patch adds the file_writer header, which just provides a wrapper
for File->write, as well as fprintf to use it. There are no unit tests
for file_writer since it's too simple to need them, but fprintf does
have a simple test of writing to a file.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D125939
libc/config/linux/x86_64/entrypoints.txt
libc/src/stdio/CMakeLists.txt
libc/src/stdio/fprintf.cpp [new file with mode: 0644]
libc/src/stdio/fprintf.h [new file with mode: 0644]
libc/src/stdio/printf_core/CMakeLists.txt
libc/src/stdio/printf_core/file_writer.h [new file with mode: 0644]
libc/test/src/stdio/CMakeLists.txt
libc/test/src/stdio/fprintf_test.cpp [new file with mode: 0644]