summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2006-09-26 00:05:02 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2006-09-26 00:05:02 (GMT)
commitd421cc6148b8573ae4284cb05be84eb936f44623 (patch)
treec0ac86f04e183856c29bf53794757d77eeea7dbc /generic
parent9ca74c27f3f89bb08b044b9bea127f0aa23fa9d5 (diff)
downloadtcl-d421cc6148b8573ae4284cb05be84eb936f44623.zip
tcl-d421cc6148b8573ae4284cb05be84eb936f44623.tar.gz
tcl-d421cc6148b8573ae4284cb05be84eb936f44623.tar.bz2
More fixing which struct stat to refer to. Some casts from time_t to int required.
Tcl_Time structure members are longs. Support for varying compiler options and build to platform-specific subdirs.
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.h6
-rw-r--r--generic/tclGetDate.y26
-rw-r--r--generic/tclTimer.c8
3 files changed, 20 insertions, 20 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index c32c063..657ab9d 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.214 2006/08/18 07:45:31 das Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.215 2006/09/26 00:05:02 patthoyts Exp $
*/
#ifndef _TCL
@@ -394,10 +394,10 @@ typedef struct stati64 Tcl_StatBuf;
# define TCL_LL_MODIFIER "L"
# define TCL_LL_MODIFIER_SIZE 1
# else /* __BORLANDC__ */
-# if _MSC_VER < 1400
+# if _MSC_VER < 1400 || !defined(_M_IX86)
typedef struct _stati64 Tcl_StatBuf;
# else
-typedef struct __stat64 Tcl_StatBuf;
+typedef struct _stat64 Tcl_StatBuf;
# endif /* _MSC_VER < 1400 */
# define TCL_LL_MODIFIER "I64"
# define TCL_LL_MODIFIER_SIZE 3
diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y
index 2351139..412410e 100644
--- a/generic/tclGetDate.y
+++ b/generic/tclGetDate.y
@@ -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: tclGetDate.y,v 1.30 2005/11/27 02:33:49 das Exp $
+ * RCS: @(#) $Id: tclGetDate.y,v 1.31 2006/09/26 00:05:03 patthoyts Exp $
*/
%{
@@ -934,17 +934,17 @@ TclClockOldscanObjCmd( clientData, interp, objc, objv )
resultElement = Tcl_NewObj();
if ( yyHaveDate ) {
Tcl_ListObjAppendElement( interp, resultElement,
- Tcl_NewIntObj( yyYear ) );
+ Tcl_NewIntObj( (int) yyYear ) );
Tcl_ListObjAppendElement( interp, resultElement,
- Tcl_NewIntObj( yyMonth ) );
+ Tcl_NewIntObj( (int) yyMonth ) );
Tcl_ListObjAppendElement( interp, resultElement,
- Tcl_NewIntObj( yyDay ) );
+ Tcl_NewIntObj( (int) yyDay ) );
}
Tcl_ListObjAppendElement( interp, result, resultElement );
if ( yyHaveTime ) {
Tcl_ListObjAppendElement( interp, result,
- Tcl_NewIntObj( ToSeconds( yyHour,
+ Tcl_NewIntObj( (int) ToSeconds( yyHour,
yyMinutes,
yySeconds,
yyMeridian ) ) );
@@ -955,7 +955,7 @@ TclClockOldscanObjCmd( clientData, interp, objc, objv )
resultElement = Tcl_NewObj();
if ( yyHaveZone ) {
Tcl_ListObjAppendElement( interp, resultElement,
- Tcl_NewIntObj( -yyTimezone ) );
+ Tcl_NewIntObj( (int) -yyTimezone ) );
Tcl_ListObjAppendElement( interp, resultElement,
Tcl_NewIntObj( 1-yyDSTmode ) );
}
@@ -964,29 +964,29 @@ TclClockOldscanObjCmd( clientData, interp, objc, objv )
resultElement = Tcl_NewObj();
if ( yyHaveRel ) {
Tcl_ListObjAppendElement( interp, resultElement,
- Tcl_NewIntObj( yyRelMonth ) );
+ Tcl_NewIntObj( (int) yyRelMonth ) );
Tcl_ListObjAppendElement( interp, resultElement,
- Tcl_NewIntObj( yyRelDay ) );
+ Tcl_NewIntObj( (int) yyRelDay ) );
Tcl_ListObjAppendElement( interp, resultElement,
- Tcl_NewIntObj( yyRelSeconds ) );
+ Tcl_NewIntObj( (int) yyRelSeconds ) );
}
Tcl_ListObjAppendElement( interp, result, resultElement );
resultElement = Tcl_NewObj();
if ( yyHaveDay && !yyHaveDate ) {
Tcl_ListObjAppendElement( interp, resultElement,
- Tcl_NewIntObj( yyDayOrdinal ) );
+ Tcl_NewIntObj( (int) yyDayOrdinal ) );
Tcl_ListObjAppendElement( interp, resultElement,
- Tcl_NewIntObj( yyDayNumber ) );
+ Tcl_NewIntObj( (int) yyDayNumber ) );
}
Tcl_ListObjAppendElement( interp, result, resultElement );
resultElement = Tcl_NewObj();
if ( yyHaveOrdinalMonth ) {
Tcl_ListObjAppendElement( interp, resultElement,
- Tcl_NewIntObj( yyMonthOrdinal ) );
+ Tcl_NewIntObj( (int) yyMonthOrdinal ) );
Tcl_ListObjAppendElement( interp, resultElement,
- Tcl_NewIntObj( yyMonth ) );
+ Tcl_NewIntObj( (int) yyMonth ) );
}
Tcl_ListObjAppendElement( interp, result, resultElement );
diff --git a/generic/tclTimer.c b/generic/tclTimer.c
index b867287..49e0e6e 100644
--- a/generic/tclTimer.c
+++ b/generic/tclTimer.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTimer.c,v 1.22 2005/12/13 22:43:18 kennykb Exp $
+ * RCS: @(#) $Id: tclTimer.c,v 1.23 2006/09/26 00:05:03 patthoyts Exp $
*/
#include "tclInt.h"
@@ -860,8 +860,8 @@ Tcl_AfterObjCmd(
afterPtr->id = tsdPtr->afterId;
tsdPtr->afterId += 1;
Tcl_GetTime(&wakeup);
- wakeup.sec += (time_t)(ms / 1000);
- wakeup.usec += ((int)(ms % 1000)) * 1000;
+ wakeup.sec += (long)(ms / 1000);
+ wakeup.usec += ((long)(ms % 1000)) * 1000;
if (wakeup.usec > 1000000) {
wakeup.sec++;
wakeup.usec -= 1000000;
@@ -1004,7 +1004,7 @@ AfterDelay(
Tcl_WideInt diff;
Tcl_GetTime(&endTime);
- endTime.sec += (time_t)(ms/1000);
+ endTime.sec += (long)(ms/1000);
endTime.usec += ((int)(ms%1000))*1000;
if (endTime.usec >= 1000000) {
endTime.sec++;