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:
parent
b63425bf5c
commit
238598e41f
@ -679,7 +679,7 @@ ConsoleSocketPutc (int sno, int ch)
|
|||||||
ch = '\n';
|
ch = '\n';
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if _MSC_VER
|
#if _MSC_VER || defined(__MINGW32__)
|
||||||
send(s->u.socket.fd, &c, sizeof(c), 0);
|
send(s->u.socket.fd, &c, sizeof(c), 0);
|
||||||
#else
|
#else
|
||||||
write(s->u.socket.fd, &c, sizeof(c));
|
write(s->u.socket.fd, &c, sizeof(c));
|
||||||
@ -699,7 +699,7 @@ SocketPutc (int sno, int ch)
|
|||||||
ch = '\n';
|
ch = '\n';
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if _MSC_VER
|
#if _MSC_VER || defined(__MINGW32__)
|
||||||
send(s->u.socket.fd, &c, sizeof(c), 0);
|
send(s->u.socket.fd, &c, sizeof(c), 0);
|
||||||
#else
|
#else
|
||||||
write(s->u.socket.fd, &c, sizeof(c));
|
write(s->u.socket.fd, &c, sizeof(c));
|
||||||
@ -1086,7 +1086,7 @@ SocketGetc(int sno)
|
|||||||
char c;
|
char c;
|
||||||
int count;
|
int count;
|
||||||
/* should be able to use a buffer */
|
/* 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);
|
count = recv(s->u.socket.fd, &c, sizeof(char), 0);
|
||||||
#else
|
#else
|
||||||
count = read(s->u.socket.fd, &c, sizeof(char));
|
count = read(s->u.socket.fd, &c, sizeof(char));
|
||||||
@ -1126,7 +1126,7 @@ ConsoleSocketGetc(int sno)
|
|||||||
}
|
}
|
||||||
/* should be able to use a buffer */
|
/* should be able to use a buffer */
|
||||||
PrologMode |= ConsoleGetcMode;
|
PrologMode |= ConsoleGetcMode;
|
||||||
#if _MSC_VER
|
#if _MSC_VER || defined(__MINGW32__)
|
||||||
count = recv(s->u.socket.fd, &c, sizeof(char), 0);
|
count = recv(s->u.socket.fd, &c, sizeof(char), 0);
|
||||||
#else
|
#else
|
||||||
count = read(s->u.socket.fd, &c, sizeof(char));
|
count = read(s->u.socket.fd, &c, sizeof(char));
|
||||||
|
Reference in New Issue
Block a user