[uClibc]Re: struct __res_state _res in resolver

Erik Andersen andersen at codepoet.org
Wed Apr 17 12:46:00 UTC 2002


On Mon Apr 15, 2002 at 01:07:26AM -0700, Axel Barnitzke wrote:
> I use the given resolve.c and add a minimal res_init/res_state/res_close
> functionality. I don't use the full __res_state structure because it
>  seems to be to big. Instead I use a __res_state pointer and everybody
> who needs the structure gets an unref to the at runtime allocated
> structure. I fill in the minimum necessary fields and just make
> references to the already allocated 'nameserver' and  'searchdomain' arrays.
> So everybody who needs this gets a dynamically allocated structure with
> the most important fields set up. And everybody who doesn't need that
> gets some more lines of code.

I think this looks fine, and has been on the TODO list for some
time now.  I agree fully with the approach you have taken -- most
of the junk in struct __res_state is useless so leaving those
blank is fine by me.  Applied, thanks!

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the uClibc mailing list