diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-10-23 13:23:08 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-10-23 13:23:08 (GMT) |
commit | c0effc5b466fcb017bc6e0df6ae33cd33738fb50 (patch) | |
tree | 81f40be301861307cd07b4041705bdfe76f212a7 /win | |
parent | 15f27ca8f22cf02047544fa5d06f227d9f1d14f8 (diff) | |
parent | e9b584f81b87c299c819443f22bc5a81b20fff38 (diff) | |
download | tcl-c0effc5b466fcb017bc6e0df6ae33cd33738fb50.zip tcl-c0effc5b466fcb017bc6e0df6ae33cd33738fb50.tar.gz tcl-c0effc5b466fcb017bc6e0df6ae33cd33738fb50.tar.bz2 |
merge trunk
Diffstat (limited to 'win')
-rw-r--r-- | win/Makefile.in | 5 | ||||
-rwxr-xr-x | win/configure | 2 | ||||
-rw-r--r-- | win/configure.ac | 2 | ||||
-rw-r--r-- | win/makefile.vc | 5 | ||||
-rw-r--r-- | win/nmakehlp.c | 10 | ||||
-rw-r--r-- | win/tclAppInit.c | 4 | ||||
-rw-r--r-- | win/tclWinFCmd.c | 4 | ||||
-rw-r--r-- | win/tclWinLoad.c | 30 | ||||
-rw-r--r-- | win/tclWinPipe.c | 12 |
9 files changed, 56 insertions, 18 deletions
diff --git a/win/Makefile.in b/win/Makefile.in index 3f5970b..4132337 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -329,6 +329,9 @@ TOMMATH_OBJS = \ bn_mp_exch.${OBJEXT} \ bn_mp_expt_d.${OBJEXT} \ bn_mp_expt_d_ex.${OBJEXT} \ + bn_mp_get_int.${OBJEXT} \ + bn_mp_get_long.${OBJEXT} \ + bn_mp_get_long_long.${OBJEXT} \ bn_mp_grow.${OBJEXT} \ bn_mp_init.${OBJEXT} \ bn_mp_init_copy.${OBJEXT} \ @@ -353,6 +356,8 @@ TOMMATH_OBJS = \ bn_mp_rshd.${OBJEXT} \ bn_mp_set.${OBJEXT} \ bn_mp_set_int.${OBJEXT} \ + bn_mp_set_long.${OBJEXT} \ + bn_mp_set_long_long.${OBJEXT} \ bn_mp_shrink.${OBJEXT} \ bn_mp_sqr.${OBJEXT} \ bn_mp_sqrt.${OBJEXT} \ diff --git a/win/configure b/win/configure index d0431cb..fdd3adb 100755 --- a/win/configure +++ b/win/configure @@ -2102,7 +2102,7 @@ SHELL=/bin/sh TCL_VERSION=8.7 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=7 -TCL_PATCH_LEVEL="a0" +TCL_PATCH_LEVEL="a2" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.4 diff --git a/win/configure.ac b/win/configure.ac index 2821bc3..d03695c 100644 --- a/win/configure.ac +++ b/win/configure.ac @@ -14,7 +14,7 @@ SHELL=/bin/sh TCL_VERSION=8.7 TCL_MAJOR_VERSION=8 TCL_MINOR_VERSION=7 -TCL_PATCH_LEVEL="a0" +TCL_PATCH_LEVEL="a2" VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION TCL_DDE_VERSION=1.4 diff --git a/win/makefile.vc b/win/makefile.vc index 480a0ef..d8efcd8 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -384,6 +384,9 @@ TOMMATHOBJS = \ $(TMP_DIR)\bn_mp_exch.obj \
$(TMP_DIR)\bn_mp_expt_d.obj \
$(TMP_DIR)\bn_mp_expt_d_ex.obj \
+ $(TMP_DIR)\bn_mp_get_int.obj \
+ $(TMP_DIR)\bn_mp_get_long.obj \
+ $(TMP_DIR)\bn_mp_get_long_long.obj \
$(TMP_DIR)\bn_mp_grow.obj \
$(TMP_DIR)\bn_mp_init.obj \
$(TMP_DIR)\bn_mp_init_copy.obj \
@@ -408,6 +411,8 @@ TOMMATHOBJS = \ $(TMP_DIR)\bn_mp_rshd.obj \
$(TMP_DIR)\bn_mp_set.obj \
$(TMP_DIR)\bn_mp_set_int.obj \
+ $(TMP_DIR)\bn_mp_set_long.obj \
+ $(TMP_DIR)\bn_mp_set_long_long.obj \
$(TMP_DIR)\bn_mp_shrink.obj \
$(TMP_DIR)\bn_mp_sqr.obj \
$(TMP_DIR)\bn_mp_sqrt.obj \
diff --git a/win/nmakehlp.c b/win/nmakehlp.c index 22b7b06..0439d1c 100644 --- a/win/nmakehlp.c +++ b/win/nmakehlp.c @@ -74,6 +74,7 @@ main( char msg[300]; DWORD dwWritten; int chars; + char *s; /* * Make sure children (cl.exe and link.exe) are kept quiet. @@ -153,8 +154,13 @@ main( &dwWritten, NULL); return 0; } - printf("%s\n", GetVersionFromFile(argv[2], argv[3], *(argv[1]+2) - '0')); - return 0; + s = GetVersionFromFile(argv[2], argv[3], *(argv[1]+2) - '0'); + if (s && *s) { + printf("%s\n", s); + return 0; + } else + return 1; /* Version not found. Return non-0 exit code */ + case 'Q': if (argc != 3) { chars = snprintf(msg, sizeof(msg) - 1, diff --git a/win/tclAppInit.c b/win/tclAppInit.c index e06eaf5..ef9f98b 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -263,8 +263,8 @@ setargv( } /* Make sure we don't call ckalloc through the (not yet initialized) stub table */ - #undef Tcl_Alloc - #undef Tcl_DbCkalloc +# undef Tcl_Alloc +# undef Tcl_DbCkalloc argSpace = ckalloc(size * sizeof(char *) + (_tcslen(cmdLine) * sizeof(TCHAR)) + sizeof(TCHAR)); diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 01af950..319ecf9 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -1611,13 +1611,11 @@ ConvertFileNameFormat( for (i = 0; i < pathc; i++) { Tcl_Obj *elt; char *pathv; - size_t pathLen; Tcl_ListObjIndex(NULL, splitPath, i, &elt); pathv = TclGetString(elt); - pathLen = elt->length; - if ((pathv[0] == '/') || ((pathLen == 3) && (pathv[1] == ':')) + if ((pathv[0] == '/') || ((elt->length == 3) && (pathv[1] == ':')) || (strcmp(pathv, ".") == 0) || (strcmp(pathv, "..") == 0)) { /* * Handle "/", "//machine/export", "c:/", "." or ".." by just diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index 26512b1..27eb8f3 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -66,6 +66,7 @@ TclpDlopen( HINSTANCE hInstance; const TCHAR *nativeName; Tcl_LoadHandle handlePtr; + DWORD firstError; /* * First try the full path the user gave us. This is particularly @@ -84,6 +85,12 @@ TclpDlopen( Tcl_DString ds; + /* + * Remember the first error on load attempt to be used if the + * second load attempt below also fails. + */ + firstError = GetLastError(); + nativeName = Tcl_WinUtfToTChar(Tcl_GetString(pathPtr), -1, &ds); hInstance = LoadLibraryEx(nativeName, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); @@ -91,8 +98,21 @@ TclpDlopen( } if (hInstance == NULL) { - DWORD lastError = GetLastError(); - Tcl_Obj *errMsg = Tcl_ObjPrintf("couldn't load library \"%s\": ", + DWORD lastError; + Tcl_Obj *errMsg; + + /* + * We choose to only use the error from the second call if the first + * call failed due to the file not being found. Else stick to the + * first error for reporting purposes. + */ + if (firstError == ERROR_MOD_NOT_FOUND || + firstError == ERROR_DLL_NOT_FOUND) + lastError = GetLastError(); + else + lastError = firstError; + + errMsg = Tcl_ObjPrintf("couldn't load library \"%s\": ", Tcl_GetString(pathPtr)); /* @@ -129,7 +149,11 @@ TclpDlopen( Tcl_AppendToObj(errMsg, "the library initialization" " routine failed", -1); break; - default: + case ERROR_BAD_EXE_FORMAT: + Tcl_SetErrorCode(interp, "WIN_LOAD", "BAD_EXE_FORMAT", NULL); + Tcl_AppendToObj(errMsg, "Bad exe format. Possibly a 32/64-bit mismatch.", -1); + break; + default: TclWinConvertError(lastError); Tcl_AppendToObj(errMsg, Tcl_PosixError(interp), -1); } diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 4b372a5..5f1aa70 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -3392,11 +3392,11 @@ TclPipeThreadStop( SetEvent(pipeTI->evWakeUp); } CloseHandle(pipeTI->evControl); - #ifndef _PTI_USE_CKALLOC +# ifndef _PTI_USE_CKALLOC free(pipeTI); - #else +# else ckfree(pipeTI); - #endif +# endif } } @@ -3440,13 +3440,13 @@ TclPipeThreadExit( if (pipeTI->evWakeUp) { SetEvent(pipeTI->evWakeUp); } - #ifndef _PTI_USE_CKALLOC +# ifndef _PTI_USE_CKALLOC free(pipeTI); - #else +# else ckfree(pipeTI); /* be sure all subsystems used are finalized */ Tcl_FinalizeThread(); - #endif +# endif } } |