diff options
author | sebres <sebres@users.sourceforge.net> | 2019-07-08 20:22:27 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2019-07-08 20:22:27 (GMT) |
commit | bd11687207ffad058dde0ebb6ab8ff9a88fb68db (patch) | |
tree | 685e36116ff1df8dad7061df85757f0029dbcd53 /win/tclWinTest.c | |
parent | 4b7f867f902413fdca08b3f4e7d6beb2158a851f (diff) | |
download | tcl-bd11687207ffad058dde0ebb6ab8ff9a88fb68db.zip tcl-bd11687207ffad058dde0ebb6ab8ff9a88fb68db.tar.gz tcl-bd11687207ffad058dde0ebb6ab8ff9a88fb68db.tar.bz2 |
fixes [4718b41c56] for windows x86 (mingw / MSVC versions with CRT supporting 64-bit time_t)
Diffstat (limited to 'win/tclWinTest.c')
-rw-r--r-- | win/tclWinTest.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/win/tclWinTest.c b/win/tclWinTest.c index 7f49b63..dd5a60e 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -39,6 +39,8 @@ static int TestwinclockCmd(ClientData dummy, Tcl_Interp* interp, int objc, Tcl_Obj *const objv[]); static int TestwinsleepCmd(ClientData dummy, Tcl_Interp* interp, int objc, Tcl_Obj *const objv[]); +static int TestSizeCmd(ClientData dummy, Tcl_Interp* interp, + int objc, Tcl_Obj *const objv[]); static Tcl_ObjCmdProc TestExceptionCmd; static int TestplatformChmod(const char *nativePath, int pmode); static int TestchmodCmd(ClientData dummy, @@ -76,6 +78,7 @@ TclplatformtestInit( Tcl_CreateObjCommand(interp, "testwinclock", TestwinclockCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testwinsleep", TestwinsleepCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testexcept", TestExceptionCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "testsize", TestSizeCmd, NULL, NULL); return TCL_OK; } @@ -309,6 +312,26 @@ TestwinsleepCmd( return TCL_OK; } +static int +TestSizeCmd( + ClientData clientData, /* Unused */ + Tcl_Interp* interp, /* Tcl interpreter */ + int objc, /* Parameter count */ + Tcl_Obj *const * objv) /* Parameter vector */ +{ + if (objc != 2) { + goto syntax; + } + if (strcmp(Tcl_GetString(objv[1]), "time_t") == 0) { + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(sizeof(time_t))); + return TCL_OK; + } + +syntax: + Tcl_WrongNumArgs(interp, 1, objv, "time_t"); + return TCL_ERROR; +} + /* *---------------------------------------------------------------------- * |