[Ecls-list] gethostname, machine-instance & friends
David_Creelman at pa.com.au
David_Creelman at pa.com.au
Wed Jun 27 00:21:06 UTC 2007
Hi,
There is a similar problem with CLX and hostname.
By default (before the patch I submitted got put in) it looked at
machine-instance and failed too.
There should be a socket implementation in ECL anyway. Will that work?
Regards
David
"Thibault Langlois"
<tl at di.fc.ul.pt> To: "Erik Huelsmann" <ehuels at gmail.com>
Sent by: cc: ecls-list at lists.sourceforge.net
ecls-list-bounces at lists.sour Subject: Re: [Ecls-list] gethostname, machine-instance & friends
ceforge.net
26/06/2007 08:49 AM
Please respond to tl
On 6/25/07, Erik Huelsmann <ehuels at gmail.com> wrote:
> On 6/25/07, Thibault Langlois <tl at di.fc.ul.pt> wrote:
> > Hello,
> >
> > I would like to have access to the name of the machine, something like
> > SBCL's (sb-unix:unix-gethostname). Is there an equivalent for ECL ?
> >
> > If there is one, maybe it could be used in the definition of the
> > MACHINE-INSTANCE function.
> >
> > With a freshly build ECL we get:
> > CL-USER> (machine-instance)
> > "x86_64"
> > CL-USER> (machine-type)
> > "X86_64"
> > CL-USER> (machine-version)
> > "unknown"
> >
> > A quick and dirty linux-only solution may be:
> >
> > (defun gethostname ()
> > (with-open-file (f "/proc/sys/kernel/hostname")
> > (read f nil nil))
> >
> > Any suggestion ?
>
> Use usocket (http://common-lisp.net/project/usocket) and be done with
> usocket::get-host-name on all supported implementations (including
> ECL).
>
> bye,
>
> Erik.
>
>
Thanks for telling me about usocket.
The whole story is that I wanted to make cl-smtp work with ECL. The
CVS version of cl-smtp does not have code for ECL. I thought that it
would be easy to make it work since ECL has a socket package similar
to SBCL's. cl-smtp has implementation-specific code in files named
after each implementation. I started to copy sbcl.lisp to ecl.lisp and
then I noticed the use of (sb-unix:unix-gethostname). This is why I
sent my message in the first place.
Now I saw in the change log that you recently made changes to usocket
with respect to cl-smtp: "Add cl-smtp 'requirement': get-host-name
(ECL backend)."
So this is good news for me ! I guess I only have to tell cl-smtp to
use usocket isn't it ? How can I do that ?
Thibault
PS: I am not with my development machine right now so I did not tried
to use usocket yet.
--
Thibault Langlois
FCUL / DI
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Ecls-list mailing list
Ecls-list at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list
More information about the ecl-devel
mailing list