Best way to confine project to 64 bit builds only?

2020-10-17 Thread NonNull via Digitalmars-d-learn
I have inherited an open source C project that assumes that the size of a long and the size of a pointer are the same, and I have translated it into very similar D just like https://dlang.org/blog/2018/06/11/dasbetterc-converting-make-c-to-d/ D has the size of long fixed at 64 bits, so a point

Re: Best way to confine project to 64 bit builds only?

2020-10-17 Thread Basile B. via Digitalmars-d-learn
On Saturday, 17 October 2020 at 14:50:47 UTC, NonNull wrote: I have inherited an open source C project that assumes that the size of a long and the size of a pointer are the same, and I have translated it into very similar D just like https://dlang.org/blog/2018/06/11/dasbetterc-converting-make

Re: Best way to confine project to 64 bit builds only?

2020-10-17 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 17 October 2020 at 14:50:47 UTC, NonNull wrote: I have inherited an open source C project that assumes that the size of a long and the size of a pointer are the same static assert(long.sizeof == void*.sizeof);

Re: Best way to confine project to 64 bit builds only?

2020-10-17 Thread Dennis via Digitalmars-d-learn
On Saturday, 17 October 2020 at 14:50:47 UTC, NonNull wrote: I have inherited an open source C project that assumes that the size of a long and the size of a pointer are the same, and I have translated it into very similar D just like https://dlang.org/blog/2018/06/11/dasbetterc-converting-make

Re: Best way to confine project to 64 bit builds only?

2020-10-17 Thread NonNull via Digitalmars-d-learn
On Saturday, 17 October 2020 at 14:56:33 UTC, Basile B. wrote: On Saturday, 17 October 2020 at 14:50:47 UTC, NonNull wrote: I have inherited an open source C project that assumes that the size of a long and the size of a pointer are the same, and I have translated it into very similar D just li

Re: Best way to confine project to 64 bit builds only?

2020-10-17 Thread NonNull via Digitalmars-d-learn
On Saturday, 17 October 2020 at 14:56:35 UTC, Adam D. Ruppe wrote: On Saturday, 17 October 2020 at 14:50:47 UTC, NonNull wrote: I have inherited an open source C project that assumes that the size of a long and the size of a pointer are the same static assert(long.sizeof == void*.sizeof); Th

Re: Best way to confine project to 64 bit builds only?

2020-10-17 Thread NonNull via Digitalmars-d-learn
On Saturday, 17 October 2020 at 15:03:29 UTC, Dennis wrote: If you want to exactly match the original C code's semantics, I suggest translating (unsigned) long with c_long or c_ulong. You can import them here: ``` import core.stdc.config: c_long, c_ulong; ``` Then you could add this: ``` stati