[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r6448 - in /fsf/trunk/libc: ChangeLog localedata/ChangeLog localedata/tst-strptime.c time/strptime_l.c



Author: eglibc
Date: Sat Jun 28 00:04:05 2008
New Revision: 6448

Log:
Import glibc-mainline for 2008-06-28

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/localedata/ChangeLog
    fsf/trunk/libc/localedata/tst-strptime.c
    fsf/trunk/libc/time/strptime_l.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Jun 28 00:04:05 2008
@@ -1,6 +1,13 @@
+2008-06-27  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	[BZ #6657]
+	* time/strptime_l.c: Don't clear s.era_cnt after successful match
+	of %EY.
+	Patch by Petr Baudis.
+
 2008-06-26  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
-	* resolv/res_debig.c (__p_type_syms): Add ns_t_dname entry.
+	* resolv/res_debug.c (__p_type_syms): Add ns_t_dname entry.
 	Patch by Peter Jones <pjones@xxxxxxxxxx>.
 
 2008-06-25  Ulrich Drepper  <drepper@xxxxxxxxxx>

Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Sat Jun 28 00:04:05 2008
@@ -1,3 +1,7 @@
+2008-06-27  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* tst-strptime.c (do_test): Add test of %EY.
+
 2008-06-25  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* tst-strptime.c (do_test): Add test for parsing era year

Modified: fsf/trunk/libc/localedata/tst-strptime.c
==============================================================================
--- fsf/trunk/libc/localedata/tst-strptime.c (original)
+++ fsf/trunk/libc/localedata/tst-strptime.c Sat Jun 28 00:04:05 2008
@@ -37,6 +37,16 @@
   result |= (r == NULL || r - s2 != 14 || tm.tm_mday != 25 || tm.tm_mon != 5
 	     || tm.tm_year != 108);
 
+  static const char s3[] = "\
+\x32\x35\x20\x30\x36\x20\xe5\xb9\xb3\xe6\x88\x90\x32\x30\xe5\xb9\xb4\0";
+  memset (&tm, '\0', sizeof (tm));
+  r = strptime (s3, "%d %m %EY", &tm);
+  printf ("\
+r = %p, r-s3 = %tu, tm.tm_mday = %d, tm.tm_mon = %d, tm.tm_year = %d\n",
+	  r, r - s3, tm.tm_mday, tm.tm_mon, tm.tm_year);
+  result |= (r == NULL || r - s3 != 17 || tm.tm_mday != 25 || tm.tm_mon != 5
+	     || tm.tm_year != 108);
+
   return result;
 }
 

Modified: fsf/trunk/libc/time/strptime_l.c
==============================================================================
--- fsf/trunk/libc/time/strptime_l.c (original)
+++ fsf/trunk/libc/time/strptime_l.c Sat Jun 28 00:04:05 2008
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -33,22 +33,13 @@
 #endif
 
 
-#ifndef __P
-# if defined __GNUC__ || (defined __STDC__ && __STDC__)
-#  define __P(args) args
-# else
-#  define __P(args) ()
-# endif  /* GCC.  */
-#endif  /* Not __P.  */
-
-
 #if ! HAVE_LOCALTIME_R && ! defined localtime_r
 # ifdef _LIBC
 #  define localtime_r __localtime_r
 # else
 /* Approximate localtime_r as best we can in its absence.  */
 #  define localtime_r my_localtime_r
-static struct tm *localtime_r __P ((const time_t *, struct tm *));
+static struct tm *localtime_r (const time_t *, struct tm *);
 static struct tm *
 localtime_r (t, tp)
      const time_t *t;
@@ -951,7 +942,6 @@
 		  else
 		    {
 		      s.decided = loc;
-		      s.era_cnt = -1;
 		      break;
 		    }