Will the core.stdc module be updated for newer versions of C?

Laurent Tréguier laurent.treguier.sink at gmail.com
Mon Sep 10 16:50:05 UTC 2018


On Monday, 10 September 2018 at 07:43:52 UTC, Jonathan M Davis 
wrote:
> Historically, most of the Win32 API has been missing from 
> druntime, and many of the symbols were in the wrong place (they 
> should really be in modules corresponding to the C headers that 
> the symbols come from, but many of them were just put in 
> core.sys.windows.windows as if everything were in windows.h). 
> Most folks doing serious stuff with the Win32 API used to use 
> an external project that had a much more thorough version of 
> the bindings (though I can't find it at the moment, looking 
> around for D projects with Win and API in the name, so I don't 
> know what happened to it). However, looking over what's in 
> druntime for Windows now, it looks like Vladimir added a ton of 
> bindings back in 2015 (probably from that external project). 
> So, it would appear that the situation for the Windows bindings 
> in druntime is _way_ better than it used to be.
>
> Regardless, if you find that a particular binding is missing, 
> feel free to create a PR for it. Usually, such bindings only 
> get added when someone wants to use a particular C function and 
> then discovers that the binding is missing, so they create a PR 
> to add it. It's not like we have a system for discovering all 
> of the bindings that are supposed to be there, and while 
> occasionally, someone will make an effort to make the bindings 
> more comprehensive, it's not something that's regularly worked 
> on.
>
> - Jonathan M Davis

I don't remember what API I was thinking about using and didn't 
find in druntime, but as far as I can recall I ended up using 
another API anyway.

I just pulled up a Bash for Windows prompt:

$ cd /mnt/b/Program\ 
Files/D/dmd2/src/druntime/src/core/sys/windows
$ ls *.d | wc -l
165
$ cd /mnt/c/Program\ Files\ \(x86\)/Windows\ Kits/10/Include
$ ls 10.0.17134.0/um/*.h | wc -l
1443

I think that perhaps I see know why the bindings aren't going get 
an overhaul and be up to date just like that...

I'll be sure to make a PR whenever I stumble upon missing ones I 
feel like using though.


More information about the Digitalmars-d mailing list