--- gforth/engine/io.c 2000/09/23 15:47:08 1.13 +++ 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,1999 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1998,1999,2002,2003 Free Software Foundation, Inc. This file is part of Gforth. @@ -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); }