[plt-scheme] libc and the FFI - sqld-psql-ffi

From: Hans Oesterholt-Dijkema (hdnews at gawab.com)
Date: Wed May 30 17:58:35 EDT 2007

Thanks. I'm happy to announce a sqld-psql driver based on the FFI then.
One can download it from PLaneT.

--Hans


Matthew Flatt schreef:
> At Wed, 30 May 2007 21:48:27 +0200, Hans Oesterholt-Dijkema wrote:
>   
>> Does that work on windoze?
>>     
>
> Yes.
>
> (You're right to be suspicious, because shared-library symbol lookup
> works differently under Windows. But we were able to make `ffi-lib' and
> `get-ffi-obj' behave more the same.)
>
> Matthew
>
>   
>> Jim Meier schreef:
>>     
>>> You can load the "current" program symbol table with ffi by giving #f 
>>> as the library name:
>>>
>>>   (define libc (ffi-lib #f))
>>>
>>> So to grab the abort() function, for example,
>>>
>>>   (define  abort (get-ffi-obj "abort" libc (_fun -> _void))
>>>
>>> Good Luck,
>>> -J
>>>
>>> On 30-May-07, at 1:31 PM, Hans Oesterholt-Dijkema wrote:
>>>
>>>       
>>>> Dear All,
>>>>
>>>> If I need some function from libc, how can I
>>>> load the right library with ffi-lib?
>>>>
>>>> /usr/lib/libc.so tends to be some LD script:
>>>>
>>>> e.g. (for a recent debian installation)
>>>>
>>>> /* GNU ld script
>>>>   Use the shared library, but some functions are only in
>>>>   the static library, so try that secondarily.  */
>>>> OUTPUT_FORMAT(elf32-i386)
>>>> GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )
>>>>
>>>> What to do?
>>>>
>>>> --Hans
>>>>
>>>>
>>>>
>>>>
>>>> _________________________________________________
>>>>  For list-related administrative tasks:
>>>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>>>         
>>>       
>> _________________________________________________
>>   For list-related administrative tasks:
>>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>     
>
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070530/bfecec57/attachment.html>

Posted on the users mailing list.