Tcl Source Code

View Ticket
Login
Ticket UUID: 466016
Title: OS/390 support for Tcl-8.3.3
Type: Patch Version: None
Submitter: lthuresson Created on: 2001-09-28 11:48:22
Subsystem: 52. Portability Support Assigned To: mdejong
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2008-03-27 09:20:36
Resolution: None Closed By: sf-robot
    Closed on: 2008-03-27 02:20:36
Description:
The port was done on OS/390 V2R9 using IBM c89 C/C++ compiler.
The hole source is compiled with c89 compiler options
-Wc,conv(iso8859-1) (=use iso8859-1 for character and string literals)
and -D__LIBASCII (=use ASCII version of C-library functions, but not all
library functions have ASCII versions, see compat/os390Libascii.c)
to be able to take advantage of the use of utf-8 encoding in Tcl internals.
The default system-encoding is set to ibm-1047 (normally iso8859-1)
and thus conversion to EBCDIC is done automatically when data is 
transferred to/from the external environment.
I had to add built in support for ibm-1047 and iso8859-1 see comment in
generic/encoding.c. The c library uses iso8859-1 encoding but system
encoding is set to ibm-1047 this breakes many argument conversions
for c-lib calls. These conversions previously used a NULL encoding token
to get the system encoding. I replaced this with a macro that on 
OS390 returns a iso8859-1 encoding token and a NULL token on all
other platforms. 

The configure script generated by autoconf contains a line

 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`

The ASCII linefeed code \012 must be hand edited to corresponding
EBCDIC code \025. What I understand from discussions in various
news groups, changing to \n is not portable to all implementations
of tr.

The present configure script only support static linking. I did
some experiments with dynamic linking, but very few functions 
worked in that version.

The http package have been modified to explicitly set iso8859-1 encoding
for the connection. This takes care of the necessary ASCII<->EBCDIC 
conversion in most cases.
However if the -channel option is used for ::http::geturl, data is copied
with the fcopy command and no encoding conversion is done. If EBCDIC
encoded data is wanted it must be converted by the application.
The http test have been modified to handle this.
The http test crash occasionally when the my os390 machine is under heavy load !
Many io-tests assume ASCII encoding. I have modified a few 
tests to work in both ASCII and EBCDIC environment, but quite a few remains
to be fixed.

 
/Leif
User Comments: sf-robot added on 2008-03-27 09:20:36:
Logged In: YES 
user_id=1312539
Originator: NO

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

hobbs added on 2001-10-17 06:11:13:
Logged In: YES 
user_id=72656

These are quite sweeping patches, so they won't make 
8.3.4.  It is better to focus applying these to 8.4 (where 
most new development is focused).

hobbs added on 2001-10-06 11:30:18:
Logged In: YES 
user_id=72656

these should be analyzed to verify that they are simple and 
clean, and applied before 8.3.4 goes out (soon).

lthuresson added on 2001-09-28 18:48:23:

File Added - 11328: tcl8.3.3_os390_patch.tgz

Attachments: