Re: suggestions for long long?

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Wed, 3 Apr 2002 11:04:06 -0700 (MST)
Newsgroups gmane.lisp.uffi.devel
Message-ID <Pine.LNX.4.44.0204031101250.468-100000__48140.3542137288$1044159121@boa.b9.com>
> The database library I'm working with has 64 bit integer fields 
> (long-long and unsigned-long-long) so I have functions that need this 
> as both a parameter and a return value. MCL does not have a long-long 
> primitive and it looks like the others don't have one either. Perhaps 
> it could be accomplished with an array or struct but I think it will 
> need some special care since Mac and Windows use different byte 
> ordering.

Take a look at CLSQL interfaces/clsql-uffi/clsql-uffi.c and .cl as well as
interfaces/mysql/clsql-mysql.c and .cl. These are wrapper libraries to
handle 64-bit C functions. They take and return 32-bit integers between
Lisp and the 64-bit C functions.

Yes, you will need to account for endian differences. I do this in UFFI's 
examples/union.cl.

Kevin