Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2003-11-19
06:11 • Closed ticket [736378ffff]: DJGPP tcl does'nt read binary files correctly</... artifact: 9628c3abce user: davygrvy
2003-11-13
16:54 • Ticket [736378ffff]: 4 changes artifact: 2482b46d81 user: vbwagner
05:29 • Ticket [736378ffff]: 1 change artifact: e779ce2ae9 user: dgp
2003-05-12
15:24 • Ticket [736378ffff]: 4 changes artifact: b6287ca8aa user: vbwagner
15:24 • Add attachment djgpp-binmode.patch.gz to ticket [736378ffffffffff|73637... artifact: db5ac90fdf user: vbwagner
08:24 • New ticket [736378ffff] DJGPP tcl does'nt read binary files correctly. artifact: a0ed80e524 user: vbwagner

DJGPP tcl does'nt read binary files correctly

Closed / Fixed736378ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 23 years ago
Descriptionplain2003-05-12 08:24:36
DJGPP requires special flag O_BINARY in order to not
terminate
reading of file upon encounder of EOF character (\x1F)

There is no provision for this flag in tclUnixChan.c

So,  regardless of configuration option,  -eofchar
(which seems to 
not be handled by DJGPP port at all) file reading is
termintated
upon first \x1F character.

It is possible however to seek after offending
character and read
rest of file.

Tcl commands open/read and file copy are affected

Following patch fixes this problem in quick and dirty
way, adding
O_BINARY to every open call in hope that upper levels
of Tcl
channel code would deal with eol issues.

It seems that for proper filesystem handling DJGPP
environment
shouldn't be treated as "Yet another Unix", because
most of DOS filesystem issues are rather Windows-like.
vbwagnerplain2003-05-12 15:24:41
File Added - 50164: djgpp-binmode.patch.gz
dgp Ticket [736378ffff]: 1 change [History diff]2003-11-13 05:29:50
vbwagnerplain2003-11-13 16:54:08
Logged In: YES 
user_id=757679

So, someone of Tcl team at least have taken care of DJGPP port?
I guess that only critical thing which remains to be done to
have djgpp tcl fully functional is exec family of functions.
I have some ideas how to implement as much of tcl exec and
open "|..." functionality as single-tasking OS permits, but
haven't got time to do it.
davygrvyplain2003-11-19 06:11:06
Logged In: YES 
user_id=7549

merged in.
Log in (anonymous is fine) to add a comment.

Attachments: