Hi Paul,

> diff --git a/lib/strftime.c b/lib/strftime.c
> index f7cf65d541..af96da95e4 100644
> --- a/lib/strftime.c
> +++ b/lib/strftime.c
> @@ -877,12 +877,12 @@ iso_week_days (int yday, int wday)
>  
>  
>  #if !defined _NL_CURRENT && (HAVE_ONLY_C_LOCALE || (USE_C_LOCALE && 
> !HAVE_STRFTIME_L))
> -static CHAR_T const c_weekday_names[][sizeof "Wednesday"] =
> +static CHAR_T const c_weekday_names[][sizeof L_("Wednesday")] =
>    {
>      L_("Sunday"), L_("Monday"), L_("Tuesday"), L_("Wednesday"),
>      L_("Thursday"), L_("Friday"), L_("Saturday")
>    };

This patch makes no sense to me. sizeof "Wednesday" is 10,
sizeof L_("Wednesday") is 40. In an array of type 'wchar_t',
you need 7 * 10 elements. 7 * 40 elements is a waste of space.

Maybe you wanted to use countof (L_("Wednesday")) + 1 ?

> -static CHAR_T const c_month_names[][sizeof "September"] =
> +static CHAR_T const c_month_names[][sizeof L_("September")] =
>    {
>      L_("January"), L_("February"), L_("March"), L_("April"), L_("May"),
>      L_("June"), L_("July"), L_("August"), L_("September"), L_("October"),
> 

Likewise.

Bruno




Reply via email to