summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclCompCmdsSZ.c1
-rw-r--r--generic/tclIOUtil.c4
-rw-r--r--generic/tclStubInit.c10
-rw-r--r--generic/tclZipfs.c4
-rw-r--r--unix/tclUnixThrd.c4
-rw-r--r--win/tclWinInit.c12
6 files changed, 21 insertions, 14 deletions
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index db51890..f665e0a 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -694,6 +694,7 @@ TclCompileStringIsCmd(
OP( LNOT);
return TCL_OK;
}
+ break;
case STR_IS_DOUBLE: {
int satisfied, isEmpty;
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 28e1df5..622fec6 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -171,7 +171,7 @@ const Tcl_Filesystem tclNativeFilesystem = {
TclpObjCopyDirectory,
TclpObjLstat,
/* Needs casts since we're using version_2. */
- (Tcl_FSLoadFileProc *) TclpDlopen,
+ (Tcl_FSLoadFileProc *)(void *) TclpDlopen,
(Tcl_FSGetCwdProc *) TclpGetNativeCwd,
TclpObjChdir
};
@@ -3176,7 +3176,7 @@ Tcl_LoadFile(
}
if (fsPtr->loadFileProc != NULL) {
- int retVal = ((Tcl_FSLoadFileProc2 *)(fsPtr->loadFileProc))
+ int retVal = ((Tcl_FSLoadFileProc2 *)(void *)(fsPtr->loadFileProc))
(interp, pathPtr, handlePtr, &unloadProcPtr, flags);
if (retVal == TCL_OK) {
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 6983113..c1daddf 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -151,7 +151,7 @@ static mp_err TclBN_mp_set_long(mp_int *a, unsigned long i)
return MP_OKAY;
}
-#define TclBN_mp_set_ul (void (*)(mp_int *a, unsigned long i))TclBN_mp_set_long
+#define TclBN_mp_set_ul (void (*)(mp_int *a, unsigned long i))(void *)TclBN_mp_set_long
mp_err MP_WUR TclBN_mp_expt_u32(const mp_int *a, unsigned int b, mp_int *c) {
return mp_expt_u32(a, b, c);
@@ -483,19 +483,19 @@ static int exprIntObj(Tcl_Interp *interp, Tcl_Obj*expr, int *ptr){
static int uniCharNcmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned int n){
return Tcl_UniCharNcmp(ucs, uct, (unsigned long)n);
}
-#define Tcl_UniCharNcmp (int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long))uniCharNcmp
+#define Tcl_UniCharNcmp (int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long))(void *)uniCharNcmp
static int utfNcmp(const char *s1, const char *s2, unsigned int n){
return Tcl_UtfNcmp(s1, s2, (unsigned long)n);
}
-#define Tcl_UtfNcmp (int(*)(const char*,const char*,unsigned long))utfNcmp
+#define Tcl_UtfNcmp (int(*)(const char*,const char*,unsigned long))(void *)utfNcmp
static int utfNcasecmp(const char *s1, const char *s2, unsigned int n){
return Tcl_UtfNcasecmp(s1, s2, (unsigned long)n);
}
-#define Tcl_UtfNcasecmp (int(*)(const char*,const char*,unsigned long))utfNcasecmp
+#define Tcl_UtfNcasecmp (int(*)(const char*,const char*,unsigned long))(void *)utfNcasecmp
static int uniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned int n){
return Tcl_UniCharNcasecmp(ucs, uct, (unsigned long)n);
}
-#define Tcl_UniCharNcasecmp (int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long))uniCharNcasecmp
+#define Tcl_UniCharNcasecmp (int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long))(void *)uniCharNcasecmp
#endif /* TCL_WIDE_INT_IS_LONG */
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index 393db5c..9aa26d9 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -430,7 +430,7 @@ static const Tcl_Filesystem zipfsFilesystem = {
NULL, /* renameFileProc */
NULL, /* copyDirectoryProc */
NULL, /* lstatProc */
- (Tcl_FSLoadFileProc *) ZipFSLoadFile,
+ (Tcl_FSLoadFileProc *)(void *)ZipFSLoadFile,
NULL, /* getCwdProc */
NULL, /* chdirProc */
};
@@ -4696,7 +4696,7 @@ ZipFSLoadFile(
Tcl_DecrRefCount(objs[1]);
}
- loadFileProc = (Tcl_FSLoadFileProc2 *) tclNativeFilesystem.loadFileProc;
+ loadFileProc = (Tcl_FSLoadFileProc2 *)(void *)tclNativeFilesystem.loadFileProc;
if (loadFileProc) {
ret = loadFileProc(interp, path, loadHandle, unloadProcPtr, flags);
} else {
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 35eca8d..054a5d2 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -266,9 +266,9 @@ TclpThreadCreate(
}
if (pthread_create(&theThread, &attr,
- (void * (*)(void *)) proc, (void *) clientData) &&
+ (void * (*)(void *))(void *)proc, (void *) clientData) &&
pthread_create(&theThread, NULL,
- (void * (*)(void *)) proc, (void *) clientData)) {
+ (void * (*)(void *))(void *)proc, (void *) clientData)) {
result = TCL_ERROR;
} else {
*idPtr = (Tcl_ThreadId) theThread;
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 0d37d1a..09e98e2 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -454,10 +454,16 @@ const char *
Tcl_GetEncodingNameFromEnvironment(
Tcl_DString *bufPtr)
{
+ UINT acp = GetACP();
+
Tcl_DStringInit(bufPtr);
- Tcl_DStringSetLength(bufPtr, 2+TCL_INTEGER_SPACE);
- wsprintfA(Tcl_DStringValue(bufPtr), "cp%d", GetACP());
- Tcl_DStringSetLength(bufPtr, strlen(Tcl_DStringValue(bufPtr)));
+ if (acp == CP_UTF8) {
+ Tcl_DStringAppend(bufPtr, "utf-8", 5);
+ } else {
+ Tcl_DStringSetLength(bufPtr, 2+TCL_INTEGER_SPACE);
+ wsprintfA(Tcl_DStringValue(bufPtr), "cp%d", GetACP());
+ Tcl_DStringSetLength(bufPtr, strlen(Tcl_DStringValue(bufPtr)));
+ }
return Tcl_DStringValue(bufPtr);
}