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


From: Camm Maguire
Subject: Re: [Maxima] [Gcl-devel] Re: windows-only read patch
Date: Tue, 27 Mar 2007 12:43:02 -0400
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigory ōmae) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI)

Hi Vadim!  Thanks so much as always!  For some reason, the winsock
appears to choke on goto, which is everywhere.  How about isolating it
as in the following patch?  Please let me know.

I take it the VPN setup of your isp makes remote access impossible, or
rather is some special procedure required?  We had discussed wine as
an alternative before and found it wanting -- wonder if the situation
has changed.

Take care,

=============================================================================


Index: h/mingw.h
===================================================================
RCS file: /cvsroot/gcl/gcl/h/mingw.h,v
retrieving revision 1.17.6.6
diff -u -r1.17.6.6 mingw.h
--- h/mingw.h   23 Apr 2004 03:15:32 -0000      1.17.6.6
+++ h/mingw.h   27 Mar 2007 16:35:32 -0000
@@ -213,3 +213,6 @@
 
 /* End for cmpinclude */
 
+extern int mingwlisten(FILE *);
+#undef LISTEN_FOR_INPUT
+#define LISTEN_FOR_INPUT(fp) do {if (mingwlisten(fp)) return 0;} while (0)
Index: o/mingfile.c
===================================================================
RCS file: /cvsroot/gcl/gcl/o/mingfile.c,v
retrieving revision 1.5.18.1
diff -u -r1.5.18.1 mingfile.c
--- o/mingfile.c        15 Jan 2005 16:46:42 -0000      1.5.18.1
+++ o/mingfile.c        27 Mar 2007 16:35:34 -0000
@@ -1,5 +1,6 @@
 #include "include.h"
 #include "windows.h"
+#include "winsock2.h"
 
 extern object truename(object);
 extern object make_pathname();
@@ -52,3 +53,14 @@
        }
 }
 
+int
+mingwlisten(FILE *fp) {
+
+  int c = 0;
+  if ((fp)->_IO_read_ptr >= (fp)->_IO_read_end) {
+    ioctlsocket((fp)->_fileno, FIONREAD, &c);
+    if (c<=0)
+      return 1;
+  }
+  return 0;
+}
=============================================================================
-- 
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]