[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] Is GCL-TK broken ?
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] Is GCL-TK broken ? |
Date: |
11 Jul 2003 12:43:46 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
OK, This patch appears to fix it for me. I think we should either
expand the small_fixnum limit to encompass all shorts, or to review
each invocation of small_fixnum() to ensure overflows cannot happen.
Take care,
=============================================================================
Index: tkl.lisp
===================================================================
RCS file: /cvsroot/gcl/gcl/gcl-tk/tkl.lisp,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tkl.lisp
--- tkl.lisp 6 Dec 1999 22:44:00 -0000 1.1.1.1
+++ tkl.lisp 11 Jul 2003 16:38:42 -0000
@@ -1411,12 +1411,12 @@
((probe-file (tk-conc si::*lib-directory* "gcl-tk/gcltksrv")))
(t (error "Must setenv GCL_TK_SERVER ")))))
(let ((pid (if host -1 (si::getpid)))
- (tk-socket (si::open-named-socket 0 nil))
+ (tk-socket (si::open-named-socket 0))
)
(cond ((not host) (setq hostid loopback))
(host (setq hostid (si::hostname-to-hostid (si::gethostname)))))
(or hostid (error "Can't find my address"))
- (setq tk-socket (si::open-named-socket 0 nil))
+ (setq tk-socket (si::open-named-socket 0))
(if (pathnamep gcltksrv) (setq gcltksrv (namestring gcltksrv)))
(let ((command
(tk-conc gcltksrv " " hostid " "
Index: sockets.c
===================================================================
RCS file: /cvsroot/gcl/gcl/o/sockets.c,v
retrieving revision 1.8
diff -u -r1.8 sockets.c
--- sockets.c 1 Mar 2003 22:37:37 -0000 1.8
+++ sockets.c 11 Jul 2003 16:37:34 -0000
@@ -175,7 +175,7 @@
return Cnil;
}
- return make_cons(make_fixnum(s), small_fixnum(ntohs(addr.sin_port)));
+ return make_cons(make_fixnum(s), make_fixnum(ntohs(addr.sin_port)));
}
DEFUN_NEW("CLOSE-FD",object,fSclose_fd,SI,1,1,NONE,OI,OO,OO,OO,(fixnum fd),
=============================================================================
"Vadim V. Zhytnikov" <address@hidden> writes:
> I'll try this but I bet it won't work.
> I'll already tried similar thing but other way around
> replacing two problematic calls (open-named-socket 0 nil) in
> tkl.lisp by (open-named-socket 0). Natuarlly arg count
> error gone but I finished with some nasty
> "memory may be damaged" error.
>
> There is a simple test in gcl-tk documentation (take a look)
>
> 1. start gcl
> 2. say (in-package "TK")
> 3. say (tkconnect)
>
> Originally this faled to me due to absence of
> /gcl-tk/tkl.o in my GCL build. It is turned
> out that configure can't locate my TCL/Tk configuration
> files. So I supplied them maually and all required
> things were build in /gcl-tk. But even after this
> I don't see that GCL-TK package works.
>
> Could you try this test on Debian?
>
> Camm Maguire:
>
> > Hi Vadim! Could you please try the patch below? How are you testing
> > this?
> > Take care,
> > =============================================================================
> > RCS file: /cvsroot/gcl/gcl/o/sockets.c,v
> > retrieving revision 1.8
> > diff -u -r1.8 sockets.c
> > --- sockets.c 1 Mar 2003 22:37:37 -0000 1.8
> > +++ sockets.c 10 Jul 2003 23:25:47 -0000
> > @@ -101,7 +101,7 @@
> > #define BIND_LAST_ADDRESS 65534
> > static unsigned int iLastAddressUsed = BIND_INITIAL_ADDRESS;
> >
> > -DEFUN_NEW("OPEN-NAMED-SOCKET",object,fSopen_named_socket,SI,1,1,NONE,OI,OO,OO,OO,(fixnum
> > port),
> > +DEFUN_NEW("OPEN-NAMED-SOCKET",object,fSopen_named_socket,SI,2,2,NONE,OI,OO,OO,OO,(fixnum
> > port),
> > "Open a socket on PORT and return (cons fd portname) where file \
> > descriptor is a small fixnum which is the write file descriptor for \
> > the socket. If PORT is zero do automatic allocation of port")
> > =============================================================================
> > "Vadim V. Zhytnikov" <address@hidden> writes:
> >
> >>I just tried a simple example from
> >>the very beginning of gcl-tk.info:
> >>
> >> >(in-package "tk")
> >> >(tkcoonect)
> >>
> >>It fails with message that si::open-named-socked
> >>must have less than two arguments. Indeed,
> >>in /gcl-tk/tkl.lisp this function is invoked as
> >>(si::open-named-socket 0 nil) while in socket.c
> >>it is defined with 1 argument.
> >>
> >>Anyone tried gcl-tk? Any success?
> >>It seems that at present TK package is broken.
> >>
>
> --
> Vadim V. Zhytnikov
>
> <address@hidden>
> <address@hidden>
>
>
>
>
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah