Merge "Add __libc_format_buffer_va_list."
am: fec0e015ce
Change-Id: I1028ee851f6fdd30e93858e89a5bd741bbb54e62
This commit is contained in:
commit
33b9640132
2 changed files with 16 additions and 0 deletions
|
@ -422,6 +422,13 @@ int __libc_format_buffer(char* buffer, size_t buffer_size, const char* format, .
|
|||
return os.total;
|
||||
}
|
||||
|
||||
int __libc_format_buffer_va_list(char* buffer, size_t buffer_size, const char* format,
|
||||
va_list args) {
|
||||
BufferOutputStream os(buffer, buffer_size);
|
||||
out_vformat(os, format, args);
|
||||
return os.total;
|
||||
}
|
||||
|
||||
int __libc_format_fd(int fd, const char* format, ...) {
|
||||
FdOutputStream os(fd);
|
||||
va_list args;
|
||||
|
|
|
@ -79,6 +79,15 @@ __noreturn void __fortify_fatal(const char* _Nonnull, ...) __printflike(1, 2);
|
|||
//
|
||||
|
||||
int __libc_format_buffer(char* _Nonnull buf, size_t size, const char* _Nonnull fmt, ...) __printflike(3, 4);
|
||||
|
||||
#if defined(__arm__) || defined(__aarch64__) || defined(__x86_64__)
|
||||
int __libc_format_buffer_va_list(char* _Nonnull buffer, size_t buffer_size,
|
||||
const char* _Nonnull format, va_list args);
|
||||
#else // defined(__mips__) || defined(__i386__)
|
||||
int __libc_format_buffer_va_list(char* _Nonnull buffer, size_t buffer_size,
|
||||
const char* _Nonnull format, va_list _Nonnull args);
|
||||
#endif
|
||||
|
||||
int __libc_format_fd(int fd, const char* _Nonnull format , ...) __printflike(2, 3);
|
||||
int __libc_format_log(int pri, const char* _Nonnull tag, const char* _Nonnull fmt, ...) __printflike(3, 4);
|
||||
#if defined(__arm__) || defined(__aarch64__) || defined(__x86_64__)
|
||||
|
|
Loading…
Reference in a new issue