1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:47:37 +00:00

Add setvbuf(), setlinebuf(), setbuf().

This commit is contained in:
Andreas Kling 2018-11-11 10:11:09 +01:00
parent 7cc4caee4f
commit e48182d91b
6 changed files with 86 additions and 32 deletions

View file

@ -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();