Commit Graph

14 Commits

Author SHA1 Message Date
Abdulaziz Ghuloum 7e965758cf Added memcpy (courtesy of Andreas Rottmann).
The `memcpy' procedure allows to copy memory from bytevectors to
  unmanaged (malloc'ed) memory and vice-versa.
2009-04-30 12:35:49 +03:00
Abdulaziz Ghuloum 2f4a2f3895 The code for converting signed long long numbers to scheme bignums
was broken (on 32-bits, the 64-bit value was put in a bignum of 1
limb instead of 2).  Thanks to Andreas Rottmann for reporting it.
2009-04-30 12:25:17 +03:00
Abdulaziz Ghuloum 6bab4af5b4 Added [un]signed-long-long types as valid parameter types to
callouts and callbacks (in both 32 and 64 bit modes). (UNTESTED)
2009-04-11 02:16:00 +03:00
Abdulaziz Ghuloum d35f039ca1 ikrt_last_errno moved to ikarus-runtime where it belongs 2008-11-26 05:03:16 -05:00
Abdulaziz Ghuloum 6922b0d9c2 added pointer-ref-{unsigned-,}long-long 2008-11-21 05:56:51 -05:00
Abdulaziz Ghuloum 25f40fefb0 Added the following file system primitives
- file-readable? path -> boolean
 - file-writable? path -> boolean
 - file-executable? path -> boolean
 - file-size path -> integer
 - rename-file source dest -> void
(thanks to Andreas Rottmann)
2008-11-10 23:36:11 -05:00
Abdulaziz Ghuloum 69c62649cc - defined RTLD_LOCAL for cygwin (possibly incorrect)
- added a missing save to a callee-save register (%edi) 
  when entering/reentering to Scheme which caused Ikarus
  not to run properly depending on whether or not gcc places
  the pcb in %edi or not during Scheme execution.
- updated lab/test-ffi.ss to use the new names for foreign
  types, etc.
2008-10-07 02:46:56 -04:00
Abdulaziz Ghuloum 1e5e516b08 - added (ikarus foreign) library that should be used instead of
(ikarus system $foreign).
- changed the names of some of the pointer primitives
- changed the name of the procedure make-ffi to make-callout
- updated examples and libraries to conform with new names
- updated the users guide to provide a complete description of 
  the (ikarus foreign) library
- updated list of missing R6RS features in the users guide
2008-10-06 01:19:27 -04:00
Abdulaziz Ghuloum 61ecbe0dd1 - opengl demos from ypsilon (gears and glut-demo) now work under
ikarus's ffi using a compatibility layer.
2008-09-23 07:48:16 -04:00
Abdulaziz Ghuloum 31f5f88889 first test of ffi works:
> (import (ikarus system $foreign))
> (((ffi-prep-cif 'void '(uint32))
    (dlsym (dlopen #f) "hello_world"))
   10)
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
>
2008-09-14 04:17:24 -07:00
Abdulaziz Ghuloum 9f2d7484ab fixed uint/ulong pointer ref bug (and added appropriate tests). 2008-09-14 00:38:59 -07:00
Abdulaziz Ghuloum 8e750562d6 - Added memory operations on pointer types for setting and accessing
char, short, int, and long values from pointer arrays.
2008-09-13 07:49:17 -07:00
Abdulaziz Ghuloum e05e84d1c2 Added dlopen, dlclose, dlerror, dlsym, malloc, and free to
(ikarus system $foreign).
2008-09-12 14:22:57 -07:00
Abdulaziz Ghuloum afc9bff07f - added experimental pointer manipulation primitives. 2008-09-06 06:01:39 -07:00