diff options
| author | kre <kre@NetBSD.org> | 2019-01-26 15:22:54 +0000 |
|---|---|---|
| committer | kre <kre@NetBSD.org> | 2019-01-26 15:22:54 +0000 |
| commit | 8330f27a331a07a3c12d7905e5bd4ba2f9bf62f9 (patch) | |
| tree | 111c128f6b6270e3ab233011474c2e9fe13c4264 /usr.bin/printf/printf.c | |
| parent | 763d688f4376d11d3947e5a798facc9effc79b10 (diff) | |
Always convert input numbers (from the command line) in the C
locale, not as set in the environment. Conforms with POSIX spec.
Diffstat (limited to 'usr.bin/printf/printf.c')
| -rw-r--r-- | usr.bin/printf/printf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index 73fe6cfde08..9a4704c0922 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -1,4 +1,4 @@ -/* $NetBSD: printf.c,v 1.46 2018/09/10 14:42:29 kre Exp $ */ +/* $NetBSD: printf.c,v 1.47 2019/01/26 15:22:54 kre Exp $ */ /* * Copyright (c) 1989, 1993 @@ -41,7 +41,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\ #if 0 static char sccsid[] = "@(#)printf.c 8.2 (Berkeley) 3/22/95"; #else -__RCSID("$NetBSD: printf.c,v 1.46 2018/09/10 14:42:29 kre Exp $"); +__RCSID("$NetBSD: printf.c,v 1.47 2019/01/26 15:22:54 kre Exp $"); #endif #endif /* not lint */ @@ -682,7 +682,7 @@ getdouble(void) return (double) *((*gargv++)+1); errno = 0; - val = strtod(*gargv, &ep); + val = strtod_l(*gargv, &ep, LC_C_LOCALE); check_conversion(*gargv++, ep); return val; } |
