summaryrefslogtreecommitdiff
path: root/ext/sockets/php_sockets.h
diff options
context:
space:
mode:
authorGustavo Lopes <glopes@nebm.ist.utl.pt>2013-02-02 16:40:25 +0100
committerGustavo Lopes <glopes@nebm.ist.utl.pt>2013-02-02 16:50:38 +0100
commitb11777ca2aea339430dfc70d352ef4b994450189 (patch)
tree0c1cdcc65a3a0d536963e050b908b37f7570586e /ext/sockets/php_sockets.h
parentac47448abb477be99963f0b38fe82ffe78c21a8b (diff)
parente2fc17c833c5122327438c82fc0dc4b689268f59 (diff)
downloadphp-git-b11777ca2aea339430dfc70d352ef4b994450189.tar.gz
Merge branch 'sendrecvmsg_rebase_55' into PHP-5.5
* sendrecvmsg_rebase_55: (31 commits) Fix multicast.c not defining errno on Windows Fix non-Windows build send/recvmsg() support for Windows Remove some pre-vista code Revert "Payload of HOPLIMIT/TCLASS are 8-bit" Ensure memory is initialized Payload of HOPLIMIT/TCLASS are 8-bit Fix buf in string -> int conv. Build fixes; accept names for if_index Refactoring: move stuff to new conversions.c Support sticky IPV6_PKTINFO Rename some functions for consistency Destroy ancillary registry on shutdown Move some multicast stuff to multicast.c Fix mcast_ipv6_send test Check return of fstat() Fix build on Mac OS X Register extra MSG_* constants Add test for CMSG_RIGHTS Add test for CMSG_CREDENTIALS message ...
Diffstat (limited to 'ext/sockets/php_sockets.h')
-rw-r--r--ext/sockets/php_sockets.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h
index 9c5dc5a4aa..5082a9bc1e 100644
--- a/ext/sockets/php_sockets.h
+++ b/ext/sockets/php_sockets.h
@@ -26,11 +26,13 @@
#if HAVE_SOCKETS
+#include <php.h>
+
extern zend_module_entry sockets_module_entry;
#define phpext_sockets_ptr &sockets_module_entry
#ifdef PHP_WIN32
-#include <winsock.h>
+#include <Winsock2.h>
#else
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@@ -85,6 +87,17 @@ ZEND_END_MODULE_GLOBALS(sockets)
#define SOCKETS_G(v) (sockets_globals.v)
#endif
+ZEND_EXTERN_MODULE_GLOBALS(sockets);
+
+enum sockopt_return {
+ SOCKOPT_ERROR,
+ SOCKOPT_CONTINUE,
+ SOCKOPT_SUCCESS
+};
+
+char *sockets_strerror(int error TSRMLS_DC);
+php_socket *socket_import_file_descriptor(PHP_SOCKET sock TSRMLS_DC);
+
#else
#define phpext_sockets_ptr NULL
#endif