small fixes to compile in Windows again.
Trust _isatty
This commit is contained in:
parent
16d0f2e749
commit
0719b8a19d
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
|
||||
|
@ -1438,7 +1438,7 @@ mkdir -p GPL/clpqr
|
||||
mkdir -p GPL/http
|
||||
mkdir -p cplint
|
||||
|
||||
AC_OUTPUT(Makefile library/matrix/Makefile library/matlab/Makefile library/regex/Makefile library/system/Makefile library/random/Makefile library/yap2swi/Makefile library/mpi/Makefile .depend library/Makefile LGPL/Makefile LGPL/chr/Makefile LGPL/chr/chr_swi_bootstrap.yap CLPBN/Makefile LGPL/clp/Makefile GPL/clpqr/Makefile library/lammpi/Makefile library/tries/Makefile library/rltree/Makefile LGPL/swi_console/Makefile LGPL/JPL/Makefile LGPL/JPL/src/Makefile LGPL/JPL/java/Makefile LGPL/JPL/jpl_paths.yap GPL/http/Makefile GPL/Makefile cplint/Makefile)
|
||||
AC_OUTPUT(Makefile library/matrix/Makefile library/matlab/Makefile library/regex/Makefile library/system/Makefile library/random/Makefile library/yap2swi/Makefile library/mpi/Makefile .depend library/Makefile LGPL/Makefile LGPL/chr/Makefile LGPL/chr/chr_swi_bootstrap.yap CLPBN/Makefile LGPL/clp/Makefile GPL/clpqr/Makefile library/lammpi/Makefile library/tries/Makefile library/rltree/Makefile LGPL/swi_console/Makefile LGPL/JPL/Makefile LGPL/JPL/src/Makefile LGPL/JPL/java/Makefile LGPL/JPL/jpl_paths.yap GPL/http/Makefile GPL/Makefile cplint/Makefile)
|
||||
|
||||
make depend
|
||||
|
||||
|
@ -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