This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: strftime %W patch
- To: Jason Tishler <jason at tishler dot net>
- Subject: Re: strftime %W patch
- From: "J. Johnston" <jjohnstn at cygnus dot com>
- Date: Thu, 13 Sep 2001 16:41:46 -0400
- CC: newlib at sources dot redhat dot com
- Organization: Red Hat Inc.
- References: <20010913090830.B2272@dothill.com>
Jason Tishler wrote:
>
> [Please CC me on replies since I am not subscribed to this list.]
>
> While tracking down why Cygwin Python's strftime regression test
> failed, I uncovered a problem with the current newlib strftime() "%W"
> implementation. It seems just like people, newlib's strftime() does
> not like Mondays. :,)
>
Patch checked in - thanks.
-- Jeff J.
> The first attachment is a small test program that demonstrates the
> problem.
>
> When run under Cygwin, we get the following:
>
> $ stest2
> 37
> Mon Sep 17 16:13:02 2001
>
> but when run under Red Hat 7.1, we get the following:
>
> $ stest2
> 38
> Mon Sep 17 16:13:02 2001
>
> as expected.
>
> The second and third attachments are a patch and corresponding ChangeLog
> that correct this problem. Since newlib's strftime() "%U" behaved
> correctly, I modeled the "%W" implementation after it.
>
> After applying this patch, both the test program and Python's strftime
> regression test ran correctly.
>
> Thanks,
> Jason
>
> ----------------------------------------------------------------------------------------------------
>
> stest2.cName: stest2.c
> Type: Plain Text (text/plain)
>
> strftime.c.diffName: strftime.c.diff
> Type: Plain Text (text/plain)
>
> strftime.c.ChangeLogName: strftime.c.ChangeLog
> Type: Plain Text (text/plain)