Bug 4157 – C time functions `localtime_r` and `gmtime_r` are not exposed by core.stdc.time.

Status
RESOLVED
Resolution
INVALID
Severity
minor
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-05-03T21:11:00Z
Last change time
2014-02-15T02:45:57Z
Assigned to
sean
Creator
b.helyer

Attachments

IDFilenameSummaryContent-TypeSize
623time.patchPatch to add function declarations to core.stdc.time.application/octet-stream378

Comments

Comment #0 by b.helyer — 2010-05-03T21:11:14Z
Created attachment 623 Patch to add function declarations to core.stdc.time. Fairly simple. These functions aren't declared when std.c.time is imported. They are not implemented by MSVC, as of VS 2010 (I just looked at the headers, didn't run the compiler). Attached is a patch that adds them under a `version ( Posix )` block.
Comment #1 by b.helyer — 2010-05-03T21:11:44Z
And justification for placing them under 'Posix': http://www.opengroup.org/onlinepubs/009695399/functions/localtime_r.html
Comment #2 by bugzilla — 2010-05-04T01:36:48Z
They are in the core.sys.posix.time module. :) All POSIX extensions to standard C, as well as other POSIX headers, are in the core.sys.posix package.
Comment #3 by bugzilla — 2010-05-04T11:16:53Z
I agree. The core.stdc package should only include Standard C declarations. Posix stuff should go in the posix package.