On 2/1/08, Chun Tian (binghe) binghe.lisp@gmail.com wrote:
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.
GET-HOST-NAME was added for cl-smtp, which depends on it. Is "machine-instance" documented to return the hostname of the current machine?
Bye,
Erik.