Skip to content
Tcl Source Code Artifact [c40cd30b32]
Login

Artifact [c40cd30b32]

Artifact c40cd30b32e29dbc14bec013d8dbb1d46cea7c96:

Ticket change [c40cd30b32] - New ticket [3508771fffffffff|3508771fff] <i>load tclreg.dll in cygwin tclsh</i>. by nijtmans on 2012-03-19 15:35:20.
D 2012-03-19T15:35:20
J assignee nijtmans
J cmimetype text/plain
J comment Using\sthe\sstubs\smechanism,\sit\sshould\sbe\spossible\sto\sload\stclreg.dll\n(compiled\swith\smingw\sor\svc++)\sin\sa\stclsh\scompiled\swith\scygwin.\nI\stried\sit,\sand\sit\salmost\sworks,\sbut\snot\squite.....\n\ntclreg.dll\scalls\sthe\sfunction\sTclWinGetPlatformId(),\sinits\sinit\nfunction:\n\s\s\s\sif\s(TclWinGetPlatformId()\s==\sVER_PLATFORM_WIN32_NT)\s{\nregWinProcs\s=\s&unicodeProcs;\n\s\s\s\s}\selse\s{\nregWinProcs\s=\s&asciiProcs;\n\s\s\s\s}\n\swhich\sresides\sin\sslot\s9\sof\stclIntPlatStubs.\sBut\ncygwin\suses\sthe\sUNIX\sstubs,\swhich\shas\sTclpCreateTempFile()\nin\sslot\s9.\sSo,\severything\sseems\sto\swork,\sbut\sin\sfact\sa\ntemporary\sfile\sis\screated,\sand\sa\shandle\sto\sit\nis\sreturned.\sThis\shandle\sis\s!=\sVER_PLATFORM_WIN32_NT,\nso\sthis\sinstructs\stclreg.dll\sto\suse\sthe\sASCII\svariants\nof\sthe\sregistry\sfunctions.\n\nSolution:\smove\sTclpCreateTempFile\sfrom\sslot\s9\nto\sslot\s22,\sand\sput\sTclWinGetPlatformId\sin\nslot\s9.\sOn\sUNIX,\sTclWinGetPlatformId\s\sdoes\snot\nexist,\sso\suse\ssome\s#define\sto\smap\sit\sback\nto\sTclpCreateTempFile\son\snon-cygwin.\n\nThe\ssame\spotential\sproblem\sexists\swith\nthe\sfunctions\sTcl_WinUtfToTChar\sand\nTcl_WinTCharToUtf,\swhich\sare\sin\sthe\npublic\sAPI.\sTclWinGetPlatformId\sis\snot\npublic,\sbut\sbecause\sit\sis\sused\sin\stclreg.dll\sI\nwould\slike\sto\smake\san\sexception\sfor\sthat.
J foundin obsolete:\s8.5.11
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter nijtmans
J subsystem 52.\sPortability\sSupport
J title load\stclreg.dll\sin\scygwin\stclsh
J type Bug
K 3508771fffffffffffffffffffffffffffffffff
U nijtmans
Z 56cdbf61ef4e179cecf591069975e221