rpms/dietlibc/F-8 dietlibc-0.31-lcctime.patch,NONE,1.1

Enrico Scholz (ensc) fedora-extras-commits at redhat.com
Sat Jun 21 13:49:32 UTC 2008


Author: ensc

Update of /cvs/extras/rpms/dietlibc/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24181

Added Files:
	dietlibc-0.31-lcctime.patch 
Log Message:
This patch changes the used format for %x and %X specifiers in
strptime(3) to match these specified by SUSv2.  It adds support for
'%F' in strftime(3) too.


dietlibc-0.31-lcctime.patch:

--- NEW FILE dietlibc-0.31-lcctime.patch ---
diff -up dietlibc-0.31.20080409/libugly/strftime.c.lcctime dietlibc-0.31.20080409/libugly/strftime.c
--- dietlibc-0.31.20080409/libugly/strftime.c.lcctime	2006-08-15 18:07:15.000000000 +0200
+++ dietlibc-0.31.20080409/libugly/strftime.c	2008-04-13 13:20:41.000000000 +0200
@@ -55,6 +55,7 @@ again:
 	    case 'x': src = "%b %a %d";   			 goto _strf;
 	    case 'X': src = "%k:%M:%S";   			 goto _strf;
 	    case 'D': src = "%m/%d/%y";   			 goto _strf;
+	    case 'F': src = "%Y-%m-%d";				 goto _strf;
 	    case 'T': src = "%H:%M:%S";
 	       _strf: p  += strftime (p, (size_t)(dst+max-p), src, tm); 	 break;
 	    case 'a': src = sweekdays [tm->tm_wday]; 		 goto _str;
diff -up dietlibc-0.31.20080409/libugly/strptime.c.lcctime dietlibc-0.31.20080409/libugly/strptime.c
--- dietlibc-0.31.20080409/libugly/strptime.c.lcctime	2007-08-03 22:58:33.000000000 +0200
+++ dietlibc-0.31.20080409/libugly/strptime.c	2008-04-13 13:13:12.000000000 +0200
@@ -119,10 +119,11 @@ char* strptime(const char* s,const char*
 	++s;
 	break;
       case 'x':
-	s=strptime(s,"%b %a %d",tm);
+	/* see SUSv2, Ch.7 "LC_TIME Category in the POSIX Locale" */
+	s=strptime(s,"%m/%d/%y",tm);
 	break;
       case 'X':
-	s=strptime(s,"%k:%M:%S",tm);
+	s=strptime(s,"%H:%M:%S",tm);
 	break;
       case 'y':
 	i=getint(&s,2);




More information about the fedora-extras-commits mailing list