You're never going to be able to take a C or C++ file and compile at as D code, and you can't just `#include` C headers in D. D is _not_ backwards compatible with either C or C++. Rather, it's possible to declare `extern©` functions in your D code and call those C functions as if they were D functions (naturally, you then have to link with the C library that they're defined in). See
* [Interfacing to C](
[To see links please register here]
)
* [Interfacing to C++](
[To see links please register here]
)
* [Converting C.h Files to D Modules](
[To see links please register here]
)
for details on calling C code from D.
druntime (which contains the core.* modules) has declarations for quite a few of the standard C and OS functions (in the core.stdc.* and core.sys.* modules), but you'll have to look at the druntime files yourself to see what they are, because they're not properly documented at this point. For any other C functions that you want to call, you can easily create declarations for them yourself, as described in the links above.
Now, C and D are very similar syntactically, so some sections of C code will compile just fine as D code, but programs as a whole will not. The general rule is that C/C++ code will either compile as valid D code with the same semantics, or it won't compile as D code. There are a few cases where that isn't true (e.g. static arrays are value types in D, unlike C/C++), but it is in almost all cases. This makes *porting* C/C++ code to D fairly easy, but it was never intended that D be backwards compatible with C code in the way that C++ is.