Created attachment 562
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 by bugzilla — 2010-02-08T11:29:05Z
Created attachment 563
D implementation of sys/un.h
Oops... Wrote 'char' instead of 'byte' in the linux version.
Comment #2 by sean — 2010-02-08T20:03:46Z
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 by bugzilla — 2010-02-08T22:55:53Z
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 by sean — 2010-02-09T09:29:32Z
I'd like to use the latest revision of the spec. Work on the headers simply began before 2008 :-)