gcl-devel
[Top][All Lists]
Advanced

[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: Camm Maguire
Subject: Re: [Maxima] [Gcl-devel] Re: windows-only read patch (was: error in ./configure when building gcl 2.6.7 onUbuntu)
Date: 05 Mar 2007 10:50:20 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

"Vadim V. Zhytnikov" <address@hidden> writes:

> Camm Maguire writes:
> > Greetings!  Any progress here?
> 
> I only can confirm that removing WIN32 conditional
> below really breaks build on Windows.
> 
> >>>> +++ read.d       16 Jun 2006 02:26:22 -0000      
> >>>> 1.14.4.1.2.2.2.4.6.1.6.1.4.3
> >>>> @@ -256,6 +256,7 @@
> >>>>  
> >>>>          x = read_object(in);
> >>>>          vs_push(x);
> >>>> +#ifndef _WIN32
> >>>>          while (listen_stream(in)) {
> >>>>            object c=read_char(in);
> >>>>            if (cat(c)!=cat_whitespace) {
> >>>> @@ -263,7 +264,7 @@
> >>>>              break;
> >>>>            }
> >>>>          }
> >>>> -
> >>>> +#endif
> >>>>          if (sharp_eq_context_max > 0)
> >>>>                  x = vs_head = patch_sharp(x);
> >>>>  
> 
> 

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?

Thanks so much!

Take care,


> -- 
>       Vadim V. Zhytnikov
> 
>        <address@hidden>
>       <address@hidden>
> _______________________________________________
> Maxima mailing list
> address@hidden
> http://www.math.utexas.edu/mailman/listinfo/maxima
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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