2023-04-07 13:03:38 +00:00
|
|
|
#include <luna/Ignore.h>
|
2023-03-18 18:23:18 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2023-04-07 13:03:38 +00:00
|
|
|
extern char** environ;
|
|
|
|
|
2023-03-18 18:23:18 +00:00
|
|
|
extern "C"
|
|
|
|
{
|
2023-04-07 13:03:38 +00:00
|
|
|
void libc_init(int argc, char** argv, int envc, char** envp)
|
2023-03-18 18:23:18 +00:00
|
|
|
{
|
2023-04-07 13:03:38 +00:00
|
|
|
ignore(argc, argv, envc);
|
|
|
|
environ = envp;
|
|
|
|
|
2023-03-19 18:19:20 +00:00
|
|
|
stdin = fdopen(STDIN_FILENO, "r");
|
2023-03-18 18:23:18 +00:00
|
|
|
stdout = fdopen(STDOUT_FILENO, "w");
|
|
|
|
stderr = fdopen(STDERR_FILENO, "w");
|
|
|
|
}
|
|
|
|
}
|