libc: #define STDOUT_FILENO and STDERR_FILENO
Still missing stdin >.<
This commit is contained in:
parent
eb67ab113e
commit
d5bc87099f
@ -5,6 +5,9 @@
|
||||
#include <bits/seek.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define STDOUT_FILENO 0
|
||||
#define STDERR_FILENO 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ static void check_for_file(int fd, FILE** target_stream, const char* path, const
|
||||
|
||||
extern "C" void initialize_libc()
|
||||
{
|
||||
check_for_file(0, &stdout, "/dev/console", "rw");
|
||||
check_for_file(1, &stderr, "/dev/console", "rw");
|
||||
check_for_file(STDOUT_FILENO, &stdout, "/dev/console", "rw");
|
||||
check_for_file(STDERR_FILENO, &stderr, "/dev/console", "rw");
|
||||
atexit(terminate_libc);
|
||||
}
|
Loading…
Reference in New Issue
Block a user