On Friday, 29 March 2019 at 22:48:47 UTC, Chris Katko wrote:
What's the easiest way to use POSIX and Linux-specific C include files?

For standard ones, they are pre-done for you under the `core.sys.posix` D package namespace (or `core.sys.linux` for Linux-specific ones).

For ones not in the standard... it depends. I don't know the libprocps one, but I can say in general:

Do I need to implement every piece of a C header / library, or can I get away with a tiny subset that I'm actually using?

I say do the bare minimum that works for you. Just the functions, structs, and values you use. And if you are using structs exclusively via pointers, you don't even need their definitions; you can cheat and use void* instead.

Reply via email to