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
This commit is contained in:
vsc 2002-04-24 14:17:56 +00:00
parent b63425bf5c
commit 238598e41f

View File

@ -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));