diff options
Diffstat (limited to 'nonstd/libc.c')
| -rw-r--r-- | nonstd/libc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nonstd/libc.c b/nonstd/libc.c index 766f917f..dabbc44a 100644 --- a/nonstd/libc.c +++ b/nonstd/libc.c @@ -1,4 +1,6 @@ #include <stddef.h> +#include <locale.h> + #include "nonstd/types.h" #include "nonstd/public/setjmp.h" @@ -86,6 +88,13 @@ void __libc_start(int argc, char **argv) stdout = __libc.stdio.fopen(&fo); fo.fd = 2; stderr = __libc.stdio.fopen(&fo); + + #if defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || defined _XOPEN_SOURCE + setlocale("POSIX"); + #else + setlocale(LC_ALL, "C"); + #endif + exit(main(argc, argv)); } |
