Skip to content
Tcl Source Code Artifact [9d4b289210]
Login

Artifact [9d4b289210]

Artifact 9d4b289210d5a27a5ed2fdfd12140f1dbd1da96d:

Ticket change [9d4b289210] - New ticket [1841549fffffffff|1841549fff] <i>Compatibility issues about 32-bit integers and wide integers</i>. by nobody on 2007-11-30 09:19:47.
D 2007-11-30T09:19:47
J assignee nobody
J cmimetype text/plain
J comment Tcl8.4.12\sis\snot\scompatible\swith\sTcl8.3.2\sin\sthe\sfollowing\sexample,\sso\sI\nhave\sto\sfind\sa\sway\sto\smake\sthe\sresult\sequal.\n\nThe\sexample:\nset\svar1\s"-2147483647"\nif\s{\s$var1\s==\s0x80000001\s}\s{\nset\sres\s"ok";\n}\selse\s{\nset\sres\s"nok";\n}\n\nI\schecked\sthe\stcl8.4.12's\sconfigure\sfile\sand\smodified\sthe\sline\s4637\sto\slet\nthe\sconfigure\sprocess\salways\senters\sthe\s"if\scondition",so\nTCL_WIDE_INT_IS_LONG\sis\sdefined\sto\s1.\sAnd\sthen\smake\sand\smake\sinstall\sto\nbuild\sthe\stcl\slib.\s\n\n4637\s#if\stest\s"${tcl_cv_type_64bit}"\s=\snone\s;\sthen\n4638\sif\stest\s"test"\s=\s"test"\s;\sthen\n4639\scat\s>>\sconfdefs.h\s<<\\EOF\n4640\s#define\sTCL_WIDE_INT_IS_LONG\s1\n4641\sEOF\n4642\n4643\secho\s"$ac_t""using\slong"\s1>&6\n4644\selse\n4645\scat\s>>\sconfdefs.h\s<<EOF\n4646\s#define\sTCL_WIDE_INT_TYPE\s${tcl_cv_type_64bit}\n4647\sEOF\n\nI\stested\sin\slinux\sand\sHP\sunix,\sit\sruns\sas\sI\swish.But\sin\ssolaris\s8,\safter\sI\nbuild\sthe\stcl\slib\ssuccessfully,\sI\srun\smy\sapp\sand\sgot\sa\sTCL_ERROR\sin\sthe\nfunction\scall\sto\sTcl_GetIntFromObj,\sand\sthe\sline\sfrom\s1767~1774\sin\sfile\ngeneric/tclObj.c\sis\sthe\sfollowing:\n\nif\s((LLONG_MAX\s>\sUINT_MAX)\n&&\s((w\s>\sUINT_MAX)\s||\s(w\s<\s-(Tcl_WideInt)UINT_MAX)))\s{\nif\s(interp\s!=\sNULL)\s{\nTcl_SetObjResult(interp,\sTcl_NewStringObj(\n"integer\svalue\stoo\slarge\sto\srepresent\sas\snon-long\sinteger",\n-1));\n}\nreturn\sTCL_ERROR;\n\nThe\sconfigure\scommand\sI\suse\sin\ssolaris\s8\sis\s:\nenv\sCC=cc\s./configure\s--enable-threads\s--disable-64bit\s--disable-64bit-vis\n-prefix=/home/test/tcl8412\n\nAnyone\sprovide\sa\ssolution\sfor\sthe\sabove?\sThe\srequirement\sis\svery\ssimple:\njust\sto\smake\stcl8.4.12\sact\sas\sthe\ssame\sas\stcl8.3.2\sin\sthe\sabove\stcl\nscript.\n\nThanks\sand\sRegards\nJun\s
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem None
J title Compatibility\sissues\sabout\s32-bit\sintegers\sand\swide\sintegers
J type Bug
K 1841549fffffffffffffffffffffffffffffffff
U nobody
Z cd2273b77904f6db175a97f8fddf5f6d