From ctian at common-lisp.net Wed Jan 5 23:16:17 2011 From: ctian at common-lisp.net (Chun Tian (binghe)) Date: Wed, 05 Jan 2011 18:16:17 -0500 Subject: [usocket-cvs] r573 - usocket/trunk/backend Message-ID: 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.") - )