[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Problem compiling embedded C code
From: |
jeff |
Subject: |
[Gcl-devel] Problem compiling embedded C code |
Date: |
Fri, 08 Feb 2008 15:52:07 +0000 |
User-agent: |
Internet Messaging Program (IMP) H3 (4.0.4) |
As I mentioned in an earlier message, I am trying to get some
software -- O-Plan, an AI planning system -- to work in a current
GCL. I think I've mostly succeeded, for the Lisp code.
However, I also have some embedded C code, defined with Clines,
defentry and so on, and I can't get it to even compile successfully.
(I'm using gcl-2.6.8pre.)
Example:
(compile-file "c-example.lsp")
Compiling c-example.lsp.
End of Pass 1. End of Pass 2. c-example.c:5150: error: static
declaration of ?zwait? follows non-static declaration
c-example.h:3: error: previous declaration of ?zwait? was here
For this source:
;;; The recommended macro...
(eval-when (eval compile)
(set-macro-character #\%
#'(lambda (s c) (declare (ignore c)) (values (read-line s)))))
;;; (WAIT) returns (pid . status) when the next child exits.
(Clines
% static object zwait()
% {
% int status = -1, pid;
% object result;
% extern int errno;
% check_arg(0);
% pid = wait(&status);
% result = make_cons(Cnil, Cnil);
% vs_push(result);
% result->c.c_car = make_fixnum(pid);
% result->c.c_cdr = make_fixnum(pid != -1 ? status : errno);
% return(vs_pop);
% }
)
(defentry wait () (object zwait))
-- Jeff
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gcl-devel] Problem compiling embedded C code,
jeff <=