[usocket-devel] What's the usage of USOCKET::GET-HOST-NAME in lispworks.lisp?
Chun Tian (binghe)
binghe.lisp at gmail.com
Fri Feb 1 15:11:20 UTC 2008
Hi,
I saw these definitions in lispworks.lisp:
#+win32
(fli:register-module "ws2_32")
(fli:define-foreign-function (get-host-name-internal
"gethostname" :source)
((return-string (:reference-return (:ef-mb-string :limit 257)))
(namelen :int))
:lambda-list (&aux (namelen 256) return-string)
:result-type :int
#+win32 :module
#+win32 "ws2_32")
(defun get-host-name ()
(multiple-value-bind (retcode name)
(get-host-name-internal)
(when (= 0 retcode)
name)))
What's the usage of GET-HOST-NAME? Can we use CL:MACHINE-INSTANCE
instead? I think they have the same effect:
CL-USER 4 > (machine-instance)
"binghe-mac.local"
CL-USER 5 > (usocket::get-host-name)
"binghe-mac.local"
Thanks,
Chun TIAN (binghe)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/usocket-devel/attachments/20080201/a5ca2259/attachment.html>
More information about the usocket-devel
mailing list