summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikko Koppanen <mkoppanen@php.net>2009-12-27 01:00:50 +0000
committerMikko Koppanen <mkoppanen@php.net>2009-12-27 01:00:50 +0000
commit29b7cd5dcf03d5e42ec3f4552a3ecfa6295e8d6a (patch)
treea439dc00b68ca6bf7daac553609157824ad2d4a0
parent1e6695feb7037ae505be41f3a5b4e87dbc81093e (diff)
downloadphp-git-29b7cd5dcf03d5e42ec3f4552a3ecfa6295e8d6a.tar.gz
Share the php_sockets.h header
Share php_sockets_le_socket_name
-rw-r--r--ext/sockets/config.m41
-rw-r--r--ext/sockets/php_sockets.h2
-rw-r--r--ext/sockets/sockets.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/ext/sockets/config.m4 b/ext/sockets/config.m4
index 91dda989c8..574548d605 100644
--- a/ext/sockets/config.m4
+++ b/ext/sockets/config.m4
@@ -29,4 +29,5 @@ if test "$PHP_SOCKETS" != "no"; then
AC_DEFINE([HAVE_SOCKETS], 1, [ ])
PHP_NEW_EXTENSION([sockets], [sockets.c], [$ext_shared])
+ PHP_INSTALL_HEADERS([ext/sockets/], [php_sockets.h])
fi
diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h
index 3738ed46c6..ef3e5b30fe 100644
--- a/ext/sockets/php_sockets.h
+++ b/ext/sockets/php_sockets.h
@@ -95,6 +95,8 @@ struct sockaddr_un {
PHP_SOCKETS_API int php_sockets_le_socket(void);
+#define php_sockets_le_socket_name "Socket"
+
/* Prototypes */
#ifdef ilia_0 /* not needed, only causes a compiler warning */
static int php_open_listen_sock(php_socket **php_sock, int port, int backlog TSRMLS_DC);
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index c47d2894e0..84c6cd6a00 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -110,7 +110,7 @@ static char *php_strerror(int error TSRMLS_DC);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s [%d]: %s", msg, errn, php_strerror(errn TSRMLS_CC))
static int le_socket;
-#define le_socket_name "Socket"
+#define le_socket_name php_sockets_le_socket_name
/* {{{ arginfo */
ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_select, 0, 0, 4)