From 7eed8715a215c269e9a9159b64b934f9647d9a18 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 10 Oct 1996 02:56:10 +0000 Subject: [PATCH] (strftime): Accommodate the broken C compiler that comes with SunOS -- don't initialize aggregates in decls of automatic variables. Reported by Kaveh Ghazi. --- lib/strftime.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/strftime.c b/lib/strftime.c index aa97c02ce1..de6a0d427f 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -658,8 +658,11 @@ strftime (s, maxsize, format, tp) case 's': /* GNU extension. */ { - struct tm ltm = *tp; - time_t t = mktime (<m); + struct tm ltm; + time_t t; + + ltm = *tp; + t = mktime (<m); /* Generate string value for T using time_t arithmetic; this works even if sizeof (long) < sizeof (time_t). */ @@ -803,8 +806,11 @@ strftime (s, maxsize, format, tp) diff = tp->tm_gmtoff; #else struct tm gtm; - struct tm ltm = *tp; - time_t lt = mktime (<m); + struct tm ltm; + time_t lt; + + ltm = *tp; + lt = mktime (<m); if (lt == (time_t) -1) { -- 2.30.2