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

Adam Wilson flyboynw at gmail.com
Mon Sep 11 03:44:20 UTC 2023


On Monday, 11 September 2023 at 01:30:16 UTC, Walter Bright wrote:
> On 9/9/2023 7:19 PM, Adam Wilson wrote:
>> 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.
>
> I hope you did a PR for it!
>
> Microsoft headers also include inline assembly with no way to 
> turn it off. Sigh. I was forced to try supporting their inline 
> assembler.

Merged it at DConf. No more SAL nonsense from MSFT headers. Ever.

Microsoft headers are full of aggravation. Speaking of, have you 
had a chance to look at this aggravation yet? 
https://issues.dlang.org/show_bug.cgi?id=24132

I also have this one open: 
https://issues.dlang.org/show_bug.cgi?id=24121
Making ImportC work with DI files can offer us a potential 
fast-path to automated binding generation directly from the 
compiler. It'll take more work to make this work with the MSFT 
headers, but once we do, we could theoretically replace that 
giant pile of nastiness that are the MinGW translations with a 
nice, clean ImportC auto-generated files that are much easier to 
keep synchronized with the canonical Windows SDK headers.


More information about the Digitalmars-d mailing list