Overview
| Artifact ID: | b1869cc35b0f7f381a112651465bcbf486f62aed |
|---|---|
| Ticket: | 219230ffffffffffffffffffffffffffffffffff
tcl_platform(debug) is not defined under UNIX |
| User & Date: | jan.nijtmans on 2013-07-02 12:59:53 |
Changes
- assignee changed to: "jhobbs"
- closedate changed to: "2456476.04159678"
- closer changed to: "jan.nijtmans"
- 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 - icomment:
TIP #59 now has another way to embed this kind of information
- login: "jan.nijtmans"
- mimetype: "text/plain"
- resolution changed to: "Out of Date"
- severity changed to: "Minor"
- status changed to: "Closed"