[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

system calls



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))