mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
main: update Winsock api version to 2.2 (#14909)
not been updated since php 4 whereas 2.2 is available even in Win2000.
This commit is contained in:
parent
3c9ab6eb71
commit
2aeff2c988
1 changed files with 7 additions and 1 deletions
|
@ -2073,7 +2073,7 @@ zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additi
|
|||
zend_module_entry *module;
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
WORD wVersionRequested = MAKEWORD(2, 0);
|
||||
WORD wVersionRequested = MAKEWORD(2, 2);
|
||||
WSADATA wsaData;
|
||||
|
||||
old_invalid_parameter_handler =
|
||||
|
@ -2162,6 +2162,12 @@ zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additi
|
|||
fprintf(stderr, "\nwinsock.dll unusable. %d\n", WSAGetLastError());
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (UNEXPECTED(HIBYTE(wsaData.wVersion) != 2)) {
|
||||
fprintf(stderr, "\nversion not found in winsock.dll. %d\n", WSAGetLastError());
|
||||
WSACleanup();
|
||||
return FAILURE;
|
||||
}
|
||||
php_win32_signal_ctrl_handler_init();
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue