Add standalone_months field to libc strftime().
Replicate my change 722a5c0462f38827f4097065bfc3826b9e0e9fb4 into bionic in an attempt to fix the build.
This commit is contained in:
parent
a0508577c9
commit
a48fa7f4de
@ -83,6 +83,7 @@ extern size_t strftime(char *s, size_t max, const char *format, const struc
|
||||
struct strftime_locale {
|
||||
const char * mon[12];
|
||||
const char * month[12];
|
||||
const char * standalone_month[12];
|
||||
const char * wday[7];
|
||||
const char * weekday[7];
|
||||
const char * X_fmt;
|
||||
|
@ -68,6 +68,9 @@ static const struct lc_time_T C_time_locale = {
|
||||
}, {
|
||||
"January", "February", "March", "April", "May", "June",
|
||||
"July", "August", "September", "October", "November", "December"
|
||||
}, {
|
||||
"January", "February", "March", "April", "May", "June",
|
||||
"July", "August", "September", "October", "November", "December"
|
||||
}, {
|
||||
"Sun", "Mon", "Tue", "Wed",
|
||||
"Thu", "Fri", "Sat"
|
||||
@ -219,10 +222,17 @@ label:
|
||||
pt, ptlim, modifier);
|
||||
continue;
|
||||
case 'B':
|
||||
pt = _add((t->tm_mon < 0 ||
|
||||
t->tm_mon >= MONSPERYEAR) ?
|
||||
"?" : locale->month[t->tm_mon],
|
||||
pt, ptlim, modifier);
|
||||
if (modifier == '-') {
|
||||
pt = _add((t->tm_mon < 0 ||
|
||||
t->tm_mon >= MONSPERYEAR) ?
|
||||
"?" : Locale->standalone_month[t->tm_mon],
|
||||
pt, ptlim, modifier);
|
||||
} else {
|
||||
pt = _add((t->tm_mon < 0 ||
|
||||
t->tm_mon >= MONSPERYEAR) ?
|
||||
"?" : Locale->month[t->tm_mon],
|
||||
pt, ptlim, modifier);
|
||||
}
|
||||
continue;
|
||||
case 'b':
|
||||
case 'h':
|
||||
|
Loading…
x
Reference in New Issue
Block a user