aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/os/io.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-06 00:53:06 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-06 00:53:06 +0100
commit67599026d01692c52276df6ff5e8332d2413c18f (patch)
treeb93b8d6643dd6438f0844d48008d6cb9ffee405f /nx-X11/programs/Xserver/os/io.c
parent5a8f1e921b4cafedc9efac22d5fbd2ce05e45ba9 (diff)
parentcf8797c3c0e9623e5092a2c9f5ea7cb31bc11657 (diff)
downloadnx-libs-67599026d01692c52276df6ff5e8332d2413c18f.tar.gz
nx-libs-67599026d01692c52276df6ff5e8332d2413c18f.tar.bz2
nx-libs-67599026d01692c52276df6ff5e8332d2413c18f.zip
Merge branch 'uli42-pr/various3' into 3.6.x
Attributes GH PR #880: https://github.com/ArcticaProject/nx-libs/pull/880
Diffstat (limited to 'nx-X11/programs/Xserver/os/io.c')
-rw-r--r--nx-X11/programs/Xserver/os/io.c37
1 files changed, 1 insertions, 36 deletions
diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c
index 02a47f135..7f35a81f1 100644
--- a/nx-X11/programs/Xserver/os/io.c
+++ b/nx-X11/programs/Xserver/os/io.c
@@ -60,9 +60,6 @@ SOFTWARE.
#if 0
#define DEBUG_COMMUNICATION
#endif
-#ifdef WIN32
-#include <nx-X11/Xwinsock.h>
-#endif
#include <stdio.h>
#define XSERV_t
#define TRANS_SERVER
@@ -70,9 +67,7 @@ SOFTWARE.
#include <nx-X11/Xtrans/Xtrans.h>
#include <nx-X11/Xmd.h>
#include <errno.h>
-#if !defined(WIN32)
#include <sys/uio.h>
-#endif
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
#include "os.h"
@@ -88,7 +83,6 @@ CallbackListPtr FlushCallback;
/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
* systems are broken and return EWOULDBLOCK when they should return EAGAIN
*/
-#ifndef WIN32
#if defined(EAGAIN) && defined(EWOULDBLOCK)
#define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK)
#else
@@ -98,9 +92,6 @@ CallbackListPtr FlushCallback;
#define ETEST(err) (err == EWOULDBLOCK)
#endif
#endif
-#else /* WIN32 The socket errorcodes differ from the normal errors*/
-#define ETEST(err) (err == EAGAIN || err == WSAEWOULDBLOCK)
-#endif
Bool CriticalOutputPending;
int timesThisConnection = 0;
@@ -358,7 +349,7 @@ ReadRequestFromClient(ClientPtr client)
{
if ((result < 0) && ETEST(errno))
{
-#if defined(SVR4) && defined(i386) && !defined(sun)
+#if defined(SVR4) && defined(__i386__) && !defined(sun)
if (0)
#endif
{
@@ -777,9 +768,6 @@ FlushAllOutput(void)
OsCommPtr oc;
register ClientPtr client;
Bool newoutput = NewOutputPending;
-#if defined(WIN32)
- fd_set newOutputPending;
-#endif
if (!newoutput)
return;
@@ -792,7 +780,6 @@ FlushAllOutput(void)
CriticalOutputPending = FALSE;
NewOutputPending = FALSE;
-#ifndef WIN32
for (base = 0; base < howmany(XFD_SETSIZE, NFDBITS); base++)
{
mask = OutputPending.fds_bits[ base ];
@@ -817,28 +804,6 @@ FlushAllOutput(void)
(void)FlushClient(client, oc, (char *)NULL, 0);
}
}
-#else /* WIN32 */
- FD_ZERO(&newOutputPending);
- for (base = 0; base < XFD_SETCOUNT(&OutputPending); base++)
- {
- index = XFD_FD(&OutputPending, base);
- if ((index = GetConnectionTranslation(index)) == 0)
- continue;
- client = clients[index];
- if (client->clientGone)
- continue;
- oc = (OsCommPtr)client->osPrivate;
- if (
- FD_ISSET(oc->fd, &ClientsWithInput))
- {
- FD_SET(oc->fd, &newOutputPending); /* set the bit again */
- NewOutputPending = TRUE;
- }
- else
- (void)FlushClient(client, oc, (char *)NULL, 0);
- }
- XFD_COPYSET(&newOutputPending, &OutputPending);
-#endif /* WIN32 */
}
void