[PATCH] Define FD_SETSIZE on Cygwin regardless of XWin DDX

Yaakov (Cygwin/X) yselkowitz at users.sourceforge.net
Mon Oct 19 09:14:49 PDT 2009


From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

All DDXs segfault on Cygwin unless FD_SETSIZE is enlarged to 256
(default is 64), so make sure we do so whether or not we are building
XWin.

Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
---
 configure.ac            |    5 +++--
 include/dix-config.h.in |    3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index c4465d2..dcc2663 100644
--- a/configure.ac
+++ b/configure.ac
@@ -421,6 +421,9 @@ case $host_os in
   darwin*)
 	AC_DEFINE(CSRG_BASED, 1, [System is BSD-like])
 	;;
+  cygwin*)
+	AC_DEFINE(FD_SETSIZE, 256, [Set size of fd_set])
+	;;
 esac
 
 dnl augment XORG_RELEASE_VERSION for our snapshot number and to expose the
@@ -1714,8 +1717,6 @@ if test "x$XWIN" = xyes; then
 			       AC_DEFINE(ROOTLESS,1,[Build Rootless code])
 			       CFLAGS="$CFLAGS -DROOTLESS_WORKAROUND"
 			fi
-
-			CFLAGS="$CFLAGS -DFD_SETSIZE=256"
 			;;
 		mingw*)
 			XWIN_SERVER_NAME=Xming
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 798d9e7..1b11b28 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -378,6 +378,9 @@
 /* System is BSD-like */
 #undef CSRG_BASED
 
+/* Set size of fd_set */
+#undef FD_SETSIZE
+
 /* Define to 1 if `struct sockaddr_in' has a `sin_len' member */
 #undef BSD44SOCKETS
 
-- 
1.6.4.2



More information about the xorg-devel mailing list