#
306414 |
|
28-Sep-2016 |
ache |
MFC r306075,r306109
1) Microoptimize %p case. 2) Implememt %u for GNU compatibility. 3) Don't forget to advance buf for %w/%u. 4) Fail with incomplete week (week 0) request and no such week in the year. 5) Fix yday formula when Sunday requested and the week started from Monday. 6) Fail with impossible yday for incomplete week (week 0) and direct %w/%u request. 7) Shift yday/wday to the first day of the year, if incomplete week (week 0) requested and no %w/%u used. 8) For already non-standard %z extension implement GNU compatible formats: +hh and -hh. 9) Check for incorrect values for %z.
PR: 212983 (case 3 only)
|
#
273290 |
|
19-Oct-2014 |
ache |
MFC r272562,r272678,r272679
1) Fix the case we have less arguments for format string than we expected. 2) Return error on unsupported format specs. (both according to POSIX) 3) For %Z format, understand "UTC" name too.
PR: 93197
|
#
272758 |
|
08-Oct-2014 |
pfg |
MFC r272273, r272387, r272443, r272533 :
Add strptime(3) support for %U and %W
Add support for the missing POSIX-2001 %U and %W features: the existing FreeBSD strptime code recognizes both directives and validates that the week number lies in the permitted range, but then simply discards the value.
Initial support for the feature was written by Paul Green. David Carlier added the initial handling of tm_wday/tm_yday. Major credit goes to Andrey Chernov for detecting much of the brokenness and rewriting/cleaning most of the code, making it much more robust.
Tested independently with the strptime test from the GNU C library.
PR: 137307 Relnotes: yes
MFC r272441 :
strptime: %s format fix.
Almost never needed in real life because %s is tends to be only one format spec. 1) Return code of gmtime_r() is checked. 2) All flags are set.
Submitted by: ache
|
#
268043 |
|
30-Jun-2014 |
pfg |
MFC r267627: strptime: add support for %t and %n
Posix strptime() requires support for %t and %n, which were added to the illumos port. Curiously we were skipping white spaces by default in most other cases making %t meaningless.
We now skip spaces in the case of the %e specifier as strftime(3) explicitly adds a space for the single digit case.
Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html
PR: 173421 Obtained from: Illumos (Rev. a11c1571b6942161b0186d0588609448066892c2)
|
#
267798 |
|
23-Jun-2014 |
pfg |
MFC r267601:
stdtime: style(9) fixes.
Obtained from: illumos
|
#
267677 |
|
20-Jun-2014 |
pfg |
MFC r267544:
Update license to strptime(3) implementation.
Our strptime(3) implementation was the base for the illumos implementation and after contacting the author, Kevin Rudy stated the code is under a 2-Clause BSD License [1]
After reviewing our local changes to the file in question, the FreeBSD Foundation has agreed that their contributions to this file are not required to carry clause 3 or 4 so the file can be relicensed as in Illumos [2].
References:
[1] https://www.illumos.org/issues/357 [2] Illumos Revision: 13222:02526851ba75
Approved: core (jhb) Approved: FreeBSD Foundation (emaste)
|
#
273290 |
|
19-Oct-2014 |
ache |
MFC r272562,r272678,r272679
1) Fix the case we have less arguments for format string than we expected. 2) Return error on unsupported format specs. (both according to POSIX) 3) For %Z format, understand "UTC" name too.
PR: 93197
|
#
272758 |
|
08-Oct-2014 |
pfg |
MFC r272273, r272387, r272443, r272533 :
Add strptime(3) support for %U and %W
Add support for the missing POSIX-2001 %U and %W features: the existing FreeBSD strptime code recognizes both directives and validates that the week number lies in the permitted range, but then simply discards the value.
Initial support for the feature was written by Paul Green. David Carlier added the initial handling of tm_wday/tm_yday. Major credit goes to Andrey Chernov for detecting much of the brokenness and rewriting/cleaning most of the code, making it much more robust.
Tested independently with the strptime test from the GNU C library.
PR: 137307 Relnotes: yes
MFC r272441 :
strptime: %s format fix.
Almost never needed in real life because %s is tends to be only one format spec. 1) Return code of gmtime_r() is checked. 2) All flags are set.
Submitted by: ache
|
#
268043 |
|
30-Jun-2014 |
pfg |
MFC r267627: strptime: add support for %t and %n
Posix strptime() requires support for %t and %n, which were added to the illumos port. Curiously we were skipping white spaces by default in most other cases making %t meaningless.
We now skip spaces in the case of the %e specifier as strftime(3) explicitly adds a space for the single digit case.
Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html
PR: 173421 Obtained from: Illumos (Rev. a11c1571b6942161b0186d0588609448066892c2)
|
#
267798 |
|
23-Jun-2014 |
pfg |
MFC r267601:
stdtime: style(9) fixes.
Obtained from: illumos
|
#
267677 |
|
20-Jun-2014 |
pfg |
MFC r267544:
Update license to strptime(3) implementation.
Our strptime(3) implementation was the base for the illumos implementation and after contacting the author, Kevin Rudy stated the code is under a 2-Clause BSD License [1]
After reviewing our local changes to the file in question, the FreeBSD Foundation has agreed that their contributions to this file are not required to carry clause 3 or 4 so the file can be relicensed as in Illumos [2].
References:
[1] https://www.illumos.org/issues/357 [2] Illumos Revision: 13222:02526851ba75
Approved: core (jhb) Approved: FreeBSD Foundation (emaste)
|