From 097b4b7f2e14a0d47f82c9d8b7579bee651660b4 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Fri, 15 Feb 2002 19:58:28 +0000 Subject: * tclExecute.c: * tclIOGT.c: * tclIndexObj.c: Touchups to the TIP 72 patch to make it compileable under Windows again. The changes are not complete, there is one nasty regarding _stati64 --- ChangeLog | 8 ++++++++ generic/tclExecute.c | 4 ++-- generic/tclIOGT.c | 4 ++-- generic/tclIndexObj.c | 8 ++++++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8145081..8591a93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-02-15 Andreas Kupries + + * tclExecute.c: + * tclIOGT.c: + * tclIndexObj.c: Touchups to the TIP 72 patch to make it + compileable under Windows again. The changes are not complete, + there is one nasty regarding _stati64 + 2002-02-15 Donal K. Fellows +----------------------+ diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 546f000..21eb610 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.47 2002/02/15 14:28:49 dkf Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.48 2002/02/15 19:58:28 andreas_kupries Exp $ */ #include "tclInt.h" @@ -5781,7 +5781,7 @@ ExprCallMathFunc(interp, eePtr, objc, objv) Tcl_WideInt w = valuePtr->internalRep.wideValue; if (mathFuncPtr->argTypes[k] == TCL_DOUBLE) { args[k].type = TCL_DOUBLE; - args[k].wideValue = Tcl_WideAsDouble(w); + args[k].wideValue = (Tcl_WideInt) Tcl_WideAsDouble(w); } else if (mathFuncPtr->argTypes[k] == TCL_INT) { args[k].type = TCL_INT; args[k].wideValue = Tcl_WideAsLong(w); diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c index c48ce18..022ba35 100644 --- a/generic/tclIOGT.c +++ b/generic/tclIOGT.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. * - * CVS: $Id: tclIOGT.c,v 1.5 2002/02/15 14:28:49 dkf Exp $ + * CVS: $Id: tclIOGT.c,v 1.6 2002/02/15 19:58:28 andreas_kupries Exp $ */ #include "tclInt.h" @@ -850,7 +850,7 @@ TransformSeekProc (instanceData, offset, mode, errorCodePtr) int mode; /* How to move */ int* errorCodePtr; /* Location of error flag. */ { - int result; + Tcl_WideInt result; TransformChannelData* dataPtr = (TransformChannelData*) instanceData; Tcl_Channel parent = Tcl_GetStackedChannel(dataPtr->self); Tcl_ChannelType* parentType = Tcl_GetChannelType(parent); diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 4b5dfe4..eab6b96 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.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: tclIndexObj.c,v 1.13 2002/02/15 14:28:49 dkf Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.14 2002/02/15 19:58:28 andreas_kupries Exp $ */ #include "tclInt.h" @@ -63,6 +63,10 @@ typedef struct { #ifdef __sparc # define STRING_AT(table, offset, index) \ (*((CONST char * CONST *)(((char *)(table)) + ((offset) * (index))))) + +#elif defined (WIN32) +# define STRING_AT(table, offset, index) \ + (*((CONST char * CONST *)(((char *)(table)) + ((offset) * (index))))) #else # define STRING_AT(table, offset, index) \ (*((CONST char * CONST *)(((VOID *)(table)) + (ptrdiff_t)((offset) * (index))))) @@ -266,7 +270,7 @@ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags, objPtr->internalRep.otherValuePtr = (VOID *) indexRep; objPtr->typePtr = &tclIndexType; } - indexRep->tablePtr = tablePtr; + indexRep->tablePtr = (VOID*) tablePtr; indexRep->offset = offset; indexRep->index = index; -- cgit v0.12