From e48182d91b352525d31105989be3b0e5f77f772a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 11 Nov 2018 10:11:09 +0100 Subject: Add setvbuf(), setlinebuf(), setbuf(). --- LibC/entry.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'LibC/entry.cpp') diff --git a/LibC/entry.cpp b/LibC/entry.cpp index 2753137e2c..5a54b85f59 100644 --- a/LibC/entry.cpp +++ b/LibC/entry.cpp @@ -5,27 +5,17 @@ extern "C" int main(int, char**); -FILE __default_streams[3]; - int errno; -FILE* stdin; -FILE* stdout; -FILE* stderr; char** environ; extern "C" void __malloc_init(); +extern "C" void __stdio_init(); extern "C" int _start() { errno = 0; - memset(__default_streams, 0, sizeof(__default_streams)); - __default_streams[0].fd = 0; - stdin = &__default_streams[0]; - __default_streams[1].fd = 1; - stdout = &__default_streams[1]; - __default_streams[2].fd = 2; - stderr = &__default_streams[2]; + __stdio_init(); __malloc_init(); StringImpl::initializeGlobals(); -- cgit v1.2.3