[usocket-cvs] r573 - usocket/trunk/backend
Chun Tian (binghe)
ctian at common-lisp.net
Wed Jan 5 23:16:17 UTC 2011
Author: ctian
Date: Wed Jan 5 18:16:16 2011
New Revision: 573
Log:
CLISP: work around on linksets without FFI
Modified:
usocket/trunk/backend/clisp.lisp
Modified: usocket/trunk/backend/clisp.lisp
==============================================================================
--- usocket/trunk/backend/clisp.lisp (original)
+++ usocket/trunk/backend/clisp.lisp Wed Jan 5 18:16:16 2011
@@ -5,8 +5,8 @@
(in-package :usocket)
-
;; utility routine for looking up the current host name
+#+ffi
(FFI:DEF-CALL-OUT get-host-name-internal
(:name "gethostname")
(:arguments (name (FFI:C-PTR (FFI:C-ARRAY-MAX ffi:character 256))
@@ -19,11 +19,13 @@
(:return-type ffi:int))
(defun get-host-name ()
+ #+ffi
(multiple-value-bind (retcode name)
(get-host-name-internal 256)
(when (= retcode 0)
- name)))
-
+ name))
+ #-ffi
+ "localhost")
#+win32
(defun remap-maybe-for-win32 (z)
@@ -256,5 +258,4 @@
(warn "This image doesn't contain the RAWSOCK package.
To enable UDP socket support, please be sure to use the -Kfull parameter
at startup, or to enable RAWSOCK support during compilation.")
-
)
More information about the usocket-cvs
mailing list