Different struct sizeof between linux and windows

Vladimir Panteleev via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 17 06:21:04 PDT 2016


On Friday, 17 June 2016 at 13:11:35 UTC, Kagamin wrote:
> time_t is 64-bit on windows: 
> https://msdn.microsoft.com/en-us/library/1f4c8f33.aspx

Windows does not have the concept of "time_t". The C runtime in 
use does.

We use the DigitalMars C runtime for the 32-bit model, which is 
the default one. The Microsoft one is used for 64-bit and 32-bit 
COFF. I'm not sure how the MS C library deals with time_t, 
however the time() function (as exported from the library file / 
DLL) is the 32-bit version. If I were to guess, the C headers 
define a macro which redirects time() calls to the 64-bit version 
when appropriate. The D bindings don't copy that behavior.



More information about the Digitalmars-d-learn mailing list