summaryrefslogtreecommitdiff
path: root/ext/sockets
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2003-06-17 04:44:30 +0000
committerSterling Hughes <sterling@php.net>2003-06-17 04:44:30 +0000
commit3de4afa4546843910ff71c16bea911c5108f5e9e (patch)
tree96968c0e8df7873fa05383f61ef02cb104aba879 /ext/sockets
parent821b0fa1344cbb9750f8a564b82e3b8f4ca365b4 (diff)
downloadphp-git-3de4afa4546843910ff71c16bea911c5108f5e9e.tar.gz
rename SOCKET to PHP_SOCKET to avoid conflicts with Mono
Diffstat (limited to 'ext/sockets')
-rw-r--r--ext/sockets/php_sockets.h6
-rw-r--r--ext/sockets/sockets.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h
index 512b8e358d..e7b7365ffa 100644
--- a/ext/sockets/php_sockets.h
+++ b/ext/sockets/php_sockets.h
@@ -88,11 +88,13 @@ typedef struct php_iovec {
} php_iovec_t;
#ifndef PHP_WIN32
-typedef int SOCKET;
+typedef int PHP_SOCKET;
+#else
+typedef SOCKET PHP_SOCKET;
#endif
typedef struct {
- SOCKET bsd_socket;
+ PHP_SOCKET bsd_socket;
int type;
int error;
} php_socket;
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index 87a920b9cc..242956baa0 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -527,7 +527,7 @@ PHP_RSHUTDOWN_FUNCTION(sockets)
}
/* }}} */
-static int php_sock_array_to_fd_set(zval *sock_array, fd_set *fds, SOCKET *max_fd TSRMLS_DC)
+static int php_sock_array_to_fd_set(zval *sock_array, fd_set *fds, PHP_SOCKET *max_fd TSRMLS_DC)
{
zval **element;
php_socket *php_sock;
@@ -593,7 +593,7 @@ PHP_FUNCTION(socket_select)
struct timeval tv;
struct timeval *tv_p = NULL;
fd_set rfds, wfds, efds;
- SOCKET max_fd = 0;
+ PHP_SOCKET max_fd = 0;
int retval, sets = 0;
long usec = 0;
@@ -2179,7 +2179,7 @@ PHP_FUNCTION(socket_create_pair)
{
zval *retval[2], *fds_array_zval;
php_socket *php_sock[2];
- SOCKET fds_array[2];
+ PHP_SOCKET fds_array[2];
long domain, type, protocol;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lllz", &domain, &type, &protocol, &fds_array_zval) == FAILURE)