[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
system calls
- To: kcl@cli.com
- Subject: system calls
- From: djb@hoppi.mitre.org (David J. Braunegg)
- Date: Wed, 23 Jan 91 12:57:45 -0500
- Posted-from: The MITRE Corp., Bedford, MA
How can I use a system call in Clines? The C code I am using works
fine with CC, but loses inside of AKCL.
Thanks,
Dave
>(load "test")
Loading test.o
undefined _gethostname symbolstart address -T 24cc30 Finished loading test.o
232
Where the file test.lsp is
(in-package 'user)
(Clines
"
#include <sys/param.h>
#include <syscall.h>
object machine_instance()
{
char *host_name[MAXHOSTNAMELEN];
gethostname(host_name, MAXHOSTNAMELEN);
return(make_simple_string(host_name));
}")
(defentry machine-instance-from-c () (object machine_instance))
(defun machine-instance ()
(machine-instance-from-c))