Interfacing D with C: Getting Started
Mike Parker
aldacron at gmail.com
Wed Dec 6 04:27:01 UTC 2017
On Wednesday, 6 December 2017 at 04:14:35 UTC, Arun
Chandrasekaran wrote:
>> In D, long and ulong are always 8 bytes. This lines up with
>> most 64-bit systems under the version(Posix) umbrella, where
>> long and unsigned long are also 8 bytes. However, they are 4
>> bytes on 32-bit architectures. Moreover, they’re always 4
>> bytes on Windows, even on a 64-bit architecture.
>
> Why is this? How are we expected to write cross platform code
> with long/ulong? What are the alternatives?
It's right there in the blog post:
import core.stdc.config : c_ulong, clong;
More information about the Digitalmars-d-announce
mailing list