[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kpty
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2008-11-30 12:30:07
Message-ID: 1228048207.725894.24301.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 890817 by ossi:

unconvolute TIOCINQ vs. FIONREAD.


 M  +5 -5      kptydevice.cpp  


--- trunk/KDE/kdelibs/kpty/kptydevice.cpp #890816:890817
@@ -41,6 +41,10 @@
 # include <sys/time.h>
 #endif
 
+#ifndef TIOCINQ
+# define TIOCINQ FIONREAD
+#endif
+
 #define KMAXINT ((int)(~0U >> 1))
 
 /////////////////////////////////////////////////////
@@ -265,11 +269,7 @@
 #else
     int available;
 #endif
-#if defined(Q_OS_FREEBSD) || defined(Q_OS_MAC)
-    if (!::ioctl(q->masterFd(), TIOCOUTQ, (char *) &available)) {
-#else
-    if (!::ioctl(q->masterFd(), FIONREAD, (char *) &available)) {
-#endif
+    if (!::ioctl(q->masterFd(), TIOCINQ, (char *) &available)) {
 #ifdef Q_OS_SOLARIS
         // A Pty is a STREAMS module, and those can be activated
         // with 0 bytes available. This happens either when ^C is
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic