[PATCH] newlib: ln_langinfo: Fix a bug of time stuff.

Takashi Yano takashi.yano@nifty.ne.jp
Fri Nov 24 10:38:35 GMT 2023


Hi Corinna,

On Thu, 23 Nov 2023 16:51:58 +0100
Corinna Vinschen wrote:
> Hi Takashi,
> 
> thanks for catching.  The patch is ok, just the commit message
> is a bit lacking:
> 
> On Nov 23 20:17, Takashi Yano wrote:
> > Previsouly, e.g. nl_langinfo(_NL_TIME_WMONT_1) returns "February"
>                                 _NL_TIME_WMONTH_1
> > due to the bug. Similarly, nl_langinfo(_LN_TIME_WWDAY_1) returns
>                                          _NL_TIME_WWDAY_1
> > "Mon". This patch fixes that.
> 
> It would be nice to add a description of the actual bug, i. e., the fact
> that the bug is an off-by-one pointing into the wide char month and
> weekday arrays.
> 
> Also
> 
>   Fixes: d47d5b850bed3 ("Extend locale support to maintain wide char values of native strings")
> 
> Please backport to cygwin-3_4-branch as well.

Thanks for reviewing. Pushed.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


More information about the Newlib mailing list