mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Replace WIN32 conditions with _WIN32 or PHP_WIN32 (#14462)
* Replace WIN32 conditions with _WIN32 or PHP_WIN32
WIN32 is defined by the SDK and not defined all the time on Windows by
compilers or the environment. _WIN32 is defined as 1 when the
compilation target is 32-bit ARM, 64-bit ARM, x86, or x64. Otherwise,
undefined.
This syncs these usages one step further.
Upstream libgd has replaced WIN32 with _WIN32 via
c60d9fe577
PHP_WIN32 is added to ext/sockets/sockets.stub.php as done in other
*.stub.php files at this point.
* Use PHP_WIN32 in ext/random
* Use PHP_WIN32 in ext/sockets
* Use _WIN32 in xxhash.h as done upstream
See https://github.com/Cyan4973/xxHash/pull/931
* Update end comment with PHP_WIN32
This commit is contained in:
parent
bcecbb59d3
commit
a82d86479c
11 changed files with 62 additions and 62 deletions
|
@ -13,7 +13,7 @@
|
||||||
#ifndef TSRM_H
|
#ifndef TSRM_H
|
||||||
#define TSRM_H
|
#define TSRM_H
|
||||||
|
|
||||||
#if !defined(__CYGWIN__) && defined(WIN32)
|
#if !defined(__CYGWIN__) && defined(_WIN32)
|
||||||
# define TSRM_WIN32
|
# define TSRM_WIN32
|
||||||
# include "Zend/zend_config.w32.h"
|
# include "Zend/zend_config.w32.h"
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -21,7 +21,7 @@ extern "C" {
|
||||||
/* default fontpath for netware systems */
|
/* default fontpath for netware systems */
|
||||||
#define DEFAULT_FONTPATH "sys:/java/nwgfx/lib/x11/fonts/ttf;."
|
#define DEFAULT_FONTPATH "sys:/java/nwgfx/lib/x11/fonts/ttf;."
|
||||||
#define PATHSEPARATOR ";"
|
#define PATHSEPARATOR ";"
|
||||||
#elif defined(WIN32)
|
#elif defined(_WIN32)
|
||||||
/* default fontpath for windows systems */
|
/* default fontpath for windows systems */
|
||||||
#define DEFAULT_FONTPATH "c:\\winnt\\fonts;c:\\windows\\fonts;."
|
#define DEFAULT_FONTPATH "c:\\winnt\\fonts;c:\\windows\\fonts;."
|
||||||
#define PATHSEPARATOR ";"
|
#define PATHSEPARATOR ";"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
#define access _access
|
#define access _access
|
||||||
#ifndef R_OK
|
#ifndef R_OK
|
||||||
#define R_OK 2
|
#define R_OK 2
|
||||||
|
|
|
@ -229,7 +229,7 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
/* specific declaration modes for Windows */
|
/* specific declaration modes for Windows */
|
||||||
#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)
|
#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)
|
||||||
# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
|
# if defined(_WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
|
||||||
# ifdef XXH_EXPORT
|
# ifdef XXH_EXPORT
|
||||||
# define XXH_PUBLIC_API __declspec(dllexport)
|
# define XXH_PUBLIC_API __declspec(dllexport)
|
||||||
# elif XXH_IMPORT
|
# elif XXH_IMPORT
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
#define SIZE_MAX ((size_t)~0)
|
#define SIZE_MAX ((size_t)~0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
#ifdef MBFL_DLL_EXPORT
|
#ifdef MBFL_DLL_EXPORT
|
||||||
#define MBFLAPI __declspec(dllexport)
|
#define MBFLAPI __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
|
@ -55,6 +55,6 @@
|
||||||
#else
|
#else
|
||||||
#define MBFLAPI
|
#define MBFLAPI
|
||||||
#endif /* defined(__GNUC__) && __GNUC__ >= 4 */
|
#endif /* defined(__GNUC__) && __GNUC__ >= 4 */
|
||||||
#endif /* WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
#endif /* MBFL_DEFS_H */
|
#endif /* MBFL_DEFS_H */
|
||||||
|
|
|
@ -635,7 +635,7 @@ PHPAPI uint64_t php_random_generate_fallback_seed(void)
|
||||||
/* Various PIDs. */
|
/* Various PIDs. */
|
||||||
pid = getpid();
|
pid = getpid();
|
||||||
fallback_seed_add(&c, &pid, sizeof(pid));
|
fallback_seed_add(&c, &pid, sizeof(pid));
|
||||||
#ifndef WIN32
|
#ifndef PHP_WIN32
|
||||||
pid = getppid();
|
pid = getppid();
|
||||||
fallback_seed_add(&c, &pid, sizeof(pid));
|
fallback_seed_add(&c, &pid, sizeof(pid));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -153,31 +153,31 @@ PHP_SOCKETS_API bool socket_import_file_descriptor(PHP_SOCKET socket, php_socket
|
||||||
#define PHP_NORMAL_READ 0x0001
|
#define PHP_NORMAL_READ 0x0001
|
||||||
#define PHP_BINARY_READ 0x0002
|
#define PHP_BINARY_READ 0x0002
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EINTR WSAEINTR
|
#define PHP_SOCKET_EINTR WSAEINTR
|
||||||
#elif defined(EINTR)
|
#elif defined(EINTR)
|
||||||
#define PHP_SOCKET_EINTR EINTR
|
#define PHP_SOCKET_EINTR EINTR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EBADF WSAEBADF
|
#define PHP_SOCKET_EBADF WSAEBADF
|
||||||
#elif defined(EBADF)
|
#elif defined(EBADF)
|
||||||
#define PHP_SOCKET_EBADF EBADF
|
#define PHP_SOCKET_EBADF EBADF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EACCES WSAEACCES
|
#define PHP_SOCKET_EACCES WSAEACCES
|
||||||
#elif defined(EACCES)
|
#elif defined(EACCES)
|
||||||
#define PHP_SOCKET_EACCES EACCES
|
#define PHP_SOCKET_EACCES EACCES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EFAULT WSAEFAULT
|
#define PHP_SOCKET_EFAULT WSAEFAULT
|
||||||
#elif defined(EFAULT)
|
#elif defined(EFAULT)
|
||||||
#define PHP_SOCKET_EFAULT EFAULT
|
#define PHP_SOCKET_EFAULT EFAULT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EINVAL WSAEINVAL
|
#define PHP_SOCKET_EINVAL WSAEINVAL
|
||||||
#elif defined(EINVAL)
|
#elif defined(EINVAL)
|
||||||
#define PHP_SOCKET_EINVAL EINVAL
|
#define PHP_SOCKET_EINVAL EINVAL
|
||||||
|
@ -187,217 +187,217 @@ PHP_SOCKETS_API bool socket_import_file_descriptor(PHP_SOCKET socket, php_socket
|
||||||
#define PHP_SOCKET_ENFILE ENFILE
|
#define PHP_SOCKET_ENFILE ENFILE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EMFILE WSAEMFILE
|
#define PHP_SOCKET_EMFILE WSAEMFILE
|
||||||
#elif defined(EMFILE)
|
#elif defined(EMFILE)
|
||||||
#define PHP_SOCKET_EMFILE EMFILE
|
#define PHP_SOCKET_EMFILE EMFILE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
|
#define PHP_SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
|
||||||
#elif defined(EWOULDBLOCK)
|
#elif defined(EWOULDBLOCK)
|
||||||
#define PHP_SOCKET_EWOULDBLOCK EWOULDBLOCK
|
#define PHP_SOCKET_EWOULDBLOCK EWOULDBLOCK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EINPROGRESS WSAEINPROGRESS
|
#define PHP_SOCKET_EINPROGRESS WSAEINPROGRESS
|
||||||
#elif defined(EINPROGRESS)
|
#elif defined(EINPROGRESS)
|
||||||
#define PHP_SOCKET_EINPROGRESS EINPROGRESS
|
#define PHP_SOCKET_EINPROGRESS EINPROGRESS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EALREADY WSAEALREADY
|
#define PHP_SOCKET_EALREADY WSAEALREADY
|
||||||
#elif defined(EALREADY)
|
#elif defined(EALREADY)
|
||||||
#define PHP_SOCKET_EALREADY EALREADY
|
#define PHP_SOCKET_EALREADY EALREADY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ENOTSOCK WSAENOTSOCK
|
#define PHP_SOCKET_ENOTSOCK WSAENOTSOCK
|
||||||
#elif defined(ENOTSOCK)
|
#elif defined(ENOTSOCK)
|
||||||
#define PHP_SOCKET_ENOTSOCK ENOTSOCK
|
#define PHP_SOCKET_ENOTSOCK ENOTSOCK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EDESTADDRREQ WSAEDESTADDRREQ
|
#define PHP_SOCKET_EDESTADDRREQ WSAEDESTADDRREQ
|
||||||
#elif defined(EDESTADDRREQ)
|
#elif defined(EDESTADDRREQ)
|
||||||
#define PHP_SOCKET_EDESTADDRREQ EDESTADDRREQ
|
#define PHP_SOCKET_EDESTADDRREQ EDESTADDRREQ
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EMSGSIZE WSAEMSGSIZE
|
#define PHP_SOCKET_EMSGSIZE WSAEMSGSIZE
|
||||||
#elif defined(EMSGSIZE)
|
#elif defined(EMSGSIZE)
|
||||||
#define PHP_SOCKET_EMSGSIZE EMSGSIZE
|
#define PHP_SOCKET_EMSGSIZE EMSGSIZE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EPROTOTYPE WSAEPROTOTYPE
|
#define PHP_SOCKET_EPROTOTYPE WSAEPROTOTYPE
|
||||||
#elif defined(EPROTOTYPE)
|
#elif defined(EPROTOTYPE)
|
||||||
#define PHP_SOCKET_EPROTOTYPE EPROTOTYPE
|
#define PHP_SOCKET_EPROTOTYPE EPROTOTYPE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ENOPROTOOPT WSAENOPROTOOPT
|
#define PHP_SOCKET_ENOPROTOOPT WSAENOPROTOOPT
|
||||||
#elif defined(ENOPROTOOPT)
|
#elif defined(ENOPROTOOPT)
|
||||||
#define PHP_SOCKET_ENOPROTOOPT ENOPROTOOPT
|
#define PHP_SOCKET_ENOPROTOOPT ENOPROTOOPT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
#define PHP_SOCKET_EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||||
#elif defined(EPROTONOSUPPORT)
|
#elif defined(EPROTONOSUPPORT)
|
||||||
#define PHP_SOCKET_EPROTONOSUPPORT EPROTONOSUPPORT
|
#define PHP_SOCKET_EPROTONOSUPPORT EPROTONOSUPPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
#define PHP_SOCKET_ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
||||||
#elif defined(ESOCKTNOSUPPORT)
|
#elif defined(ESOCKTNOSUPPORT)
|
||||||
#define PHP_SOCKET_ESOCKTNOSUPPORT ESOCKTNOSUPPORT
|
#define PHP_SOCKET_ESOCKTNOSUPPORT ESOCKTNOSUPPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EOPNOTSUPP WSAEOPNOTSUPP
|
#define PHP_SOCKET_EOPNOTSUPP WSAEOPNOTSUPP
|
||||||
#elif defined(EOPNOTSUPP)
|
#elif defined(EOPNOTSUPP)
|
||||||
#define PHP_SOCKET_EOPNOTSUPP EOPNOTSUPP
|
#define PHP_SOCKET_EOPNOTSUPP EOPNOTSUPP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EPFNOSUPPORT WSAEPFNOSUPPORT
|
#define PHP_SOCKET_EPFNOSUPPORT WSAEPFNOSUPPORT
|
||||||
#elif defined(EPFNOSUPPORT)
|
#elif defined(EPFNOSUPPORT)
|
||||||
#define PHP_SOCKET_EPFNOSUPPORT EPFNOSUPPORT
|
#define PHP_SOCKET_EPFNOSUPPORT EPFNOSUPPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EAFNOSUPPORT WSAEAFNOSUPPORT
|
#define PHP_SOCKET_EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||||
#elif defined(EAFNOSUPPORT)
|
#elif defined(EAFNOSUPPORT)
|
||||||
#define PHP_SOCKET_EAFNOSUPPORT EAFNOSUPPORT
|
#define PHP_SOCKET_EAFNOSUPPORT EAFNOSUPPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EADDRINUSE WSAEADDRINUSE
|
#define PHP_SOCKET_EADDRINUSE WSAEADDRINUSE
|
||||||
#elif defined(EADDRINUSE)
|
#elif defined(EADDRINUSE)
|
||||||
#define PHP_SOCKET_EADDRINUSE EADDRINUSE
|
#define PHP_SOCKET_EADDRINUSE EADDRINUSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
#define PHP_SOCKET_EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
||||||
#elif defined(EADDRNOTAVAIL)
|
#elif defined(EADDRNOTAVAIL)
|
||||||
#define PHP_SOCKET_EADDRNOTAVAIL EADDRNOTAVAIL
|
#define PHP_SOCKET_EADDRNOTAVAIL EADDRNOTAVAIL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ENETDOWN WSAENETDOWN
|
#define PHP_SOCKET_ENETDOWN WSAENETDOWN
|
||||||
#elif defined(ENETDOWN)
|
#elif defined(ENETDOWN)
|
||||||
#define PHP_SOCKET_ENETDOWN ENETDOWN
|
#define PHP_SOCKET_ENETDOWN ENETDOWN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ENETUNREACH WSAENETUNREACH
|
#define PHP_SOCKET_ENETUNREACH WSAENETUNREACH
|
||||||
#elif defined(ENETUNREACH)
|
#elif defined(ENETUNREACH)
|
||||||
#define PHP_SOCKET_ENETUNREACH ENETUNREACH
|
#define PHP_SOCKET_ENETUNREACH ENETUNREACH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ENETRESET WSAENETRESET
|
#define PHP_SOCKET_ENETRESET WSAENETRESET
|
||||||
#elif defined(ENETRESET)
|
#elif defined(ENETRESET)
|
||||||
#define PHP_SOCKET_ENETRESET ENETRESET
|
#define PHP_SOCKET_ENETRESET ENETRESET
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ECONNABORTED WSAECONNABORTED
|
#define PHP_SOCKET_ECONNABORTED WSAECONNABORTED
|
||||||
#elif defined(ECONNABORTED)
|
#elif defined(ECONNABORTED)
|
||||||
#define PHP_SOCKET_ECONNABORTED ECONNABORTED
|
#define PHP_SOCKET_ECONNABORTED ECONNABORTED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ECONNRESET WSAECONNRESET
|
#define PHP_SOCKET_ECONNRESET WSAECONNRESET
|
||||||
#elif defined(ECONNRESET)
|
#elif defined(ECONNRESET)
|
||||||
#define PHP_SOCKET_ECONNRESET ECONNRESET
|
#define PHP_SOCKET_ECONNRESET ECONNRESET
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ENOBUFS WSAENOBUFS
|
#define PHP_SOCKET_ENOBUFS WSAENOBUFS
|
||||||
#elif defined(ENOBUFS)
|
#elif defined(ENOBUFS)
|
||||||
#define PHP_SOCKET_ENOBUFS ENOBUFS
|
#define PHP_SOCKET_ENOBUFS ENOBUFS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EISCONN WSAEISCONN
|
#define PHP_SOCKET_EISCONN WSAEISCONN
|
||||||
#elif defined(EISCONN)
|
#elif defined(EISCONN)
|
||||||
#define PHP_SOCKET_EISCONN EISCONN
|
#define PHP_SOCKET_EISCONN EISCONN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ENOTCONN WSAENOTCONN
|
#define PHP_SOCKET_ENOTCONN WSAENOTCONN
|
||||||
#elif defined(ENOTCONN)
|
#elif defined(ENOTCONN)
|
||||||
#define PHP_SOCKET_ENOTCONN ENOTCONN
|
#define PHP_SOCKET_ENOTCONN ENOTCONN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ESHUTDOWN WSAESHUTDOWN
|
#define PHP_SOCKET_ESHUTDOWN WSAESHUTDOWN
|
||||||
#elif defined(ESHUTDOWN)
|
#elif defined(ESHUTDOWN)
|
||||||
#define PHP_SOCKET_ESHUTDOWN ESHUTDOWN
|
#define PHP_SOCKET_ESHUTDOWN ESHUTDOWN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ETOOMANYREFS WSAETOOMANYREFS
|
#define PHP_SOCKET_ETOOMANYREFS WSAETOOMANYREFS
|
||||||
#elif defined(ETOOMANYREFS)
|
#elif defined(ETOOMANYREFS)
|
||||||
#define PHP_SOCKET_ETOOMANYREFS ETOOMANYREFS
|
#define PHP_SOCKET_ETOOMANYREFS ETOOMANYREFS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ETIMEDOUT WSAETIMEDOUT
|
#define PHP_SOCKET_ETIMEDOUT WSAETIMEDOUT
|
||||||
#elif defined(ETIMEDOUT)
|
#elif defined(ETIMEDOUT)
|
||||||
#define PHP_SOCKET_ETIMEDOUT ETIMEDOUT
|
#define PHP_SOCKET_ETIMEDOUT ETIMEDOUT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ECONNREFUSED WSAECONNREFUSED
|
#define PHP_SOCKET_ECONNREFUSED WSAECONNREFUSED
|
||||||
#elif defined(ECONNREFUSED)
|
#elif defined(ECONNREFUSED)
|
||||||
#define PHP_SOCKET_ECONNREFUSED ECONNREFUSED
|
#define PHP_SOCKET_ECONNREFUSED ECONNREFUSED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ELOOP WSAELOOP
|
#define PHP_SOCKET_ELOOP WSAELOOP
|
||||||
#elif defined(ELOOP)
|
#elif defined(ELOOP)
|
||||||
#define PHP_SOCKET_ELOOP ELOOP
|
#define PHP_SOCKET_ELOOP ELOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ENAMETOOLONG WSAENAMETOOLONG
|
#define PHP_SOCKET_ENAMETOOLONG WSAENAMETOOLONG
|
||||||
#elif defined(ENAMETOOLONG)
|
#elif defined(ENAMETOOLONG)
|
||||||
#define PHP_SOCKET_ENAMETOOLONG ENAMETOOLONG
|
#define PHP_SOCKET_ENAMETOOLONG ENAMETOOLONG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EHOSTDOWN WSAEHOSTDOWN
|
#define PHP_SOCKET_EHOSTDOWN WSAEHOSTDOWN
|
||||||
#elif defined(EHOSTDOWN)
|
#elif defined(EHOSTDOWN)
|
||||||
#define PHP_SOCKET_EHOSTDOWN EHOSTDOWN
|
#define PHP_SOCKET_EHOSTDOWN EHOSTDOWN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EHOSTUNREACH WSAEHOSTUNREACH
|
#define PHP_SOCKET_EHOSTUNREACH WSAEHOSTUNREACH
|
||||||
#elif defined(EHOSTUNREACH)
|
#elif defined(EHOSTUNREACH)
|
||||||
#define PHP_SOCKET_EHOSTUNREACH EHOSTUNREACH
|
#define PHP_SOCKET_EHOSTUNREACH EHOSTUNREACH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_ENOTEMPTY WSAENOTEMPTY
|
#define PHP_SOCKET_ENOTEMPTY WSAENOTEMPTY
|
||||||
#elif defined(ENOTEMPTY)
|
#elif defined(ENOTEMPTY)
|
||||||
#define PHP_SOCKET_ENOTEMPTY ENOTEMPTY
|
#define PHP_SOCKET_ENOTEMPTY ENOTEMPTY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EUSERS WSAEUSERS
|
#define PHP_SOCKET_EUSERS WSAEUSERS
|
||||||
#elif defined(EUSERS)
|
#elif defined(EUSERS)
|
||||||
#define PHP_SOCKET_EUSERS EUSERS
|
#define PHP_SOCKET_EUSERS EUSERS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EDQUOT WSAEDQUOT
|
#define PHP_SOCKET_EDQUOT WSAEDQUOT
|
||||||
#elif defined(EDQUOT)
|
#elif defined(EDQUOT)
|
||||||
#define PHP_SOCKET_EDQUOT EDQUOT
|
#define PHP_SOCKET_EDQUOT EDQUOT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
#define PHP_SOCKET_EREMOTE WSAEREMOTE
|
#define PHP_SOCKET_EREMOTE WSAEREMOTE
|
||||||
#elif defined(EREMOTE)
|
#elif defined(EREMOTE)
|
||||||
#define PHP_SOCKET_EREMOTE EREMOTE
|
#define PHP_SOCKET_EREMOTE EREMOTE
|
||||||
|
|
|
@ -1511,7 +1511,7 @@ const SOCKET_ENOMEDIUM = UNKNOWN;
|
||||||
const SOCKET_EMEDIUMTYPE = UNKNOWN;
|
const SOCKET_EMEDIUMTYPE = UNKNOWN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef PHP_WIN32
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
* @cvalue WSAESTALE
|
* @cvalue WSAESTALE
|
||||||
|
|
22
ext/sockets/sockets_arginfo.h
generated
22
ext/sockets/sockets_arginfo.h
generated
|
@ -1,5 +1,5 @@
|
||||||
/* This is a generated file, edit the .stub.php file instead.
|
/* This is a generated file, edit the .stub.php file instead.
|
||||||
* Stub hash: a551457ae505cd3d0a10da4e4b9897f556c390b4 */
|
* Stub hash: 49b34a1e2f25000d71fb5bf6722db31607ded646 */
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
|
||||||
ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1)
|
ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1)
|
||||||
|
@ -902,34 +902,34 @@ static void register_sockets_symbols(int module_number)
|
||||||
#if defined(EMEDIUMTYPE)
|
#if defined(EMEDIUMTYPE)
|
||||||
REGISTER_LONG_CONSTANT("SOCKET_EMEDIUMTYPE", EMEDIUMTYPE, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("SOCKET_EMEDIUMTYPE", EMEDIUMTYPE, CONST_PERSISTENT);
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(PHP_WIN32)
|
||||||
REGISTER_LONG_CONSTANT("SOCKET_ESTALE", WSAESTALE, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("SOCKET_ESTALE", WSAESTALE, CONST_PERSISTENT);
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(PHP_WIN32)
|
||||||
REGISTER_LONG_CONSTANT("SOCKET_EDISCON", WSAEDISCON, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("SOCKET_EDISCON", WSAEDISCON, CONST_PERSISTENT);
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(PHP_WIN32)
|
||||||
REGISTER_LONG_CONSTANT("SOCKET_SYSNOTREADY", WSASYSNOTREADY, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("SOCKET_SYSNOTREADY", WSASYSNOTREADY, CONST_PERSISTENT);
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(PHP_WIN32)
|
||||||
REGISTER_LONG_CONSTANT("SOCKET_VERNOTSUPPORTED", WSAVERNOTSUPPORTED, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("SOCKET_VERNOTSUPPORTED", WSAVERNOTSUPPORTED, CONST_PERSISTENT);
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(PHP_WIN32)
|
||||||
REGISTER_LONG_CONSTANT("SOCKET_NOTINITIALISED", WSANOTINITIALISED, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("SOCKET_NOTINITIALISED", WSANOTINITIALISED, CONST_PERSISTENT);
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(PHP_WIN32)
|
||||||
REGISTER_LONG_CONSTANT("SOCKET_HOST_NOT_FOUND", WSAHOST_NOT_FOUND, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("SOCKET_HOST_NOT_FOUND", WSAHOST_NOT_FOUND, CONST_PERSISTENT);
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(PHP_WIN32)
|
||||||
REGISTER_LONG_CONSTANT("SOCKET_TRY_AGAIN", WSATRY_AGAIN, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("SOCKET_TRY_AGAIN", WSATRY_AGAIN, CONST_PERSISTENT);
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(PHP_WIN32)
|
||||||
REGISTER_LONG_CONSTANT("SOCKET_NO_RECOVERY", WSANO_RECOVERY, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("SOCKET_NO_RECOVERY", WSANO_RECOVERY, CONST_PERSISTENT);
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(PHP_WIN32)
|
||||||
REGISTER_LONG_CONSTANT("SOCKET_NO_DATA", WSANO_DATA, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("SOCKET_NO_DATA", WSANO_DATA, CONST_PERSISTENT);
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(PHP_WIN32)
|
||||||
REGISTER_LONG_CONSTANT("SOCKET_NO_ADDRESS", WSANO_ADDRESS, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("SOCKET_NO_ADDRESS", WSANO_ADDRESS, CONST_PERSISTENT);
|
||||||
#endif
|
#endif
|
||||||
REGISTER_LONG_CONSTANT("IPPROTO_IP", IPPROTO_IP, CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("IPPROTO_IP", IPPROTO_IP, CONST_PERSISTENT);
|
||||||
|
|
|
@ -55,7 +55,7 @@ static inline int has_crc32_insn(void) {
|
||||||
if (sysctlbyname("hw.optional.armv8_crc32", &res, &reslen, NULL, 0) < 0)
|
if (sysctlbyname("hw.optional.armv8_crc32", &res, &reslen, NULL, 0) < 0)
|
||||||
res = 0;
|
res = 0;
|
||||||
return res;
|
return res;
|
||||||
# elif defined(WIN32)
|
# elif defined(_WIN32)
|
||||||
res = (int)IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE);
|
res = (int)IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE);
|
||||||
return res;
|
return res;
|
||||||
# else
|
# else
|
||||||
|
|
|
@ -2231,7 +2231,7 @@ parent_loop_end:
|
||||||
} else {
|
} else {
|
||||||
parent = 0;
|
parent = 0;
|
||||||
}
|
}
|
||||||
#endif /* WIN32 */
|
#endif /* PHP_WIN32 */
|
||||||
}
|
}
|
||||||
|
|
||||||
zend_first_try {
|
zend_first_try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue