Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2010-11-04
04:49 • Closed ticket [3102483fff]: Incorrect tcl_platform(machine) value on 64-bit Wind... artifact: d2c11f4fe7 user: hobbs
04:49 • Ticket [3102483fff]: 4 changes artifact: feb1fadfa7 user: hobbs
04:37 • Add attachment tclWinInit-Patched.c to ticket [3102483fffffffff|3102483... artifact: d1d30cb60d user: obermeier
04:37 • Ticket [3102483fff] Incorrect tcl_platform(machine) value on 64-bit Windows7... artifact: 3edb765c2e user: obermeier
2010-11-03
21:37 • New ticket [3102483fff]. artifact: 9a2ebb8141 user: obermeier

Incorrect tcl_platform(machine) value on 64-bit Windows7

Closed / Invalid3102483fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 16 years ago
Descriptionplain2010-11-03 21:37:23
Active Tcl 8.5.8 returns the following information on my Windows7 64-bit system:

% info pa
8.5.8
% parray tcl_platform
tcl_platform(byteOrder)   = littleEndian
tcl_platform(machine)     = intel
tcl_platform(os)          = Windows NT
tcl_platform(osVersion)   = 6.1
tcl_platform(platform)    = windows
tcl_platform(pointerSize) = 4
tcl_platform(threaded)    = 1
tcl_platform(user)        = paul
tcl_platform(wordSize)    = 4

The info in doubt is tcl_platform(machine).
It seems, that the function GetSystemInfo as used in TclpSetVariables
(file tclWinInit.c) does not work as expected.

If using function GetNativeSystemInfo instead (as described in 
http://msdn.microsoft.com/en-us/library/ms724429%28v=VS.85%29.aspx)
I get the following output, which seems more reasonable:

% info pa
8.5.8
% parray tcl_platform
tcl_platform(byteOrder)   = littleEndian
tcl_platform(machine)     = amd64
tcl_platform(os)          = Windows NT
tcl_platform(osVersion)   = 6.1
tcl_platform(platform)    = windows
tcl_platform(pointerSize) = 4
tcl_platform(user)        = paul
tcl_platform(wordSize)    = 4

Attached is the patched TclpSetVariables function.

The problem described applies to all 8.5 and 8.6 versions.
obermeierplain2010-11-04 04:37:24
File Added - 392155: tclWinInit-Patched.c
hobbsplain2010-11-04 04:49:57
It is returning the correct information.  While your native system may be amd64 (64-bit), you are running the 32-bit ActiveTcl.  Download the 64-bit ActiveTcl for different results.  You should more importantly see pointerSize be 8 in 64-bit AT.
hobbsplain2010-11-04 04:49:58
allow_comments - 1
Log in (anonymous is fine) to add a comment.

Attachments: