summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/os/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'xc/programs/Xserver/os/connection.c')
-rw-r--r--xc/programs/Xserver/os/connection.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/xc/programs/Xserver/os/connection.c b/xc/programs/Xserver/os/connection.c
index e74412498..da2095284 100644
--- a/xc/programs/Xserver/os/connection.c
+++ b/xc/programs/Xserver/os/connection.c
@@ -41,7 +41,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/os/connection.c,v 3.40 2000/06/26 23:00:32 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/os/connection.c,v 3.42 2000/08/11 16:52:12 dawes Exp $ */
/*****************************************************************
* Stuff to create connections --- OS dependent
*
@@ -74,12 +74,12 @@ extern int errno;
#include <stdio.h>
#ifndef WIN32
-#ifndef MINIX
-#ifndef Lynx
-#include <sys/socket.h>
-#else
+#if defined(__CYGWIN__)
+#include <cygwin/socket.h>
+#elif defined(MINIX) || defined(Lynx)
#include <socket.h>
-#endif
+#else
+#include <sys/socket.h>
#endif
#ifdef hpux
@@ -117,7 +117,7 @@ extern __const__ int _nfiles;
#if defined(TCPCONN) || defined(STREAMSCONN)
# include <netinet/in.h>
# include <arpa/inet.h>
-# ifndef hpux
+# if !defined(hpux) && !defined(__CYGWIN__)
# ifdef apollo
# ifndef NO_TCP_H
# include <netinet/tcp.h>
@@ -139,7 +139,7 @@ extern __const__ int _nfiles;
#include <server/ip/gen/inet.h>
#endif
-#if !defined(AMOEBA) && !defined(_MINIX) && !defined(__EMX__)
+#if !defined(AMOEBA) && !defined(_MINIX) && !defined(__EMX__) && !defined(__CYGWIN__)
#ifndef Lynx
#include <sys/uio.h>
#else
@@ -205,7 +205,7 @@ static fd_set SavedClientsWithInput;
int GrabInProgress = 0;
int *ConnectionTranslation = NULL;
-#ifdef WIN32
+#if defined(WIN32) || defined(__CYGWIN__)
/* SPAM ALERT !!!
* On NT fds are not between 0 and MAXSOCKS, they are unrelated, and there is
* not even a known maximum value, so use something quite arbitrary for now.
@@ -310,7 +310,7 @@ InitConnectionLimits()
ErrorF("InitConnectionLimits: MaxClients = %d\n", MaxClients);
#endif
-#ifndef WIN32
+#if !defined(WIN32) && !defined(__CYGWIN__)
ConnectionTranslation = (int *)xnfalloc(sizeof(int)*(lastfdesc + 1));
#else
ConnectionTranslation = (int *)xnfalloc(sizeof(int)*(MAXFD));
@@ -335,7 +335,7 @@ CreateWellKnownSockets()
FD_ZERO(&LastSelectMask);
FD_ZERO(&ClientsWithInput);
-#ifndef WIN32
+#if !defined(WIN32) && !defined(__CYGWIN__)
for (i=0; i<MaxClients; i++) ConnectionTranslation[i] = 0;
#else
for (i=0; i<MAXFD; i++) ConnectionTranslation[i] = 0;
@@ -380,7 +380,7 @@ CreateWellKnownSockets()
if (!XFD_ANYSET (&WellKnownConnections))
FatalError ("Cannot establish any listening sockets - Make sure an X server isn't already running");
-#ifndef WIN32
+#if !defined(WIN32) && !defined(__CYGWIN__)
OsSignal (SIGPIPE, SIG_IGN);
OsSignal (SIGHUP, AutoResetServer);
#endif
@@ -403,7 +403,7 @@ CreateWellKnownSockets()
* in the second case, the signal will be quite
* useful
*/
-#ifndef WIN32
+#if !defined(WIN32) && !defined(__CYGWIN__)
if (OsSignal (SIGUSR1, SIG_IGN) == SIG_IGN)
RunFromSmartParent = TRUE;
ParentProcess = getppid ();
@@ -464,7 +464,7 @@ ResetWellKnownSockets ()
/*
* See above in CreateWellKnownSockets about SIGUSR1
*/
-#ifndef WIN32
+#if !defined(WIN32) && !defined(__CYGWIN__)
if (RunFromSmartParent) {
if (ParentProcess > 0) {
kill (ParentProcess, SIGUSR1);