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
_______________________________________________
Gcl-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gcl-devel