diff options
author | davygrvy <davygrvy@pobox.com> | 2003-08-27 19:06:54 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@pobox.com> | 2003-08-27 19:06:54 (GMT) |
commit | 3c427fe4f4fb71e562a7a67673ee59db574cd07d (patch) | |
tree | 5fcace13907996771b68ab8389a6dabe6c6a0a3c /compat/strftime.c | |
parent | 769035280578d490045479f9cbae23e6fef5ab7c (diff) | |
download | tcl-3c427fe4f4fb71e562a7a67673ee59db574cd07d.zip tcl-3c427fe4f4fb71e562a7a67673ee59db574cd07d.tar.gz tcl-3c427fe4f4fb71e562a7a67673ee59db574cd07d.tar.bz2 |
* compat/strftime.c (_fmt): Fixed syst array intializer that
couldn't take variables within it under the watcom compiler.
I believe Borland has this strictness as well. VC++ must be
non-standard about this.
Diffstat (limited to 'compat/strftime.c')
-rw-r--r-- | compat/strftime.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/compat/strftime.c b/compat/strftime.c index d7c63d1..29e1ecf 100644 --- a/compat/strftime.c +++ b/compat/strftime.c @@ -10,7 +10,7 @@ * * Changes 2002 Copyright (c) 2002 ActiveState Corporation. * - * RCS: @(#) $Id: strftime.c,v 1.11 2003/05/18 19:48:26 kennykb Exp $ + * RCS: @(#) $Id: strftime.c,v 1.12 2003/08/27 19:06:54 davygrvy Exp $ */ /* @@ -47,7 +47,7 @@ */ #if defined(LIBC_SCCS) -static char *rcsid = "$Id: strftime.c,v 1.11 2003/05/18 19:48:26 kennykb Exp $"; +static char *rcsid = "$Id: strftime.c,v 1.12 2003/08/27 19:06:54 davygrvy Exp $"; #endif /* LIBC_SCCS */ #include <time.h> @@ -189,16 +189,15 @@ _fmt(format, t) #ifdef WIN32 #define BUF_SIZ 256 TCHAR buf[BUF_SIZ]; - SYSTEMTIME syst = { - t->tm_year + 1900, - t->tm_mon + 1, - t->tm_wday, - t->tm_mday, - t->tm_hour, - t->tm_min, - t->tm_sec, - 0, - }; + SYSTEMTIME syst; + syst.wYear = t->tm_year + 1900; + syst.wMonth = t->tm_mon + 1; + syst.wDayOfWeek = t->tm_wday; + syst.wDay = t->tm_mday; + syst.wHour = t->tm_hour; + syst.wMinute = t->tm_min; + syst.wSecond = t->tm_sec; + syst.wMilliseconds = 0; #endif for (; *format; ++format) { if (*format == '%') { |