[cffi-devel] Grovelling 64-bit constants

Julian Stecklina js at alien8.de
Wed Feb 11 00:16:38 UTC 2009


Stelian Ionescu <stelian.ionescu-zeus at poste.it> writes:

> On Tue, 2009-02-10 at 19:12 +0100, Julian Stecklina wrote:
>> Hello,
>> 
>> I am trying to grovel some constants from libraw1394 and came across
>> this problem:
>> 
>> libraw1394/csr.h contains:
>> #define CSR_REGISTER_BASE  0xfffff0000000ULL
>> 
>> Grovelling this using
>> (include "libraw1394/csr.h")
>> (constant (+csr-register-base+ "CSR_REGISTER_BASE"))
>> sets +csr-register-base+ to -268435456.
>> 
>> This is with the current version of cffi from darcs on SBCL 1.0.25
>> (Linux x86).
>
> I too use this configuration and I get
> (cl:defconstant +csr-register-base+ 281474708275200)
>
> What gcc version are you using ? Could you compile and run the attached
> C file and tell me what it reports ?

Works... Sorry, I had CFFI 0.10.4 in my ASDF path. The darcs version
works fine.

Regards,
-- 
Julian Stecklina

Well, take it from an old hand: the only reason it would be easier to
program in C is that you can't easily express complex problems in C,
so you don't. - Erik Naggum (in comp.lang.lisp)





More information about the cffi-devel mailing list