diff options
| author | Jakob Kaivo <jkk@ung.org> | 2019-01-31 21:41:37 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2019-01-31 21:41:37 -0500 |
| commit | ee984f41574ef9e8b23793c6e2d3916481ccbb91 (patch) | |
| tree | 6b2e7108477ed54edcf0489942e5cf31923b9d4e /nonstd/libc.c | |
| parent | 1699495e6b62425319ab8af426dac1e6318f3763 (diff) | |
get setlocale() right when _POSIX_SOURCE is defined
Diffstat (limited to 'nonstd/libc.c')
| -rw-r--r-- | nonstd/libc.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/nonstd/libc.c b/nonstd/libc.c index dabbc44a..5dc0f818 100644 --- a/nonstd/libc.c +++ b/nonstd/libc.c @@ -59,21 +59,8 @@ struct libc __libc = { .stdio.fopen = __common_fopen, .stdlib.rand = 1, .stdlib.atexit_max = 32, - /* - .wctype.wctype = __wctype, - .wctype.nwctype = sizeof(__wctype) / sizeof(__wctype[0]), - .wctype.wctrans = __wctrans, - .wctype.nwctrans = sizeof(__wctrans) / sizeof(__wctrans[0]), - .unistd.confstr = confstr, - .unistd.nconfstr = sizeof(confstr) / sizeof(confstr[0]), - */ .syscall_lookup = __syscall_lookup, .syscall = __syscall, - /* - .syscall_byname = __syscall_byname, - .syscall_bynum = __syscall_bynum, - .syscall_arglist = __syscall_arglist, - */ .per_thread = per_thread, }; @@ -90,7 +77,7 @@ void __libc_start(int argc, char **argv) stderr = __libc.stdio.fopen(&fo); #if defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || defined _XOPEN_SOURCE - setlocale("POSIX"); + setlocale(LC_ALL, "POSIX"); #else setlocale(LC_ALL, "C"); #endif |
