#1 wininet: Make resolving hostnames thread-safe. try2

Rob Shearman robertshearman at gmail.com
Sat May 31 16:50:42 CDT 2008


2008/5/31 Hans Leidekker <hans at it.vu.nl>:
>  Make resolving hostnames thread-safe.
>
> +/* critical section to protect non-reentrant gethostbyname() */
> +CRITICAL_SECTION cs_gethostbyname;
> +static CRITICAL_SECTION_DEBUG critsect_debug =
> +{
> +    0, 0, &cs_gethostbyname,
> +    { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
> +      0, 0, { (DWORD_PTR)(__FILE__ ": cs_gethostbyname") }
> +};
> +CRITICAL_SECTION cs_gethostbyname = { &critsect_debug, -1, 0, 0, 0, 0 };

cs_gethostbyname should be static.

-- 
Rob Shearman



More information about the wine-devel mailing list