mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-12 06:57:33 +02:00
(strftime): Accommodate the broken C compiler
that comes with SunOS -- don't initialize aggregates in decls of automatic variables. Reported by Kaveh Ghazi.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user