summaryrefslogtreecommitdiffstats
path: root/win/tclWinTest.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinTest.c')
-rw-r--r--win/tclWinTest.c49
1 files changed, 23 insertions, 26 deletions
diff --git a/win/tclWinTest.c b/win/tclWinTest.c
index ac39678..91a3010 100644
--- a/win/tclWinTest.c
+++ b/win/tclWinTest.c
@@ -13,7 +13,11 @@
# define USE_TCL_STUBS
#endif
#include "tclInt.h"
-#include "tclTomMath.h"
+#ifdef TCL_WITH_EXTERNAL_TOMMATH
+# include "tommath.h"
+#else
+# include "tclTomMath.h"
+#endif
/*
* For TestplatformChmod on Windows
@@ -33,21 +37,14 @@
* Forward declarations of functions defined later in this file:
*/
-static int TesteventloopCmd(ClientData dummy, Tcl_Interp* interp,
- int objc, Tcl_Obj *const objv[]);
-static int TestvolumetypeCmd(ClientData dummy,
- Tcl_Interp *interp, int objc,
- Tcl_Obj *const objv[]);
-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 TesteventloopCmd;
+static Tcl_ObjCmdProc TestvolumetypeCmd;
+static Tcl_ObjCmdProc TestwinclockCmd;
+static Tcl_ObjCmdProc TestwinsleepCmd;
+static Tcl_ObjCmdProc TestSizeCmd;
static Tcl_ObjCmdProc TestExceptionCmd;
static int TestplatformChmod(const char *nativePath, int pmode);
-static int TestchmodCmd(ClientData dummy, Tcl_Interp* interp,
- int objc, Tcl_Obj *const objv[]);
+static Tcl_ObjCmdProc TestchmodCmd;
/*
*----------------------------------------------------------------------
@@ -105,7 +102,7 @@ TclplatformtestInit(
static int
TesteventloopCmd(
- ClientData clientData, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -181,7 +178,7 @@ TesteventloopCmd(
static int
TestvolumetypeCmd(
- ClientData clientData, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -247,7 +244,7 @@ TestvolumetypeCmd(
static int
TestwinclockCmd(
- ClientData dummy, /* Unused */
+ TCL_UNUSED(ClientData),
Tcl_Interp* interp, /* Tcl interpreter */
int objc, /* Argument count */
Tcl_Obj *const objv[]) /* Argument vector */
@@ -296,7 +293,7 @@ TestwinclockCmd(
static int
TestwinsleepCmd(
- ClientData clientData, /* Unused */
+ TCL_UNUSED(ClientData),
Tcl_Interp* interp, /* Tcl interpreter */
int objc, /* Parameter count */
Tcl_Obj *const * objv) /* Parameter vector */
@@ -316,11 +313,12 @@ TestwinsleepCmd(
static int
TestSizeCmd(
- ClientData clientData, /* Unused */
+ TCL_UNUSED(ClientData),
Tcl_Interp* interp, /* Tcl interpreter */
int objc, /* Parameter count */
Tcl_Obj *const * objv) /* Parameter vector */
{
+
if (objc != 2) {
goto syntax;
}
@@ -364,7 +362,7 @@ syntax:
static int
TestExceptionCmd(
- ClientData dummy, /* Unused */
+ TCL_UNUSED(ClientData),
Tcl_Interp* interp, /* Tcl interpreter */
int objc, /* Argument count */
Tcl_Obj *const objv[]) /* Argument vector */
@@ -417,7 +415,6 @@ TestExceptionCmd(
/* SMASH! */
RaiseException(exceptions[cmd], EXCEPTION_NONCONTINUABLE, 0, NULL);
- /* NOTREACHED */
return TCL_OK;
}
@@ -462,7 +459,7 @@ TestplatformChmod(
* nativePath not found
*/
- if (attr == 0xffffffff) {
+ if (attr == 0xFFFFFFFF) {
res = -1;
goto done;
}
@@ -494,7 +491,7 @@ TestplatformChmod(
goto done;
}
- secDesc = ckalloc(secDescLen);
+ secDesc = (BYTE *)ckalloc(secDescLen);
if (!GetFileSecurityA(nativePath, infoBits,
(PSECURITY_DESCRIPTOR) secDesc, secDescLen, &secDescLen2)
|| (secDescLen < secDescLen2)) {
@@ -506,7 +503,7 @@ TestplatformChmod(
* Get the World SID.
*/
- userSid = ckalloc(GetSidLengthRequired((UCHAR) 1));
+ userSid = (SID *)ckalloc(GetSidLengthRequired((UCHAR) 1));
InitializeSid(userSid, &userSidAuthority, (BYTE) 1);
*(GetSidSubAuthority(userSid, 0)) = SECURITY_WORLD_RID;
@@ -532,7 +529,7 @@ TestplatformChmod(
newAclSize = ACLSize.AclBytesInUse + sizeof(ACCESS_DENIED_ACE)
+ GetLengthSid(userSid) - sizeof(DWORD);
- newAcl = ckalloc(newAclSize);
+ newAcl = (PACL) ckalloc(newAclSize);
/*
* Initialize the new ACL.
@@ -653,7 +650,7 @@ TestplatformChmod(
static int
TestchmodCmd(
- ClientData dummy, /* Not used. */
+ TCL_UNUSED(ClientData),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Parameter count */
Tcl_Obj *const * objv) /* Parameter vector */