summaryrefslogtreecommitdiff
path: root/LibC/entry.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-11 10:11:09 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-11 10:11:09 +0100
commite48182d91b352525d31105989be3b0e5f77f772a (patch)
treec4e50b54b55e9828ec6f8cb14b721641d670511c /LibC/entry.cpp
parent7cc4caee4f879efd12a079a206b00a689a254609 (diff)
downloadserenity-e48182d91b352525d31105989be3b0e5f77f772a.zip
Add setvbuf(), setlinebuf(), setbuf().
Diffstat (limited to 'LibC/entry.cpp')
-rw-r--r--LibC/entry.cpp14
1 files changed, 2 insertions, 12 deletions
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();