Subject: Re: [clisp-list] Re: FFI errors - tracking them closer

From: Sam Steingold <[email-masked]>
Date: Fri Sep 12 21:48:04 2003

>* Fred Cohen <[email-masked]> [2003-09-12 21:22:12 -0700]:
>
> > I _really_ urge you to include headers instead.
> 
> You mean create a .h file to declare everything in my C program
> externally and then include it in call-rawsock.lisp somehow?

the usual situation is when you have a library (.dll or .so or .a) and
a header file, so what you do is

(c-lines "#include <mylib.h>~%")

instead of relying on CLISP producing the correct prototypes.

of course, CLISP _will_ (_usually_!) produce correct K&R declarations,
but why bother if you already have good prototypes elsewhere?

there are exceptions, of course, e.g., if all you have is a single C
file.  but even then you might probably get away with this including it
into the lisp file with c-lines and then _not_ compiling the original C
files but only the generated C file.

YMMV.

_PLEASE_ do not CC me when you write to the list.
_PLEASE_ do not drop the list from your replies.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Bus error -- driver executed.