summaryrefslogtreecommitdiff
path: root/libc/stdio/refill.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-12-04 18:03:12 -0800
committerElliott Hughes <enh@google.com>2015-12-05 07:30:59 -0800
commitbb46afd6c44a847efe96e30d72708fd2d0906e8c (patch)
tree9223b0b3f481341e36fc054e7209de3ec088a579 /libc/stdio/refill.c
parent0d89913e74981cd51532e66a2e2f138392be4de1 (diff)
Revert "Revert "Remove __sinit and __sdidinit.""
This reverts commit c8bae05f3ff9f1c736f7be70fa17d02795d748bb. We were breaking init (ueventd) because we initialize system properties before we initialize stdio. The new system property implementation uses stdio to read from /property_contexts, so we end up touching stdio data structures before they've been initialized. This second attempt takes things further by removing the stdio initialization function altogether. The data structures for stdin/stdout/stderr can be statically initialized as data, and -- since we already had to give the atexit implementation a backdoor for stdio -- we can just admit that we need to clean up stdio, and that we always do so last. This patch also removes the 17 statically pre-allocated file structures, so the first fopen will now allocate a block of 10 (the usual overflow behavior). I did this just to make my life simpler, but it's not actually necessary to remove it if we want it back. Change-Id: I936b2eb5e88e4ebaf5516121872b71fc88e5609c
Diffstat (limited to 'libc/stdio/refill.c')
-rw-r--r--libc/stdio/refill.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/libc/stdio/refill.c b/libc/stdio/refill.c
index e87c7b93e..5b0811f6a 100644
--- a/libc/stdio/refill.c
+++ b/libc/stdio/refill.c
@@ -51,11 +51,6 @@ lflush(FILE *fp)
int
__srefill(FILE *fp)
{
-
- /* make sure stdio is set up */
- if (!__sdidinit)
- __sinit();
-
fp->_r = 0; /* largely a convenience for callers */
#if !defined(__ANDROID__)