Overview
| Artifact ID: | 411961b13f71d327294ced024df59cad1fbedba3 |
|---|---|
| Ticket: | 419528ffffffffffffffffffffffffffffffffff
Non portable code in tclIndexObj.c |
| User & Date: | nobody on 2001-04-27 16:38:07 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
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 ([email protected]) - foundin changed to: "obsolete: 8.3.3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "52. Portability Support"
- title changed to: "Non portable code in tclIndexObj.c"
- type changed to: "Bug"