From: <no...@so...> - 2001-08-30 19:15:45
|
Bugs item #419528, was opened at 2001-04-27 09:38 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=419528&group_id=10894 Category: 13. Index Object Group: 8.3.3 Status: Closed Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Jeffrey Hobbs (hobbs) Summary: Non portable code in tclIndexObj.c Initial Comment: I had a problem with porting tcl to a Cray machine. The code at lines 197, 242-245 in tclIndexObj.c assumes a byte addressable machine. It casts a pointer to (size_t) and then adds a byte count to come up with a (char**). This only works on a byte addressable machine. It should be casting to (char*) instead of (size_t) since it is adding a number of characters. I also had a problem with tk routine tkUnixFont.c at line 41. #define FONTMAP_PAGES \ (1 << (sizeof(Tcl_UniChar)*8 - FONTMAP_SHIFT)) There is an implicit assumption that sizeof(Tcl_UniChar) is 2 bytes. On a Cray it is 8 bytes, so that FONTMAP_PAGES becomes a huge number, which is used to define the size of an array in structure FontFamily. My work around was to hardcode a 2 for sizeof(Tcl_UniChar). I believe these problems are in the 8.4 versions also. Clay Andreasen (cd...@cr...) ---------------------------------------------------------------------- >Comment By: Jeffrey Hobbs (hobbs) Date: 2001-08-30 12:15 Message: Logged In: YES user_id=72656 FWIW, these were change to size_t from long before, and this patch changed that to (char *). ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2001-08-30 11:58 Message: Logged In: YES user_id=72656 applied to 8.3.3+ and 8.4a4cvs. ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2001-08-30 07:52 Message: Logged In: YES user_id=148712 Clay tells me that the enclosed patch solves his tcl problem, and that he did report the tk bug to the tktoolkit project. Jan: would you care to take it from here? ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2001-08-13 16:08 Message: Logged In: YES user_id=148712 Is the enclosed patch what is requested? It runs OK with gcc/linux/i386. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2001-04-27 17:40 Message: Logged In: YES user_id=80530 Assigning to the Index Object category. The Tk bug should be reported to the Tk project. http://sourceforge.net/projects/tktoolkit/ ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=419528&group_id=10894 |