mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Use <winsock2.h> instead of legacy <winsock.h> (#19037)
This also omits defining unused HAVE_WINSOCK_H macro when building ext/sockets.
This commit is contained in:
parent
aa366b5113
commit
c2af281c0c
2 changed files with 2 additions and 3 deletions
|
@ -26,7 +26,7 @@
|
||||||
#ifndef PHP_WIN32
|
#ifndef PHP_WIN32
|
||||||
#include <netinet/tcp.h>
|
#include <netinet/tcp.h>
|
||||||
#else
|
#else
|
||||||
#include <winsock.h>
|
#include <winsock2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,7 @@ ARG_ENABLE("sockets", "SOCKETS support", "no");
|
||||||
|
|
||||||
if (PHP_SOCKETS != "no") {
|
if (PHP_SOCKETS != "no") {
|
||||||
if (CHECK_LIB("ws2_32.lib", "sockets", PHP_SOCKETS)
|
if (CHECK_LIB("ws2_32.lib", "sockets", PHP_SOCKETS)
|
||||||
&& CHECK_LIB("Iphlpapi.lib", "sockets", PHP_SOCKETS)
|
&& CHECK_LIB("Iphlpapi.lib", "sockets", PHP_SOCKETS)) {
|
||||||
&& CHECK_HEADER_ADD_INCLUDE("winsock.h", "CFLAGS_SOCKETS")) {
|
|
||||||
EXTENSION('sockets', 'sockets.c multicast.c conversions.c sockaddr_conv.c sendrecvmsg.c', PHP_SOCKETS_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
|
EXTENSION('sockets', 'sockets.c multicast.c conversions.c sockaddr_conv.c sendrecvmsg.c', PHP_SOCKETS_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
|
||||||
AC_DEFINE('HAVE_SOCKETS', 1, "Define to 1 if the PHP extension 'sockets' is available.");
|
AC_DEFINE('HAVE_SOCKETS', 1, "Define to 1 if the PHP extension 'sockets' is available.");
|
||||||
PHP_INSTALL_HEADERS("ext/sockets", "php_sockets.h windows_common.h");
|
PHP_INSTALL_HEADERS("ext/sockets", "php_sockets.h windows_common.h");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue