[usocket-cvs] r297 - usocket/branches/0.3.x/backend
ehuelsmann at common-lisp.net
ehuelsmann at common-lisp.net
Mon Sep 17 20:25:40 UTC 2007
Author: ehuelsmann
Date: Mon Sep 17 16:25:40 2007
New Revision: 297
Modified:
usocket/branches/0.3.x/backend/sbcl.lisp
Log:
Backport r286: SBCL/ECL fixes.
Modified: usocket/branches/0.3.x/backend/sbcl.lisp
==============================================================================
--- usocket/branches/0.3.x/backend/sbcl.lisp (original)
+++ usocket/branches/0.3.x/backend/sbcl.lisp Mon Sep 17 16:25:40 2007
@@ -32,7 +32,7 @@
(sb-alien:cast buf (* sb-alien:char))
256)))
(when (= result 0)
- (cast buf sb-alien:c-string))))))
+ (sb-alien:cast buf sb-alien:c-string))))))
#+ecl
@@ -49,10 +49,9 @@
(defun get-host-name ()
(ffi:c-inline
() () :object
- "{ char buf[256];
- int = gethostname(&buf,256);
+ "{ char *buf = GC_malloc(257);
- if (r == 0)
+ if (gethostname(buf,256) == 0)
@(return) = make_simple_base_string(strndup(&buf,255));
else
@(return) = Cnil;
More information about the usocket-cvs
mailing list