From: RĂ©mi Denis-Courmont Date: Tue, 20 Jun 2006 14:33:48 +0000 (+0000) Subject: There is no such a thing as Winsock 2.0. Use version 2.2 instead. X-Git-Tag: 0.9.0-test0~10960 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=99226c9857b1ece2890937c7ba0b6a810edd7192;p=vlc There is no such a thing as Winsock 2.0. Use version 2.2 instead. Microsoft was probably too much afraid that developpers would request version 0.2 instead of 2.0 so they switched straight from 1.1 to 2.2. --- diff --git a/src/misc/win32_specific.c b/src/misc/win32_specific.c index 9df143ec0d..55f5abd533 100644 --- a/src/misc/win32_specific.c +++ b/src/misc/win32_specific.c @@ -84,19 +84,16 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) mdate(); /* WinSock Library Init. */ - if( !WSAStartup( MAKEWORD( 2, 0 ), &Data ) ) + if( !WSAStartup( MAKEWORD( 2, 2 ), &Data ) ) { - /* Confirm that the WinSock DLL supports 2.0.*/ - if( LOBYTE( Data.wVersion ) != 2 || HIBYTE( Data.wVersion ) != 0 ) - { + /* Aah, pretty useless check, we should always have Winsock 2.2 + * since it appeared in Win98. */ + if( LOBYTE( Data.wVersion ) != 2 || HIBYTE( Data.wVersion ) != 2 ) /* We could not find a suitable WinSock DLL. */ WSACleanup( ); - } else - { /* Everything went ok. */ return; - } } /* Let's try with WinSock 1.1 */ @@ -104,20 +101,14 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) { /* Confirm that the WinSock DLL supports 1.1.*/ if( LOBYTE( Data.wVersion ) != 1 || HIBYTE( Data.wVersion ) != 1 ) - { /* We could not find a suitable WinSock DLL. */ WSACleanup( ); - } else - { /* Everything went ok. */ return; - } } fprintf( stderr, "error: can't initialize WinSocks\n" ); - - return; } /*****************************************************************************