Re: [racket] FFI and C header defines

2015-02-06 Thread Eric Dobson
I wrote something similar for my LLVM bindings, after running into many issues with Dave's code. It follows the c spec not c++, and doesn't support gcc extensions which many libaries use. It is no where near production quality, but may give you a starting point: https://github.com/shekari/racket-l

Re: [racket] FFI and C header defines

2015-02-06 Thread Bartosz Przygoda
Hello again, Looks like this ( http://docs.racket-lang.org/inside/Writing_Racket_Extensions.html?q=#%28part._.Declaring_a_.Module_in_an_.Extension%29) solves it the way I wante

Re: [racket] FFI and C header defines

2015-02-05 Thread Anthony Carrico
On 02/05/2015 05:01 PM, Jens Axel Søgaard wrote: > Maybe you can find something useful here: > http://pkg-build.racket-lang.org/doc/c-utils/index.html Hey, this is pretty cool. I wonder if Dave Herman has thought of bolting this to Clang. -- Anthony Carrico signature.asc Description: Ope

Re: [racket] FFI and C header defines

2015-02-05 Thread Bartosz Przygoda
This looks great, but for what I want to achieve, something else is needed - as far as I understand - something akin to simple native callback that would be called on the beginning of module evaluation and it would add some defines (using Racket C API). On Thu, Feb 5, 2015 at 11:01 PM, Jens Axel S

Re: [racket] FFI and C header defines

2015-02-05 Thread Jens Axel Søgaard
Maybe you can find something useful here: http://pkg-build.racket-lang.org/doc/c-utils/index.html /Jens Axel 2015-02-05 22:38 GMT+01:00 Bartosz Przygoda : > Hello, > > I'm implementing FFI for termios functions (I noticed Python has got all > this covered: serial, termios, fnctl and so on, wh

[racket] FFI and C header defines

2015-02-05 Thread Bartosz Przygoda
Hello, I'm implementing FFI for termios functions (I noticed Python has got all this covered: serial, termios, fnctl and so on, whereas Racket seemed not (at least serial, which I'm trying to do next)), and I'm wondering how to tackle the values defined in C headers (especially those that are depe