2005-11-18 Jeff Johnston <jjohnstn@redhat.com>
* libc/time/strptime.c (strptime): Don't abort for %c and %Z. Treat %c as "%a %b %e %H:%M:%S %Y" and ignore %Z.
This commit is contained in:
parent
19e7c3a068
commit
6b1a6ec67b
2 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-11-18 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
|
* libc/time/strptime.c (strptime): Don't abort for %c and %Z.
|
||||||
|
Treat %c as "%a %b %e %H:%M:%S %Y" and ignore %Z.
|
||||||
|
|
||||||
2005-11-18 Christopher Faylor <cgf@timesys.com>
|
2005-11-18 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* include/sys/time.h: Move more cygwin stuff to cygwin-specific header.
|
* include/sys/time.h: Move more cygwin stuff to cygwin-specific header.
|
||||||
|
|
|
@ -249,8 +249,12 @@ _DEFUN (strptime, (buf, format, timeptr),
|
||||||
timeptr->tm_year = (ret * 100) - tm_year_base;
|
timeptr->tm_year = (ret * 100) - tm_year_base;
|
||||||
buf = s;
|
buf = s;
|
||||||
break;
|
break;
|
||||||
case 'c' :
|
case 'c' : /* %a %b %e %H:%M:%S %Y */
|
||||||
abort ();
|
s = strptime (buf, "%a %b %e %H:%M:%S %Y", timeptr);
|
||||||
|
if (s == NULL)
|
||||||
|
return NULL;
|
||||||
|
buf = s;
|
||||||
|
break;
|
||||||
case 'D' : /* %m/%d/%y */
|
case 'D' : /* %m/%d/%y */
|
||||||
s = strptime (buf, "%m/%d/%y", timeptr);
|
s = strptime (buf, "%m/%d/%y", timeptr);
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
|
@ -412,7 +416,8 @@ _DEFUN (strptime, (buf, format, timeptr),
|
||||||
buf = s;
|
buf = s;
|
||||||
break;
|
break;
|
||||||
case 'Z' :
|
case 'Z' :
|
||||||
abort ();
|
/* Unsupported. Just ignore. */
|
||||||
|
break;
|
||||||
case '\0' :
|
case '\0' :
|
||||||
--format;
|
--format;
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
|
Loading…
Add table
Reference in a new issue