diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-02-10 06:49:53 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-02-10 06:49:53 +0000 |
| commit | dc7d8c99d0440aa23796a70e74b6458e7ce91ae5 (patch) | |
| tree | 5102dce7f47474a441c3ebd460a278ad7cfc9cbd /usr.bin/printf/printf.c | |
| parent | fd3f646bbb1e00967a7e2e1af56e28591b1446e7 (diff) | |
Notes
Diffstat (limited to 'usr.bin/printf/printf.c')
| -rw-r--r-- | usr.bin/printf/printf.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index 4b01b4ab48d1..897a063fd9ce 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -67,6 +67,10 @@ static const char rcsid[] = #define warnx3(a, b, c) warnx(a, b, c) #endif +#ifndef BUILTIN +#include <locale.h> +#endif + #define PF(f, func) { \ char *b = NULL; \ if (fieldwidth) \ @@ -109,6 +113,9 @@ main(argc, argv) int ch, end, fieldwidth, precision; char convch, nextch, *format, *fmt, *start; +#ifndef BUILTIN + (void) setlocale(LC_NUMERIC, ""); +#endif while ((ch = getopt(argc, argv, "")) != -1) switch (ch) { case '?': |
