[cffi-devel] Grovelling 64-bit constants

Stelian Ionescu stelian.ionescu-zeus at poste.it
Tue Feb 10 22:42:09 UTC 2009


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 ?

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: grovel.c
Type: text/x-csrc
Size: 2070 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20090210/72d4653a/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20090210/72d4653a/attachment.sig>


More information about the cffi-devel mailing list