[Ecls-list] largefile support and 64-bit foreign types on 32-bit platforms
Stelian Ionescu
sionescu at common-lisp.net
Sun Jun 1 22:17:54 UTC 2008
In order to be able to be able to have file offsets larger than 32
bit(for files larger than 2 GB) some OSes(Linux and IIRC Solaris too)
require to compile with special flags: on Linux those are
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 . When
those flags are enabled several C types become promoted from 32-bit to
64-bit, more notably off_t, several structs change layout becoming
larger(struct stat for instance) and alternative implementations of
several syscalls get activated through GCC magic: stat() and readdir()
for instance.
I think that ECL should always be compiled with largefile support on
Linux and that two additional 64-bit FFI types should be added:
:long-long and :unsigned-long-long. Read and write operations on those
types would be done with two consecutive 32-bit operations, just like
SBCL, Clisp or GCC do.
--
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20080602/c86d4774/attachment.sig>
More information about the ecl-devel
mailing list