You might want to look at core.stdc.config. It contains the essential compatibility stuff for interfacing with C.
Sent from my iPhone On Sep 21, 2011, at 1:01 AM, Gor Gyolchanyan <[email protected]> wrote: > Hello, my dear, beloved D community. > > I've been reading literally all discussions on D.puremagic.com for about a > month now and I'm deeply concerned with my favorite language and it's > reference compiler. > > So, for starters, i decided to add a very useful (in my opinion) module to > phobos: etc.c.compat. > > Here's the pull request: > https://github.com/D-Programming-Language/phobos/pull/265 > > This module is supposed to help people develop bindings for C libraries, by > providing information language-specific information, depending on certain > compiler, processor architecture, operating system, etc. > > Currently there are only aliases for C built-in types, which are static if-ed > to have the correct size for the respective C compilers. > > It's well-documented and waits to be enhanced with more accurate compile-time > branching and additional useful information to make binding C code even > easier. > > If we get a good enough C compatibility module, we'll be able to rapidly bind > all major and frequently-used libraries and include them in phobos. > > This will also do a great job of promoting D as a good language to adopt for > serious projects, because it's standard library will be very rich and common > usage won't require the programmer to resort to anything besides phobos. > > Any comments would be much appreciated.
