Luna/libc/src/init.cpp

19 lines
373 B
C++

#include <luna/Ignore.h>
#include <stdio.h>
#include <unistd.h>
extern char** environ;
extern "C"
{
void libc_init(int argc, char** argv, int envc, char** envp)
{
ignore(argc, argv, envc);
environ = envp;
stdin = fdopen(STDIN_FILENO, "r");
stdout = fdopen(STDOUT_FILENO, "w");
stderr = fdopen(STDERR_FILENO, "w");
}
}