D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3782 - The POSIX sys/un.h header
Summary: The POSIX sys/un.h header
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: Other All
: P2 enhancement
Assignee: Sean Kelly
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-08 11:24 UTC by Lars T. Kyllingstad
Modified: 2015-06-09 05:13 UTC (History)
0 users

See Also:


Attachments
D implementation of sys/un.h (913 bytes, text/x-dsrc)
2010-02-08 11:24 UTC, Lars T. Kyllingstad
Details
D implementation of sys/un.h (913 bytes, text/plain)
2010-02-08 11:29 UTC, Lars T. Kyllingstad
Details

Note You need to log in before you can comment on or make changes to this issue.
Description Lars T. Kyllingstad 2010-02-08 11:24:20 UTC
Created attachment 562 [details]
D implementation of sys/un.h

I've attached an implementation of the POSIX sys/un.h header, so you can
include it in druntime if you like.  I've tried to follow the format of the
other POSIX headers in druntime as closely as possible.

I may need to implement more of these, so please let me know if you are at all
interested in such contributions.

I hereby release the attached file into the public domain.
Comment 1 Lars T. Kyllingstad 2010-02-08 11:29:05 UTC
Created attachment 563 [details]
D implementation of sys/un.h

Oops... Wrote 'char' instead of 'byte' in the linux version.
Comment 2 Sean Kelly 2010-02-08 20:03:46 UTC
Looks great at a glance.  And I'm not sure if I've said anywhere, but I use the OpenGroup site as a reference for creating the headers: http://www.opengroup.org/onlinepubs/009695399/  I'll double check the header against that and add it before the next release.  Thanks!  And by all means submit more if you'd like.
Comment 3 Lars T. Kyllingstad 2010-02-08 22:55:53 UTC
Ah, as you'll see from the doc comment in the file I used the Open Group site as a source as well, only I used the POSIX:2008 specification (issue 7) at

  http://www.opengroup.org/onlinepubs/9699919799/

I see that the headers in druntime conform to POSIX:2004 (issue 6).  Is it a point to try and keep all of them at the same POSIX version?  For this particular one it doesn't matter, as it hasn't changed since 2004, so it's simply a matter of changing the comment.
Comment 4 Sean Kelly 2010-02-09 09:29:32 UTC
I'd like to use the latest revision of the spec.  Work on the headers simply began before 2008 :-)
Comment 5 Lars T. Kyllingstad 2010-08-11 02:45:10 UTC
Fixed DMD 2.048