blob: e10e081e5d5fb93f7c582b7e2d8ff03633209eb1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include "stdio.h"
#include "locale.h"
#include "nonstd/io.h"
void __libc_start(int argc, char **argv)
{
struct __FILE sin, sout, serr;
sin.fd = 0;
stdin = &sin;
sout.fd = 1;
stdout = &sout;
serr.fd = 2;
stderr = &serr;
#if defined _POSIX_SOURCE
setlocale(LC_ALL, "POSIX");
#else
setlocale(LC_ALL, "C");
#endif
extern void exit(int);
extern int main(int, char*[]);
exit(main(argc, argv));
}
|