From cc4ec96001c2501b8f282fc2af212e02c358f6a7 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Wed, 30 Jul 2014 22:44:04 +0900 Subject: [PATCH] Redefining term-attrs-[io]speed[-set!] in terms of accessor functions, cfgetispeed, cfgetospeed, cfsetispeed and cfsetospeed, instead of non-portable field names. --- lib/chibi/stty.stub | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/chibi/stty.stub b/lib/chibi/stty.stub index 09d3fe36..1e66f787 100644 --- a/lib/chibi/stty.stub +++ b/lib/chibi/stty.stub @@ -10,8 +10,14 @@ (unsigned-long c_cflag term-attrs-cflag term-attrs-cflag-set!) (unsigned-long c_lflag term-attrs-lflag term-attrs-lflag-set!) ;;(unsigned-char (c_cc 22) term-attrs-cc term-attrs-cc-set!) - (unsigned-long c_ispeed term-attrs-ispeed term-attrs-ispeed-set!) - (unsigned-long c_ospeed term-attrs-ospeed term-attrs-ospeed-set!)) + ;;(unsigned-long c_ispeed term-attrs-ispeed term-attrs-ispeed-set!) + ;;(unsigned-long c_ospeed term-attrs-ospeed term-attrs-ospeed-set!) + ) + +(define-c unsigned-long (term-attrs-ispeed cfgetispeed) (termios)) +(define-c unsigned-long (term-attrs-ospeed cfgetospeed) (termios)) +(define-c errno (term-attrs-ispeed-set! cfsetispeed) (termios unsigned-long)) +(define-c errno (term-attrs-ospeed-set! cfsetospeed) (termios unsigned-long)) (define-c-struct winsize predicate: winsize?