diff options
author | Jim Meyering <jim@meyering.net> | 1996-10-10 02:56:10 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-10-10 02:56:10 +0000 |
commit | e5e9f3ee5d2776d1f2ca360da7526c02e33ade4b (patch) | |
tree | 1a60cd80fe783b275c9717e21b57c996c51a067c /lib | |
parent | 62ae6ccc22d480c85af931ee90776734340cfb89 (diff) | |
download | coreutils-e5e9f3ee5d2776d1f2ca360da7526c02e33ade4b.tar.xz |
(strftime): Accommodate the broken C compiler
that comes with SunOS -- don't initialize aggregates in decls of
automatic variables. Reported by Kaveh Ghazi.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/strftime.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/strftime.c b/lib/strftime.c index aa97c02ce..de6a0d427 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) { |