small fixes to compile in Windows again.
Trust _isatty git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2311 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
16d0f2e749
commit
82efc8fb2c
0
.depend.in
Normal file
0
.depend.in
Normal file
@ -288,11 +288,7 @@ unix_upd_stream_info (StreamDesc * s)
|
||||
#if _MSC_VER || defined(__MINGW32__)
|
||||
{
|
||||
if (
|
||||
#ifdef __MINGW32__
|
||||
TRUE /* we cannot trust _isatty in MINGW */
|
||||
#else
|
||||
_isatty(_fileno(s->u.file.file))
|
||||
#endif
|
||||
) {
|
||||
s->status |= Tty_Stream_f|Reset_Eof_Stream_f|Promptable_Stream_f;
|
||||
/* make all console descriptors unbuffered */
|
||||
@ -1310,7 +1306,7 @@ static int
|
||||
ConsoleSocketGetc(int sno)
|
||||
{
|
||||
register StreamDesc *s = &Stream[sno];
|
||||
register int ch;
|
||||
int ch;
|
||||
Int c;
|
||||
int count;
|
||||
|
||||
@ -1327,7 +1323,7 @@ ConsoleSocketGetc(int sno)
|
||||
/* should be able to use a buffer */
|
||||
Yap_PrologMode |= ConsoleGetcMode;
|
||||
#if _MSC_VER || defined(__MINGW32__)
|
||||
count = recv(s->u.socket.fd, &c, sizeof(char), 0);
|
||||
count = recv(s->u.socket.fd, (void *)&c, sizeof(char), 0);
|
||||
#else
|
||||
count = read(s->u.socket.fd, &c, sizeof(char));
|
||||
#endif
|
||||
|
@ -24,6 +24,11 @@
|
||||
#include <gmp.h>
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
/* Windows */
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#define BUF_SIZE 256
|
||||
#define TMP_BUF_SIZE 2*BUF_SIZE
|
||||
#define BUF_RINGS 16
|
||||
|
Reference in New Issue
Block a user