D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4157 - C time functions `localtime_r` and `gmtime_r` are not exposed by core.stdc.time.
Summary: C time functions `localtime_r` and `gmtime_r` are not exposed by core.stdc.time.
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All All
: P2 minor
Assignee: Sean Kelly
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-03 21:11 UTC by Bernard Helyer
Modified: 2014-02-15 02:45 UTC (History)
2 users (show)

See Also:


Attachments
Patch to add function declarations to core.stdc.time. (378 bytes, application/octet-stream)
2010-05-03 21:11 UTC, Bernard Helyer
Details

Note You need to log in before you can comment on or make changes to this issue.
Description Bernard Helyer 2010-05-03 21:11:14 UTC
Created attachment 623 [details]
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 Bernard Helyer 2010-05-03 21:11:44 UTC
And justification for placing them under 'Posix':

http://www.opengroup.org/onlinepubs/009695399/functions/localtime_r.html
Comment 2 Lars T. Kyllingstad 2010-05-04 01:36:48 UTC
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 Walter Bright 2010-05-04 11:16:53 UTC
I agree. The core.stdc package should only include Standard C declarations. Posix stuff should go in the posix package.