version and debug statements
Sean Kelly
sean at f4.ca
Thu May 11 14:49:29 PDT 2006
Anders F Björklund wrote:
> Brad Roberts wrote:
>
>>> Having large parts of Posix be implementation dependent kinda shoots
>>> the whole
>>> idea of a standard in the foot.
>>
>> I feel the need to cry foul here, a little. Which parts are
>> implementation defined? How widely used are those parts? In my
>> experience, the vast majority of the parts that are used with any
>> major frequency are identical between the various posix compliant
>> operating systems.
>
> And say 10% varies and 90% is the same as the standard, isn't it better
> then to "reuse" those parts that are the same and only conditionalize
> the parts that actually differ ? Instead of copy/paste the whole thing ?
This is what I've been doing in Ares, though it remains to be seen
whether this is the correct approach or not. I've been sticking to the
'required' bits and any additional features needed for D and so far
probably 50% of it is platform-specific. I know you've seen the Ares
Posix headers, but for anyone that hasn't, they are accessible here:
http://svn.dsource.org/projects/ares/trunk/src/ares/std/c/posix/
Note that I precede each section of declarations with a comment block
listing whatever the spec says should be defined for that segment, so
the files are probably twice as long as they should be. The comments
also aren't terribly easy to spot in a browser, but they show up quite
nicely in a code editor :-)
By the way, please note that only the "Required" and "C Extension"
segments are actually necessary. The others are all optional for one
reason or another.
Sean
More information about the Digitalmars-d
mailing list