ImportC and druntime's importc.h and __builtins.di

Adam Wilson flyboynw at gmail.com
Sun Sep 10 02:19:58 UTC 2023


On Sunday, 3 September 2023 at 08:55:13 UTC, Walter Bright wrote:
> https://github.com/dlang/dmd/blob/master/druntime/src/importc.h
>
> To fix the problem you've encountered, adding a macro to 
> importc.h can get your code moving again (and please file a 
> bugzilla or a PR so everyone can take advantage of your 
> findings!).
>
> Another file used to compensate for nutburger C compiler 
> extensions is __builtins.di:
>
> https://github.com/dlang/dmd/blob/master/druntime/src/__builtins.di
>
> which, having access to D's constructions, can often fake a C 
> compiler extension. __builtins.di is also automatically 
> imported by every compilation of an ImportC C file.

importc.h is how I nullified MSFT's idiotic #define based 
metadata annotations that liter all of their header files while 
at DConf. One small step closer to jettisoning the hopelessly 
outdated MinGW header translations from the Windows XP era...

It Works.


More information about the Digitalmars-d mailing list