www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4157] New: C time functions `localtime_r` and `gmtime_r` are not exposed by core.stdc.time.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4157

           Summary: C time functions `localtime_r` and `gmtime_r` are not
                    exposed by core.stdc.time.
           Product: D
           Version: 2.041
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: druntime
        AssignedTo: sean invisibleduck.org
        ReportedBy: blood.of.life gmail.com


--- Comment #0 from Bernard Helyer <blood.of.life gmail.com> 2010-05-03
21:11:14 PDT ---
Created an attachment (id=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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 03 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4157



--- Comment #1 from Bernard Helyer <blood.of.life gmail.com> 2010-05-03
21:11:44 PDT ---
And justification for placing them under 'Posix':

http://www.opengroup.org/onlinepubs/009695399/functions/localtime_r.html

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 03 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4157


Lars T. Kyllingstad <bugzilla kyllingen.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla kyllingen.net
         Resolution|                            |INVALID


--- Comment #2 from Lars T. Kyllingstad <bugzilla kyllingen.net> 2010-05-04
01:36:48 PDT ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 04 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4157


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com


--- Comment #3 from Walter Bright <bugzilla digitalmars.com> 2010-05-04
11:16:53 PDT ---
I agree. The core.stdc package should only include Standard C declarations.
Posix stuff should go in the posix package.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 04 2010