X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrftime.c;h=1adcaa4ba469b63a8232dfc52e095e59c14b50be;hb=a76a349e949dfad5716eb3893052070b770e949f;hp=c96cabb34c9b51b3cf42a539510221e180025d0d;hpb=45b705d0a307ff05c9924fea210c6d8452551eee;p=gnulib.git diff --git a/lib/strftime.c b/lib/strftime.c index c96cabb34..1adcaa4ba 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -302,7 +302,7 @@ static const CHAR_T zeroes[16] = /* "0000000000000000" */ const char *__s = os; \ memset (&__st, '\0', sizeof (__st)); \ l = __mbsrtowcs_l (NULL, &__s, 0, &__st, loc); \ - ws = alloca ((l + 1) * sizeof (wchar_t)); \ + ws = (wchar_t *) alloca ((l + 1) * sizeof (wchar_t)); \ (void) __mbsrtowcs_l (ws, &__s, l, &__st, loc); \ } #endif @@ -987,8 +987,8 @@ my_strftime (s, maxsize, format, tp extra_args LOCALE_PARAM) jump to one of these two labels. */ do_number_spacepad: - /* Force `_' flag unless overwritten by `0' flag. */ - if (pad != L_('0')) + /* Force `_' flag unless overridden by `0' or `-' flag. */ + if (pad != L_('0') && pad != L_('-')) pad = L_('_'); do_number: