X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb_in.c;h=b8107834c2fb965b813670927d11bee2cea58a8e;hb=6b6044cb8aacdf1b637da7b5dda392f9ff41ed39;hp=fdcc813853f9f928deee4c0365ff1745d58a8351;hpb=9061ee45b8dbe5431c23e3f628089d703ccad0b1;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb_in.c b/src/xcb_in.c index fdcc813..b810783 100644 --- a/src/xcb_in.c +++ b/src/xcb_in.c @@ -25,6 +25,10 @@ /* Stuff that reads stuff from the server. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -51,11 +55,6 @@ #define XCB_REPLY 1 #define XCB_XGE_EVENT 35 -/* required for compiling for Win32 using MinGW */ -#ifndef MSG_WAITALL -#define MSG_WAITALL 0 -#endif - struct event_list { xcb_generic_event_t *event; struct event_list *next; @@ -269,11 +268,7 @@ static int read_block(const int fd, void *buf, const ssize_t len) int done = 0; while(done < len) { -#ifdef __APPLE__ - int ret = read(fd, ((char *) buf) + done, len - done); -#else - int ret = recv(fd, ((char *) buf) + done, len - done,MSG_WAITALL); -#endif + int ret = recv(fd, ((char *) buf) + done, len - done, 0); if(ret > 0) done += ret; #ifndef _WIN32 @@ -665,11 +660,7 @@ void _xcb_in_replies_done(xcb_connection_t *c) int _xcb_in_read(xcb_connection_t *c) { -#ifdef __APPLE__ - int n = read(c->fd, c->in.queue + c->in.queue_len, sizeof(c->in.queue) - c->in.queue_len); -#else - int n = recv(c->fd, c->in.queue + c->in.queue_len, sizeof(c->in.queue) - c->in.queue_len,MSG_WAITALL); -#endif + int n = recv(c->fd, c->in.queue + c->in.queue_len, sizeof(c->in.queue) - c->in.queue_len, 0); if(n > 0) c->in.queue_len += n; while(read_packet(c))