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.
Created attachment 563 [details] D implementation of sys/un.h Oops... Wrote 'char' instead of 'byte' in the linux version.
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.
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.
I'd like to use the latest revision of the spec. Work on the headers simply began before 2008 :-)
Fixed DMD 2.048