summaryrefslogtreecommitdiff
path: root/libc/stdio/stdio_ext.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2017-04-24 17:48:32 -0700
committerChristopher Ferris <cferris@google.com>2017-05-03 08:50:43 -0700
commit7a3681e5b6c39bc2b3b62031ca5941dbf7bc4e63 (patch)
tree78c25e2a38b7efed8db770a623a5cbfb7eaab11d /libc/stdio/stdio_ext.cpp
parentca5e0f49ca5df873a20c996755175b5c9c1e2ed9 (diff)
Move libc_log code into libasync_safe.
This library is used by a number of different libraries in the system. Make it easy for platform libraries to use this library and create an actual exported include file. Change the names of the functions to reflect the new name of the library. Run clang_format on the async_safe_log.cpp file since the formatting is all over the place. Bug: 31919199 Test: Compiled for angler/bullhead, and booted. Test: Ran bionic unit tests. Test: Ran the malloc debug tests. Change-Id: I8071bf690c17b0ea3bc8dc5749cdd5b6ad58478a
Diffstat (limited to 'libc/stdio/stdio_ext.cpp')
-rw-r--r--libc/stdio/stdio_ext.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/stdio/stdio_ext.cpp b/libc/stdio/stdio_ext.cpp
index f2f58c61f..ebc705c87 100644
--- a/libc/stdio/stdio_ext.cpp
+++ b/libc/stdio/stdio_ext.cpp
@@ -31,8 +31,9 @@
#include <errno.h>
#include <stdlib.h>
+#include <async_safe/log.h>
+
#include "local.h"
-#include "private/libc_logging.h"
size_t __fbufsize(FILE* fp) {
return fp->_bf._size;
@@ -83,7 +84,7 @@ int __fsetlocking(FILE* fp, int type) {
if (type != FSETLOCKING_INTERNAL && type != FSETLOCKING_BYCALLER) {
// The API doesn't let us report an error, so blow up.
- __libc_fatal("Bad type (%d) passed to __fsetlocking", type);
+ async_safe_fatal("Bad type (%d) passed to __fsetlocking", type);
}
_EXT(fp)->_caller_handles_locking = (type == FSETLOCKING_BYCALLER);