[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maxima] [Gcl-devel] Re: windows-only read patch (was: error in ./co

From: Vadim V. Zhytnikov
Subject: Re: [Maxima] [Gcl-devel] Re: windows-only read patch (was: error in ./configure when building gcl 2.6.7 onUbuntu)
Date: Thu, 08 Mar 2007 22:22:11 +0300
User-agent: Thunderbird (Windows/20070221)

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:

  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);

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]