[PATCH 1/2] dnsapi: migrating to res_nquery and partial DnsQueryEx implementation

Hans Leidekker hans at codeweavers.com
Mon Jan 11 03:40:01 CST 2016


On Sun, 2016-01-10 at 16:55 +0300, Donat Enikeev wrote:
> There was a note about res_query bug in MacOSX 10.4:
>  /* call res_init() just once because of a bug in Mac OS X 10.4, call once per thread on systems that have per-thread _res */
> 
> I've removed it while migratign to res_nquery, let me please clarify reasons:
> 
> 1. I found no proof that bug is fair for res_nquery for MacOSX 10.4
> 2. I believe that generally res_init was not designed to be reliable under several calls
> Quote from manual: "res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe"

That information is outdated, _res is a per-thread variable on modern systems.
In any case, you should put the implementation of DnsQueryEx in a separate patch.





More information about the wine-devel mailing list