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:
vsc 2008-08-22 01:59:48 +00:00
parent 16d0f2e749
commit 82efc8fb2c
4 changed files with 8 additions and 7 deletions

0
.depend.in Normal file
View File

View 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

View File

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

View File

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