--- gforth/engine/io.c 1999/11/15 22:27:50 1.11 +++ gforth/engine/io.c 2003/08/25 14:17:51 1.17 @@ -1,6 +1,6 @@ /* direct key io driver - Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,1999,2002,2003 Free Software Foundation, Inc. This file is part of Gforth. @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. The following is stolen from the readline library for bash */ @@ -26,6 +26,7 @@ */ #include "config.h" +#include "forth.h" #include #include #include @@ -51,7 +52,6 @@ typedef unsigned int uint32_t; #include #endif #include -#include "forth.h" #include "io.h" #ifndef MSDOS @@ -626,7 +626,7 @@ long key_avail (FILE * stream) if(!terminal_prepped) prep_terminal(); -#ifndef _WIN32 +#if defined(FIONREAD) && !defined(_WIN32) if(isatty (tty)) { result = ioctl (tty, FIONREAD, &chars_avail); }