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 | e275a746f2b6e66cb1a52d89be1e011e2eb27777 (patch) | |
tree | 0fa5174a4ba36804998a92527e30bf77e6a4487b | |
parent | cb6f189d6d5129efb67a28562013de4f96f18bd8 (diff) | |
download | tcl-e275a746f2b6e66cb1a52d89be1e011e2eb27777.zip tcl-e275a746f2b6e66cb1a52d89be1e011e2eb27777.tar.gz tcl-e275a746f2b6e66cb1a52d89be1e011e2eb27777.tar.bz2 |
More ifdef shuffling: GETREADQUEUE and GETWRITEQEUE always defined,
dummy implementations return 0 if the requisite ioctls are not present.
-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); |