Ticket UUID: | 736378 | |||
Title: | DJGPP tcl does'nt read binary files correctly | |||
Type: | Patch | Version: | None | |
Submitter: | vbwagner | Created on: | 2003-05-12 08:24:36 | |
Subsystem: | 95. contrib ports | Assigned To: | davygrvy | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2003-11-19 06:11:06 | |
Resolution: | Fixed | Closed By: | davygrvy | |
Closed on: | 2003-11-18 23:11:06 | |||
Description: |
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. | |||
User Comments: |
davygrvy added on 2003-11-19 06:11:06:
Logged In: YES user_id=7549 merged in. vbwagner added on 2003-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. vbwagner added on 2003-05-12 15:24:41: File Added - 50164: djgpp-binmode.patch.gz |
Attachments:
- djgpp-binmode.patch.gz [download] added by vbwagner on 2003-05-12 15:24:40. [details]