]> source.dussan.org Git - tigervnc.git/commitdiff
Check where select() is defined during configure time
authorAdam Tkac <atkac@redhat.com>
Fri, 14 Nov 2008 12:25:34 +0000 (12:25 +0000)
committerAdam Tkac <atkac@redhat.com>
Fri, 14 Nov 2008 12:25:34 +0000 (12:25 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3165 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/configure.ac
common/rdr/FdInStream.cxx
common/rdr/FdOutStream.cxx

index b895da61c79efa8f32c1a4b19046b75b90621658..fc2f8bf4cfe86c89e8abc6824bc5f2abac5d9ffa 100644 (file)
@@ -84,6 +84,8 @@ AC_CHECK_TYPES([socklen_t],
        [AC_DEFINE([VNC_SOCKLEN_T], [socklen_t], [Use correct size])],
        [AC_DEFINE([VNC_SOCKLEN_T], [int])])
 
+AC_CHECK_HEADERS([sys/select.h])
+
 AC_OUTPUT([Makefile
           rdr/Makefile
           network/Makefile
index 2b11973555ad917917399f156e7d07224b652a41..e2281b49d05d43253d5aecbb96b706ab642e3f7d 100644 (file)
  * USA.
  */
 
+#ifdef HAVE_COMMON_CONFIG_H
+#include <common-config.h>
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #ifdef _WIN32
 #define vncmax(a,b)            (((a) > (b)) ? (a) : (b))
 #endif
 
-// XXX should use autoconf HAVE_SYS_SELECT_H
-#ifdef _AIX
+/* Old systems have select() in sys/time.h */
+#ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
 
-// XXX Lynx/OS 2.3: protos for gettimeofday(), select(), bzero()
-#ifdef Lynx
-#include <sys/proto.h>
-#endif
-
 #include <rdr/FdInStream.h>
 #include <rdr/Exception.h>
 
index 07ac04c206ed01dd1ceb429a8c7875ead59b7a9d..c771166e67c7b06a1ae70734642ffd7f39020f17 100644 (file)
  * USA.
  */
 
+#ifdef HAVE_COMMON_CONFIG_H
+#include <common-config.h>
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #ifdef _WIN32
@@ -33,9 +37,9 @@
 #include <sys/time.h>
 #endif
 
-// XXX Lynx/OS 2.3: protos for select(), bzero()
-#ifdef Lynx
-#include <sys/proto.h>
+/* Old systems have select() in sys/time.h */
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
 #endif
 
 #include <rdr/FdOutStream.h>