Overview
| Artifact ID: | 3e139ff1231442e565e22bfb5a765fb35b7f21eb |
|---|---|
| Ticket: | 219230ffffffffffffffffffffffffffffffffff
tcl_platform(debug) is not defined under UNIX |
| User & Date: | nobody on 2000-10-26 05:03:53 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 4263 RFE Version: 8.3 SubmitDate: '2000-02-28' LastModified: '2000-03-01' Severity: CRIT Status: Assigned Submitter: techsupp ChangedBy: hobbs OS: Linux-Red Hat FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: mo Comments: This patch makes the UNIX build define tcl_platform(debug) just like the windows verison. I am not sure if this is the "right" way to do it, but it works. ReproducibleScript: When Tcl is compiled with the --enable-symbols flag, the tcl_platform(debug) is not set. This same var is set under Windows when compiling with debug on. Any script that looks for tcl_platform(debug) will break when run under unix. Patch: Index: unix/tcl.m4 =================================================================== RCS file: /cvsroot/tcl/unix/tcl.m4,v retrieving revision 1.20 diff -u -r1.20 tcl.m4 --- tcl.m42000/02/10 08:55:321.20 +++ tcl.m42000/02/28 21:24:51 @@ -575,7 +575,7 @@ TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' ECHO_VERSION='`echo ${VERSION}`' TCL_LIB_VERSIONS_OK=ok - CFLAGS_DEBUG=-g + CFLAGS_DEBUG="-g -D_DEBUG" CFLAGS_OPTIMIZE=-O if test "$using_gcc" = "yes" ; then CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int" Index: unix/tclUnixInit.c =================================================================== RCS file: /cvsroot/tcl/unix/tclUnixInit.c,v retrieving revision 1.18 diff -u -r1.18 tclUnixInit.c --- tclUnixInit.c1999/10/13 00:32:491.18 +++ tclUnixInit.c2000/02/28 21:24:51 @@ -580,6 +580,18 @@ Tcl_SetVar2(interp, "tcl_platform", "osVersion", "", TCL_GLOBAL_ONLY); Tcl_SetVar2(interp, "tcl_platform", "machine", "", TCL_GLOBAL_ONLY); } + +#ifdef _DEBUG + /* + * The existence of the "debug" element of the tcl_platform array indicates + * that this particular Tcl shell has been compiled with debug information. + * Using "info exists tcl_platform(debug)" a Tcl script can direct the + * interpreter to load debug versions of shared libs with the load command. + */ + + Tcl_SetVar2(interp, "tcl_platform", "debug", "1", + TCL_GLOBAL_ONLY); +#endif /* * Copy USER or LOGNAME environment variable into tcl_platform(user) PatchFiles: unix/tclUnixInit.c unix/tcl.m4 It's noted under tclvars in the docs that tcl_platform(debug) is only defined on Windows, so I've changed this to RFE. -- 03/01/2000 hobbs -- 03/01/2000 hobbs - foundin changed to: "obsolete: 8.3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "07. Variables"
- title changed to: "tcl_platform(debug) is not defined under UNIX"
- type changed to: "RFE"