diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2006-06-14 15:21:12 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2006-06-14 15:21:12 (GMT) |
commit | 509281cd2ab88a10a9e781f373d5e59f29f3bc79 (patch) | |
tree | b7f93c0f3fad3eccfb16e8fcd337ce453d85e1c7 /generic | |
parent | 0c32ed9ff184245f1517edf43a56d458a73b871f (diff) | |
download | tcl-509281cd2ab88a10a9e781f373d5e59f29f3bc79.zip tcl-509281cd2ab88a10a9e781f373d5e59f29f3bc79.tar.gz tcl-509281cd2ab88a10a9e781f373d5e59f29f3bc79.tar.bz2 |
Enable building Tcl with Microsoft's latest compiler offering
(VS2005). We have to handle a number of oddities as they have
deprecated most of the standard C library and now generate manifest
files to be linked into the binaries. SF bug #1424909
Diffstat (limited to 'generic')
-rw-r--r-- | generic/regerror.c | 10 | ||||
-rw-r--r-- | generic/tcl.h | 6 | ||||
-rw-r--r-- | generic/tclDate.c | 6 |
3 files changed, 13 insertions, 9 deletions
diff --git a/generic/regerror.c b/generic/regerror.c index aca13aa..182830d 100644 --- a/generic/regerror.c +++ b/generic/regerror.c @@ -50,8 +50,8 @@ static struct rerr { */ /* ARGSUSED */ size_t /* actual space needed (including NUL) */ -regerror(errcode, preg, errbuf, errbuf_size) -int errcode; /* error code, or REG_ATOI or REG_ITOA */ +regerror(code, preg, errbuf, errbuf_size) +int code; /* error code, or REG_ATOI or REG_ITOA */ CONST regex_t *preg; /* associated regex_t (unused at present) */ char *errbuf; /* result buffer (unless errbuf_size==0) */ size_t errbuf_size; /* available space in errbuf, can be 0 */ @@ -62,7 +62,7 @@ size_t errbuf_size; /* available space in errbuf, can be 0 */ size_t len; int icode; - switch (errcode) { + switch (code) { case REG_ATOI: /* convert name to number */ for (r = rerrs; r->code >= 0; r++) if (strcmp(r->name, errbuf) == 0) @@ -84,12 +84,12 @@ size_t errbuf_size; /* available space in errbuf, can be 0 */ break; default: /* a real, normal error code */ for (r = rerrs; r->code >= 0; r++) - if (r->code == errcode) + if (r->code == code) break; if (r->code >= 0) msg = r->explain; else { /* unknown; say so */ - sprintf(convbuf, unk, errcode); + sprintf(convbuf, unk, code); msg = convbuf; } break; diff --git a/generic/tcl.h b/generic/tcl.h index 5d7f192..f960ea0 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.153.2.24 2006/05/30 00:29:38 hobbs Exp $ + * RCS: @(#) $Id: tcl.h,v 1.153.2.25 2006/06/14 15:21:14 patthoyts Exp $ */ #ifndef _TCL @@ -385,7 +385,11 @@ typedef struct stati64 Tcl_StatBuf; # define TCL_LL_MODIFIER "L" # define TCL_LL_MODIFIER_SIZE 1 # else /* __BORLANDC__ */ +# if _MSC_VER < 1400 typedef struct _stati64 Tcl_StatBuf; +# else +typedef struct _stat64 Tcl_StatBuf; +# endif /* _MSC_VER < 1400 */ # define TCL_LL_MODIFIER "I64" # define TCL_LL_MODIFIER_SIZE 3 # endif /* __BORLANDC__ */ diff --git a/generic/tclDate.c b/generic/tclDate.c index e6a8a90..be6ec42 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDate.c,v 1.20.4.2 2005/11/04 20:15:09 kennykb Exp $ + * RCS: @(#) $Id: tclDate.c,v 1.20.4.3 2006/06/14 15:21:14 patthoyts Exp $ */ #include "tclInt.h" @@ -478,7 +478,7 @@ Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode, TimePtr) for (i = EPOCH; i < Year; i++) Julian += 365 + IsLeapYear(i); } else { - for (i = Year; i < EPOCH; i++) + for (i = (int)Year; i < EPOCH; i++) Julian -= 365 + IsLeapYear(i); } Julian *= SECSPERDAY; @@ -547,7 +547,7 @@ NamedMonth(Start, MonthOrdinal, MonthNumber) * doing next february from january gives us february of the current year) * set day to 1, time to 0 */ - tm->tm_year += MonthOrdinal; + tm->tm_year += (int)MonthOrdinal; if (tm->tm_mon < MonthNumber - 1) { tm->tm_year--; } |