diff options
author | Eric Fischer <enf@google.com> | 2009-05-15 13:33:20 -0700 |
---|---|---|
committer | Eric Fischer <enf@google.com> | 2009-05-15 13:46:55 -0700 |
commit | a48fa7f4deb6ba703e1da55143771476d4e668ce (patch) | |
tree | ef345673adaec0cc65724ca430af240244e225c8 /libc/tzcode | |
parent | a0508577c9b1fcf89d120ece88fe2080463d4d4d (diff) | |
download | bionic-a48fa7f4deb6ba703e1da55143771476d4e668ce.zip bionic-a48fa7f4deb6ba703e1da55143771476d4e668ce.tar.gz bionic-a48fa7f4deb6ba703e1da55143771476d4e668ce.tar.bz2 |
Add standalone_months field to libc strftime().
Replicate my change 722a5c0462f38827f4097065bfc3826b9e0e9fb4 into
bionic in an attempt to fix the build.
Diffstat (limited to 'libc/tzcode')
-rw-r--r-- | libc/tzcode/strftime.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libc/tzcode/strftime.c b/libc/tzcode/strftime.c index 75ab8ce..930ecf4 100644 --- a/libc/tzcode/strftime.c +++ b/libc/tzcode/strftime.c @@ -69,6 +69,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': |