tcl 8.2 and tk 8.2 do not compile on SunOS 4.1.4 using cc(1)
Closed / Fixed218948ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:08:30
OriginalBugID: 2882 Bug
Version: 8.2
SubmitDate: '1999-09-24'
LastModified: '2000-04-14'
Severity: CRIT
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: SunOS
OSVersion: 4.1.4
Machine: Sparc
FixedDate: '2000-04-14'
FixedInVersion: 8.3.1
ClosedDate: '2000-10-25'
Name:
H. Garavel
CustomShell:
None patch was applied, except the 8 above ones
ReproducibleScript:
Both TCL 8.2 and TK 8.2 fail to compile under SunOS 4.1.4 using the
standard C compiler "cc" provided in this operating systems.
DesiredBehavior:
Being able to compile properly is a minimal requirement
Patch:
-------------------------------------------------------------------------------
*** tcl8.2.0/generic/tcl.h
-------------------------------------------------------------------------------
PROBLEM: there are conflicts between stubs definitions and macro-definitions
sharing the same identifiers. This occurs for TCL_THREADS,
TCL_MEM_DEBUG, TCL_NO_DEPRECATED, etc.
SOLUTION: the idea is to move pieces of code forward in the tcl.h file
This solves the problem for SunOS 4.1.4, but it may create problems
for other architectures
PATCH:
156,167d155
< /*
< * Macros that eliminate the overhead of the thread synchronization
< * functions when compiling without thread support.
< */
<
< #ifndef TCL_THREADS
< #define Tcl_MutexLock(mutexPtr)
< #define Tcl_MutexUnlock(mutexPtr)
< #define Tcl_ConditionNotify(condPtr)
< #define Tcl_ConditionWait(condPtr, mutexPtr, timePtr)
< #endif /* TCL_THREADS */
<
1126,1155d1113
< * The following declarations either map ckalloc and ckfree to
< * malloc and free, or they map them to procedures with all sorts
< * of debugging hooks defined in tclCkalloc.c.
< */
<
< #ifdef TCL_MEM_DEBUG
<
< # define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
< # define ckfree(x) Tcl_DbCkfree(x, __FILE__, __LINE__)
< # define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
<
< #else /* !TCL_MEM_DEBUG */
<
< /*
< * If we are not using the debugging allocator, we should call the
< * Tcl_Alloc, et al. routines in order to guarantee that every module
< * is using the same memory allocator both inside and outside of the
< * Tcl library.
< */
<
< # define ckalloc(x) Tcl_Alloc(x)
< # define ckfree(x) Tcl_Free(x)
< # define ckrealloc(x,y) Tcl_Realloc(x,y)
< # define Tcl_InitMemory(x)
< # define Tcl_DumpActiveMemory(x)
< # define Tcl_ValidateAllMemory(x,y)
<
< #endif /* !TCL_MEM_DEBUG */
<
< /*
1540,1549d1497
< * Deprecated Tcl procedures:
< */
<
< #ifndef TCL_NO_DEPRECATED
< #define Tcl_EvalObj(interp,objPtr) Tcl_EvalObjEx((interp),(objPtr),0)
< #define Tcl_GlobalEvalObj(interp,objPtr) < Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL)
< #endif
<
< /*
1602a1551,1602
> * Macros that eliminate the overhead of the thread synchronization
> * functions when compiling without thread support.
> */
>
> #ifndef TCL_THREADS
> #define Tcl_MutexLock(mutexPtr)
> #define Tcl_MutexUnlock(mutexPtr)
> #define Tcl_ConditionNotify(condPtr)
> #define Tcl_ConditionWait(condPtr, mutexPtr, timePtr)
> #endif /* TCL_THREADS */
>
> /*
> * The following declarations either map ckalloc and ckfree to
> * malloc and free, or they map them to procedures with all sorts
> * of debugging hooks defined in tclCkalloc.c.
> */
>
> #ifdef TCL_MEM_DEBUG
>
> # define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
> # define ckfree(x) Tcl_DbCkfree(x, __FILE__, __LINE__)
> # define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
>
> #else /* !TCL_MEM_DEBUG */
>
> /*
> * Deprecated Tcl procedures:
> */
>
> #ifndef TCL_NO_DEPRECATED
> #define Tcl_EvalObj(interp,objPtr) Tcl_EvalObjEx((interp),(objPtr),0)
> #define Tcl_GlobalEvalObj(interp,objPtr) > Tcl_EvalObjEx((interp),(objPtr),TCL_EVAL_GLOBAL)
> #endif
>
> /*
> * If we are not using the debugging allocator, we should call the
> * Tcl_Alloc, et al. routines in order to guarantee that every module
> * is using the same memory allocator both inside and outside of the
> * Tcl library.
> */
>
> # define ckalloc(x) Tcl_Alloc(x)
> # define ckfree(x) Tcl_Free(x)
> # define ckrealloc(x,y) Tcl_Realloc(x,y)
> # define Tcl_InitMemory(x)
> # define Tcl_DumpActiveMemory(x)
> # define Tcl_ValidateAllMemory(x,y)
>
> #endif /* !TCL_MEM_DEBUG */
>
> /*
-------------------------------------------------------------------------------
*** tcl8.2.0/generic/tclBasic.c.ORIG
PROBLEM: macros "minor" and "major" already exist in SunOS 4.1.4 standard
includes
SOLUTION: #undef them in TCL source code
PATCH
4199a4200,4203
> /* to avoid conflicts with macros "minor" and "major" defined in /usr/include/sys/sysmacros.h and /usr/include/sys/mkdev.h under SunOS 4.1.4 */
> #undef major
> #undef minor
-------------------------------------------------------------------------------
*** tcl8.2.0/generic/tclStubInit.c.ORIG
PROBLEM: the compiler fails to compile
SOLUTION: add missing #undefs
34a35,42
> #undef Tcl_EvalObj
> #undef Tcl_GlobalEvalObj
> #undef Tcl_InitMemory
> #undef Tcl_MutexLock
> #undef Tcl_MutexUnlock
> #undef Tcl_ConditionNotify
> #undef Tcl_ConditionWait
-------------------------------------------------------------------------------
*** tk8.2.0/generic/tk.h.ORIG
PROBLEM: does not compile with TK_USE_INPUT_METHODS
SOLUTION: comment out the following lines for SunOS 4.1.4
/*
#ifdef XNQueryInputStyle
#define TK_USE_INPUT_METHODS
#endif
*/
CRUDE PATCH (#ifdef should be used)
96a97
> /*
99a101
> */
-------------------------------------------------------------------------------
*** tk8.2.0/generic/tkConsole.c.ORIG
PROBLEM: function ConsoleDeleteProc is declared twice, first 'static', then
non-static
SOLUTION: add 'static' before actual definition of ConsoleDeleteProc, i.e.
static void
ConsoleDeleteProc(clientData)
PATCH
676c676
< void
---
> static void
-------------------------------------------------------------------------------
*** tk8.2.0/library/menu.tcl.ORIG
PROBLEM: cascaded menus open in whole depth, even if the user has only
selected the first menu level. This bug has already been reported
by Aldo Mazzilli for 8.0.4, but is still not fixed in 8.2
PATCH: remove line 1096
1096c1096
< $menu postcascade $i
---
> ### $menu postcascade $i
-------------------------------------------------------------------------------
PatchFiles:
tcl8.2.0/generic/tcl.h
tcl8.2.0/generic/tclBasic.c
tcl8.2.0/generic/tclStubInit.c
tk8.2.0/generic/tk.h
tk8.2.0/generic/tkConsole.c
tk8.2.0/library/menu.tcl
Fixed tkConsole.c
-- 11/10/1999 hobbs
Fixed tkBasic.c, the others are as they should be. The "standard"
cc of SunOS is not very intelligent, and not ANSI compliant. gcc
is a recommended alternative as it will work with the current setup.
-- 04/14/2000 hobbs
welch Closed ticket [218948ffff].
[History diff]2000-10-26 08:32:14
dgp Ticket [218948ffff]: 3 changes
[History diff]2001-04-05 06:54:24
Log in (anonymous is fine) to add a comment.