summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdtime/strptime.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c
index 51d41ed..401350e 100644
--- a/lib/libc/stdtime/strptime.c
+++ b/lib/libc/stdtime/strptime.c
@@ -408,6 +408,14 @@ label:
if (strncasecmp(buf, tptr->month[i],
len) == 0)
break;
+ }
+ }
+ /*
+ * Try the abbreviated month name if the full name
+ * wasn't found and Oalternative was not requested.
+ */
+ if (i == asizeof(tptr->month) && !Oalternative) {
+ for (i = 0; i < asizeof(tptr->month); i++) {
len = strlen(tptr->mon[i]);
if (strncasecmp(buf, tptr->mon[i],
len) == 0)
OpenPOWER on IntegriCloud