]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r272273, r272387, r272443, r272533 :
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 8 Oct 2014 16:32:01 +0000 (16:32 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 8 Oct 2014 16:32:01 +0000 (16:32 +0000)
commit43ab8ec451cb5f16d7d55eeb0a725b98f95a0279
tree2a21ddf04196943c1edfc71d4340ae67569bf8ad
parent8d9cd95ea28684a7c78a2a49ebf561b8d79cae65
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

git-svn-id: svn://svn.freebsd.org/base/stable/9@272759 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/stdtime/strptime.3
lib/libc/stdtime/strptime.c