tcl serial port support
John Hay
jhay at icomtek.csir.co.za
Tue Jun 29 05:56:41 PDT 2004
On Tue, Jun 29, 2004 at 08:46:46AM -0400, Mikhail Teterin wrote:
> =bad option "-mode": should be one of -blocking, -buffering,
> = -buffersize, -encoding, -eofchar, or -translation while executing
>
> Strange. I run a recent current with Tcl8.4.6 -- the `-mode' option is
> here and the test program from the gpsman page works fine.
>
> Looking at TCL sources, the option is #ifdef-ed. Can you rebuild Tcl and
> Tk from their respective ports _on your_ machine and try again?
I also had a look in the source. It looks like they look for devices
that start with "/dev/tty" and so /dev/cuaa0 will not match and then
they don't allow the -mode stuff. I made a patch and now it works.
Maybe we should make it part of the tcl port?
John
--
John Hay -- John.Hay at icomtek.csir.co.za / jhay at FreeBSD.org
############ patch-tclUnixChan.c ##################
--- tclUnixChan.c.org Wed Feb 25 16:54:52 2004
+++ tclUnixChan.c Mon Jun 28 13:57:18 2004
@@ -1787,7 +1787,8 @@
}
fd = TclOSopen(native, mode, permissions);
#ifdef SUPPORTS_TTY
- ctl_tty = (strcmp (native, "/dev/tty") == 0);
+ ctl_tty = (strcmp (native, "/dev/tty") == 0) ||
+ (strcmp (native, "/dev/cua") == 0);
#endif /* SUPPORTS_TTY */
if (fd < 0) {
More information about the freebsd-ports
mailing list