diff options
author | Elliott Hughes <enh@google.com> | 2017-11-02 16:58:44 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2017-11-02 16:58:44 -0700 |
commit | 618303ca4ad2754071ba6955da690fec2b27a76d (patch) | |
tree | 97f8db830c0241850a8bdb3008127b9a92afecfc /libc/stdio/stdio.cpp | |
parent | 46621f43b083d9743545b31e97011a1c44e784b2 (diff) |
More printf de-duplication.
Fix the 'j' (intmax_t/uintmax_t) length qualifier in the wide
variant. (With new tests that fail without this fix.)
Fix a typo in the wide support for intmax_t*, which isn't testable because
%n is disabled on Android (and will be removed in a later cleanup pass).
Also move the public vfprintf/vfwprint functions into stdio.cpp.
Bug: http://b/67371539
Test: ran tests
Change-Id: Ib003599b1e9cb789044a068940b59e447f2cb7cb
Diffstat (limited to 'libc/stdio/stdio.cpp')
-rw-r--r-- | libc/stdio/stdio.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libc/stdio/stdio.cpp b/libc/stdio/stdio.cpp index c10bc00a4..46d717a71 100644 --- a/libc/stdio/stdio.cpp +++ b/libc/stdio/stdio.cpp @@ -935,6 +935,16 @@ int swscanf(const wchar_t* s, const wchar_t* fmt, ...) { PRINTF_IMPL(vswscanf(s, fmt, ap)); } +int vfprintf(FILE* fp, const char* fmt, va_list ap) { + ScopedFileLock sfl(fp); + return __vfprintf(fp, fmt, ap); +} + +int vfwprintf(FILE* fp, const wchar_t* fmt, va_list ap) { + ScopedFileLock sfl(fp); + return __vfwprintf(fp, fmt, ap); +} + int vprintf(const char* fmt, va_list ap) { return vfprintf(stdout, fmt, ap); } |