From: Ryan Pavlik Date: Wed, 11 Jan 2012 17:06:50 +0000 (+0100) Subject: Use WSAStartup()/WSACleanup() on WIN32 X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31b57676e8d7ab6048dbfb145187833fac5e478c;hp=31b57676e8d7ab6048dbfb145187833fac5e478c;p=free-sw%2Fxcb%2Flibxcb Use WSAStartup()/WSACleanup() on WIN32 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 Signed-off-by: Julien Danjou ---