timeout,top,watch,ping: parse NN.N fractional duration in locales with other separators
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
		@@ -89,6 +89,7 @@ static unsigned str_to_jiffies(const char *time_str)
 | 
			
		||||
{
 | 
			
		||||
	double dd;
 | 
			
		||||
	char *endptr;
 | 
			
		||||
//TODO: needs setlocale(LC_NUMERIC, "C")?
 | 
			
		||||
	dd = /*bb_*/strtod(time_str, &endptr);
 | 
			
		||||
	if (endptr == time_str || dd < 0)
 | 
			
		||||
		bb_error_msg_and_die(bb_msg_invalid_arg_to, time_str, "timespec");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user