This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.17-759-g840e294


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  840e2943e8ae020adfa7eafa7877f004e7ecada1 (commit)
      from  4c60cb0c8329dd498e9cce3735e5ee6212ad28f4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=840e2943e8ae020adfa7eafa7877f004e7ecada1

commit 840e2943e8ae020adfa7eafa7877f004e7ecada1
Author: Andreas Schwab <schwab@suse.de>
Date:   Tue Feb 5 14:40:39 2013 +0100

    Properly handle %W in strptime

diff --git a/ChangeLog b/ChangeLog
index 69f3b9f..9a2a0c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-06-05  Andreas Schwab  <schwab@suse.de>
+
+	[BZ #15100]
+	* time/strptime_l.c (__strptime_internal): Count Sunday in a %W
+	week as 6 instead of -1.
+	* time/tst-strptime.c (day_tests): Add test case.
+
 2013-06-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	* sysdeps/generic/math_private.h
diff --git a/NEWS b/NEWS
index 9452cc1..3068b78 100644
--- a/NEWS
+++ b/NEWS
@@ -14,12 +14,12 @@ Version 2.18
   14293, 14317, 14327, 14478, 14496, 14582, 14686, 14812, 14888, 14894,
   14908, 14920, 14952, 14964, 14981, 14982, 14985, 14994, 14996, 15000,
   15003, 15006, 15007, 15014, 15020, 15023, 15036, 15054, 15055, 15062,
-  15078, 15084, 15085, 15086, 15160, 15214, 15221, 15232, 15234, 15283,
-  15285, 15287, 15304, 15305, 15307, 15309, 15327, 15330, 15335, 15336,
-  15337, 15339, 15342, 15346, 15359, 15361, 15366, 15380, 15381, 15394,
-  15395, 15405, 15406, 15409, 15416, 15418, 15419, 15423, 15424, 15426,
-  15429, 15441, 15442, 15448, 15465, 15480, 15485, 15488, 15490, 15493,
-  15497, 15506, 15529, 15536, 15553.
+  15078, 15084, 15085, 15086, 15100, 15160, 15214, 15221, 15232, 15234,
+  15283, 15285, 15287, 15304, 15305, 15307, 15309, 15327, 15330, 15335,
+  15336, 15337, 15339, 15342, 15346, 15359, 15361, 15366, 15380, 15381,
+  15394, 15395, 15405, 15406, 15409, 15416, 15418, 15419, 15423, 15424,
+  15426, 15429, 15441, 15442, 15448, 15465, 15480, 15485, 15488, 15490,
+  15493, 15497, 15506, 15529, 15536, 15553.
 
 * CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
   #15078).
diff --git a/time/strptime_l.c b/time/strptime_l.c
index 1f2e8b6..00fc1ef 100644
--- a/time/strptime_l.c
+++ b/time/strptime_l.c
@@ -1180,8 +1180,8 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
 
       if (!s.have_yday)
 	tm->tm_yday = ((7 - (tm->tm_wday - w_offset)) % 7
-		       + (s.week_no - 1) *7
-		       + save_wday - w_offset);
+		       + (s.week_no - 1) * 7
+		       + (save_wday - w_offset + 7) % 7);
 
       if (!s.have_mday || !s.have_mon)
 	{
diff --git a/time/tst-strptime.c b/time/tst-strptime.c
index 12b084d..21fbb63 100644
--- a/time/tst-strptime.c
+++ b/time/tst-strptime.c
@@ -41,6 +41,7 @@ static const struct
   { "C", "19990502123412", "%Y%m%d%H%M%S", 0, 121, 4, 2 },
   { "C", "2001 20 Mon", "%Y %U %a", 1, 140, 4, 21 },
   { "C", "2001 21 Mon", "%Y %W %a", 1, 140, 4, 21 },
+  { "C", "2012 00 Sun", "%Y %W %a", 0, 0, 0, 1 },
   { "ja_JP.EUC-JP", "2000-01-01 08:12:21 AM", "%Y-%m-%d %I:%M:%S %p",
     6, 0, 0, 1 },
   { "en_US.ISO-8859-1", "2000-01-01 08:12:21 PM", "%Y-%m-%d %I:%M:%S %p",

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog           |    7 +++++++
 NEWS                |   12 ++++++------
 time/strptime_l.c   |    4 ++--
 time/tst-strptime.c |    1 +
 4 files changed, 16 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]