diff options
author | jenglish <jenglish@flightlab.com> | 2013-03-02 07:30:15 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2013-03-02 07:30:15 (GMT) |
commit | 87cfb6b2500773e7d72b01e50264924ef177e941 (patch) | |
tree | 0fa5174a4ba36804998a92527e30bf77e6a4487b /unix | |
parent | 22e489629417558fba1a0a22da4cb24ccbc91874 (diff) | |
download | tcl-87cfb6b2500773e7d72b01e50264924ef177e941.zip tcl-87cfb6b2500773e7d72b01e50264924ef177e941.tar.gz tcl-87cfb6b2500773e7d72b01e50264924ef177e941.tar.bz2 |
More ifdef shuffling: GETREADQUEUE and GETWRITEQEUE always defined,
dummy implementations return 0 if the requisite ioctls are not present.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixChan.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 178c0bc..d200924 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -30,10 +30,15 @@ # define GETREADQUEUE(fd, int) ioctl((fd), FIONREAD, &(int)) # elif defined(FIORDCHK) # define GETREADQUEUE(fd, int) int = ioctl((fd), FIORDCHK, NULL) -# endif /* FIONREAD */ +# else +# define GETREADQUEUE(fd, int) int = 0 +# endif + # ifdef TIOCOUTQ # define GETWRITEQUEUE(fd, int) ioctl((fd), TIOCOUTQ, &(int)) -# endif /* TIOCOUTQ */ +# else +# define GETWRITEQUEUE(fd, int) int = 0 +# endif # if !defined(CRTSCTS) && defined(CNEW_RTSCTS) # define CRTSCTS CNEW_RTSCTS @@ -875,12 +880,8 @@ TtyGetOptionProc( int inQueue=0, outQueue=0, inBuffered, outBuffered; valid = 1; -#ifdef GETREADQUEUE GETREADQUEUE(fsPtr->fd, inQueue); -#endif /* GETREADQUEUE */ -#ifdef GETWRITEQUEUE GETWRITEQUEUE(fsPtr->fd, outQueue); -#endif /* GETWRITEQUEUE */ inBuffered = Tcl_InputBuffered(fsPtr->channel); outBuffered = Tcl_OutputBuffered(fsPtr->channel); |