[Xcb] [PATCH 3/3] Use WSAStartup()/WSACleanup() on WIN32

Peter Harris pharris at opentext.com
Wed Jan 11 08:52:38 PST 2012


On 2012-01-09 09:09, Jon TURNEY wrote:
> From: Ryan Pavlik <rpavlik at iastate.edu>
> 
> The alternative is to use these in every WIN32 application which uses xcb. Doing
> it this way should be safe, as, according to MSDN, "There must be a call to
> WSACleanup for each successful call to WSAStartup. Only the final WSACleanup
> function call performs the actual cleanup. The preceding calls simply decrement
> an internal reference count"
> 
> (We should probably also include ws2_32 in Libs.private for libxcb, as anything
> which links with libxcb will also need that, but there seems to be some pkg-config
> issues to resolve first...)
> 
> v2: Check for errors so WSAStartup()/WSACleanup() uses are balanced
> v3: Use same indentation style as surrounding code

Reviewed-by: Peter Harris <pharris at opentext.com>

Peter Harris
-- 
               Open Text Connectivity Solutions Group
Peter Harris                    http://connectivity.opentext.com/
Research and Development        Phone: +1 905 762 6001
pharris at opentext.com            Toll Free: 1 877 359 4866


More information about the Xcb mailing list