Camm Maguire writes:

Thanks Vadim!  Is there a way, in windows, to determine if data is
ready for reading in from a terminal interface?  The FIONREAD ioctl
works on linux, and there is the following non-blocking generic code
which appears in force on windows:

#ifdef LISTEN_USE_FCNTL
  do { int c = 0;
  FILE *fp = strm->sm.sm_fp;
  int orig;
  int res;
  if (feof(fp)) return TRUE;
  orig = fcntl(fileno(fp), F_GETFL);
  if (! (orig & O_NONBLOCK ) ) {
    res=fcntl(fileno(fp),F_SETFL,orig | O_NONBLOCK);
  }
  c = getc(fp);
  if (! (orig & O_NONBLOCK ) ){
    fcntl(fileno(fp),F_SETFL,orig );
  }
  if (c != EOF)
{ ungetc(c,fp);
      return TRUE;
    }
  return FALSE;
  } while (0);
#endif

that is, presuming the configure check

check for listen using fcntl

returns yes.  Can you tell me if the latter is true or not, and then
if so, what are the symptoms of breakage in light of the code above?


Unfortunately LISTEN_USE_FCNTL is not set on Windows MinGW.


--
     Vadim V. Zhytnikov

      <[EMAIL PROTECTED]>
     <[EMAIL PROTECTED]>


_______________________________________________
Gcl-devel mailing list
Gcl-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/gcl-devel

Reply via email to