Re: glibc resolve.h for D

2017-02-08 Thread Seb via Digitalmars-d
On Wednesday, 8 February 2017 at 12:49:39 UTC, Márcio Martins 
wrote:

Anyone has a binding readily available that I can use?
code.dlang.org is down, so I can't check there - I am in a 
hurry! :)


Use dstep to generate the binding automatically:

https://github.com/jacob-carlborg/dstep


Re: glibc resolve.h for D

2017-02-08 Thread John Colvin via Digitalmars-d
On Wednesday, 8 February 2017 at 12:49:39 UTC, Márcio Martins 
wrote:

Anyone has a binding readily available that I can use?
code.dlang.org is down, so I can't check there - I am in a 
hurry! :)


I dont' have one, but if you're in a hurry then copy and port the 
C function/constant defs and port them one-by-one as you need 
them (it's not like you're going to call every single function 
and use every single constant are you?). It's a tiny amount of 
work.


I often write as if I *have* ported the header and then just use 
the compiler errors to fill in the gaps.



P.S. there's no need to port the __res_state struct as afaics 
it's never used directly in the API:


struct __res_state;
alias res_state = __res_state*;

will do fine.


glibc resolve.h for D

2017-02-08 Thread Márcio Martins via Digitalmars-d

Anyone has a binding readily available that I can use?
code.dlang.org is down, so I can't check there - I am in a hurry! 
:)