19 lines
341 B
C
19 lines
341 B
C
|
#include <stdio.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
FILE *stdin;
|
||
|
FILE *stdout;
|
||
|
FILE *stderr;
|
||
|
|
||
|
__attribute__((constructor))
|
||
|
static void initialize_streams(void)
|
||
|
{
|
||
|
stdin = fdopen(STDIN_FILENO, "r");
|
||
|
|
||
|
stdout = fdopen(STDOUT_FILENO, "w");
|
||
|
setvbuf(stdout, NULL, _IOLBF, BUFSIZ);
|
||
|
|
||
|
stderr = fdopen(STDERR_FILENO, "w");
|
||
|
setvbuf(stderr, NULL, _IONBF, 0);
|
||
|
}
|