From 238598e41f19ca3773d2047f28d5eb454c6bf7da Mon Sep 17 00:00:00 2001 From: vsc Date: Wed, 24 Apr 2002 14:17:56 +0000 Subject: [PATCH] socket reading and writing was broken under MINGW32. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@456 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/iopreds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C/iopreds.c b/C/iopreds.c index ce8276e74..0b85dc33a 100644 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -679,7 +679,7 @@ ConsoleSocketPutc (int sno, int ch) ch = '\n'; } #endif -#if _MSC_VER +#if _MSC_VER || defined(__MINGW32__) send(s->u.socket.fd, &c, sizeof(c), 0); #else write(s->u.socket.fd, &c, sizeof(c)); @@ -699,7 +699,7 @@ SocketPutc (int sno, int ch) ch = '\n'; } #endif -#if _MSC_VER +#if _MSC_VER || defined(__MINGW32__) send(s->u.socket.fd, &c, sizeof(c), 0); #else write(s->u.socket.fd, &c, sizeof(c)); @@ -1086,7 +1086,7 @@ SocketGetc(int sno) char c; int count; /* should be able to use a buffer */ -#if _MSC_VER +#if _MSC_VER || defined(__MINGW32__) count = recv(s->u.socket.fd, &c, sizeof(char), 0); #else count = read(s->u.socket.fd, &c, sizeof(char)); @@ -1126,7 +1126,7 @@ ConsoleSocketGetc(int sno) } /* should be able to use a buffer */ PrologMode |= ConsoleGetcMode; -#if _MSC_VER +#if _MSC_VER || defined(__MINGW32__) count = recv(s->u.socket.fd, &c, sizeof(char), 0); #else count = read(s->u.socket.fd, &c, sizeof(char));