* libc/time/asctime_r.c (asctime_r): Replace call to sprintf with call
to siprintf. * libc/time/strftime.c: Define snprintf to sniprintf in multibyte case. * libc/time/tzset_r.c: Define sscanf to siscanf.
This commit is contained in:
		| @@ -1,3 +1,10 @@ | |||||||
|  | 2011-06-14  Philip Munts  <phil@munts.net> | ||||||
|  |  | ||||||
|  | 	* libc/time/asctime_r.c (asctime_r): Replace call to sprintf with call | ||||||
|  | 	to siprintf. | ||||||
|  | 	* libc/time/strftime.c: Define snprintf to sniprintf in multibyte case. | ||||||
|  | 	* libc/time/tzset_r.c: Define sscanf to siscanf. | ||||||
|  |  | ||||||
| 2011-06-14  Joseph Myers  <joseph@codesourcery.com> | 2011-06-14  Joseph Myers  <joseph@codesourcery.com> | ||||||
|  |  | ||||||
| 	* configure.host: Don't handle ep9312, strongarm, xscale and thumb | 	* configure.host: Don't handle ep9312, strongarm, xscale and thumb | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ _DEFUN (asctime_r, (tim_p, result), | |||||||
| 	"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" | 	"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|   sprintf (result, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n", |   siprintf (result, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n", | ||||||
| 	    day_name[tim_p->tm_wday],  | 	    day_name[tim_p->tm_wday],  | ||||||
| 	    mon_name[tim_p->tm_mon], | 	    mon_name[tim_p->tm_mon], | ||||||
| 	    tim_p->tm_mday, tim_p->tm_hour, tim_p->tm_min, | 	    tim_p->tm_mday, tim_p->tm_hour, tim_p->tm_min, | ||||||
|   | |||||||
| @@ -285,6 +285,7 @@ the "C" locale settings. | |||||||
| #  define CQ(a)		a		/* character constant qualifier */ | #  define CQ(a)		a		/* character constant qualifier */ | ||||||
| #  define SFLG				/* %s flag (null for normal char) */ | #  define SFLG				/* %s flag (null for normal char) */ | ||||||
| #  define _ctloc(x) (ctloclen = strlen (ctloc = _CurrentTimeLocale->x), ctloc) | #  define _ctloc(x) (ctloclen = strlen (ctloc = _CurrentTimeLocale->x), ctloc) | ||||||
|  | #  define snprintf	sniprintf	/* avoid to pull in FP functions. */ | ||||||
| #  define TOLOWER(c)	tolower((int)(unsigned char)(c)) | #  define TOLOWER(c)	tolower((int)(unsigned char)(c)) | ||||||
| #  define STRTOUL(c,p,b) strtoul((c),(p),(b)) | #  define STRTOUL(c,p,b) strtoul((c),(p),(b)) | ||||||
| #  define STRCPY(a,b)	strcpy((a),(b)) | #  define STRCPY(a,b)	strcpy((a),(b)) | ||||||
|   | |||||||
| @@ -7,6 +7,8 @@ | |||||||
| #include <sys/time.h> | #include <sys/time.h> | ||||||
| #include "local.h" | #include "local.h" | ||||||
|  |  | ||||||
|  | #define sscanf siscanf	/* avoid to pull in FP functions. */ | ||||||
|  |  | ||||||
| static char __tzname_std[11]; | static char __tzname_std[11]; | ||||||
| static char __tzname_dst[11]; | static char __tzname_dst[11]; | ||||||
| static char *prev_tzenv = NULL; | static char *prev_tzenv = NULL; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user