Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/bin/sleep



On Thu, Jan 24, 2019 at 16:18:49 +0100, Joerg Sonnenberger wrote:
> Date: Thu, 24 Jan 2019 16:18:49 +0100
> From: Joerg Sonnenberger <joerg%bec.de@localhost>
> Subject: Re: CVS commit: src/bin/sleep
> To: source-changes-d%NetBSD.org@localhost
> Mail-Followup-To: source-changes-d%NetBSD.org@localhost
> 
w
> On Sat, Jan 19, 2019 at 01:27:12PM +0000, Robert Elz wrote:
> > Module Name:	src
> > Committed By:	kre
> > Date:		Sat Jan 19 13:27:12 UTC 2019
> > 
> > Modified Files:
> > 	src/bin/sleep: sleep.c
> > 
> > Log Message:
> > Allow the decimal radix character '.' to work, regardless of
> > what the current locale's radix character happens to be,
> > while still allowing locale specific entry of fractional
> > seconds (ie: if you're in locale where the radix character
> > is ',' you san use "sleep 2.5" or "sleep 2,5" and they
> > accomplish the same thing).
> 
> This is overcomplicated and fragile, IMO. Can we just go back to the old
> code and switch the strtod to strtod_l with LC_C_LOCALE? That solves the
> input problem.

Seconded.  Accepting locale specific number formats here is quite
against POLA, imho.

-uwe


Home | Main Index | Thread Index | Old Index