D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6450 - struct tm definition too short in std.c.linux.linux
Summary: struct tm definition too short in std.c.linux.linux
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D1 (retired)
Hardware: Other Linux
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-07 11:59 UTC by Graham
Modified: 2017-10-03 07:10 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Graham 2011-08-07 11:59:34 UTC
The struct tm definition in module std.c.linux.linux line 276 is 11 integers (44 bytes)  in size. The gmtime_r() function in the x86_64 standard C library fills in 56 bytes of data. There appears to be a mismatch in the structure definitions.

DMD64 D Compiler v1.069
Comment 1 RazvanN 2017-10-03 07:10:38 UTC
The code in the initial bug report has been moved to druntime in src/core/stdc/time.d and it seems to implement the tm struct according to the one in glibc. After looking into the gtime_r function in glibc it looks like it does initialize the tm struct values, but it uses some other internal variables, so maybe it does fill 56 bytes of data, but not all are belonging to the tm struct.

Closing as invalid. Reopen if I am missing something.