Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/sockets php_sockets.h sockets.c
On Thu, Jan 1, 2009 at 06:24, Kalle Sommer Nielsen ka...@php.net wrote: kalle Thu Jan 1 05:24:30 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/socketsphp_sockets.h sockets.c Log: MFH: [DOC] Renable socket_create_pair() on Windows # ext/sockets have its own implementation of socketpair(), perhaps we should move it # to the core. This will make stream_socket_pair() available on Windows aswell http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.431r2=1.2027.2.547.2.965.2.432diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.431 php-src/NEWS:1.2027.2.547.2.965.2.432 --- php-src/NEWS:1.2027.2.547.2.965.2.431 Wed Dec 31 15:45:59 2008 +++ php-src/NEWSThu Jan 1 05:24:29 2009 @@ -11,6 +11,7 @@ - Changed opendir(), dir() and scandir() to use default context when no context argument is passed. (Sara) - Changed open_basedir to allow tightening in runtime contexts. (Sara) +- Re-enabled socket_create_pair() on Windows (Kalle) - Added json_last_error() to return any error information from json_decode(). (Scott) http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/php_sockets.h?r1=1.36.2.1.2.4.2.3r2=1.36.2.1.2.4.2.4diff_format=u Index: php-src/ext/sockets/php_sockets.h diff -u php-src/ext/sockets/php_sockets.h:1.36.2.1.2.4.2.3 php-src/ext/sockets/php_sockets.h:1.36.2.1.2.4.2.4 --- php-src/ext/sockets/php_sockets.h:1.36.2.1.2.4.2.3 Wed Dec 31 11:15:43 2008 +++ php-src/ext/sockets/php_sockets.h Thu Jan 1 05:24:29 2009 @@ -22,7 +22,7 @@ #ifndef PHP_SOCKETS_H #define PHP_SOCKETS_H -/* $Id: php_sockets.h,v 1.36.2.1.2.4.2.3 2008/12/31 11:15:43 sebastian Exp $ */ +/* $Id: php_sockets.h,v 1.36.2.1.2.4.2.4 2009/01/01 05:24:29 kalle Exp $ */ #if HAVE_SOCKETS @@ -43,7 +43,7 @@ PHP_FUNCTION(socket_select); PHP_FUNCTION(socket_create_listen); -#ifdef HAVE_SOCKETPAIR +#if defined(HAVE_SOCKETPAIR) || defined(PHP_WIN32) Why don't you define HAVE_SOCKETPAIR in config.w32 rather then messing around with these kind of workarounds? -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/sockets php_sockets.h sockets.c
2009/1/1 Hannes Magnusson hannes.magnus...@gmail.com: On Thu, Jan 1, 2009 at 06:24, Kalle Sommer Nielsen ka...@php.net wrote: kalle Thu Jan 1 05:24:30 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/socketsphp_sockets.h sockets.c Log: MFH: [DOC] Renable socket_create_pair() on Windows # ext/sockets have its own implementation of socketpair(), perhaps we should move it # to the core. This will make stream_socket_pair() available on Windows aswell http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.431r2=1.2027.2.547.2.965.2.432diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.431 php-src/NEWS:1.2027.2.547.2.965.2.432 --- php-src/NEWS:1.2027.2.547.2.965.2.431 Wed Dec 31 15:45:59 2008 +++ php-src/NEWSThu Jan 1 05:24:29 2009 @@ -11,6 +11,7 @@ - Changed opendir(), dir() and scandir() to use default context when no context argument is passed. (Sara) - Changed open_basedir to allow tightening in runtime contexts. (Sara) +- Re-enabled socket_create_pair() on Windows (Kalle) - Added json_last_error() to return any error information from json_decode(). (Scott) http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/php_sockets.h?r1=1.36.2.1.2.4.2.3r2=1.36.2.1.2.4.2.4diff_format=u Index: php-src/ext/sockets/php_sockets.h diff -u php-src/ext/sockets/php_sockets.h:1.36.2.1.2.4.2.3 php-src/ext/sockets/php_sockets.h:1.36.2.1.2.4.2.4 --- php-src/ext/sockets/php_sockets.h:1.36.2.1.2.4.2.3 Wed Dec 31 11:15:43 2008 +++ php-src/ext/sockets/php_sockets.h Thu Jan 1 05:24:29 2009 @@ -22,7 +22,7 @@ #ifndef PHP_SOCKETS_H #define PHP_SOCKETS_H -/* $Id: php_sockets.h,v 1.36.2.1.2.4.2.3 2008/12/31 11:15:43 sebastian Exp $ */ +/* $Id: php_sockets.h,v 1.36.2.1.2.4.2.4 2009/01/01 05:24:29 kalle Exp $ */ #if HAVE_SOCKETS @@ -43,7 +43,7 @@ PHP_FUNCTION(socket_select); PHP_FUNCTION(socket_create_listen); -#ifdef HAVE_SOCKETPAIR +#if defined(HAVE_SOCKETPAIR) || defined(PHP_WIN32) Why don't you define HAVE_SOCKETPAIR in config.w32 rather then messing around with these kind of workarounds? Because of stream_socket_pair(), and then it would only work if ext/sockets was built too, so unless we move it into the core and export it then it should be like that. -Hannes -- Kalle Sommer Nielsen -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/sockets php_sockets.h sockets.c
hi! On Thu, Jan 1, 2009 at 7:31 PM, Kalle Sommer Nielsen ka...@php.net wrote: Because of stream_socket_pair(), and then it would only work if ext/sockets was built too, so unless we move it into the core and export it then it should be like that. Does it even work? I would not enable again this function without first having tests for it. There is certainly reasons why it was disabled (well, ext/socket is a reason already...). Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/sockets php_sockets.h sockets.c
Hi 2009/1/1 Pierre Joye pierre@gmail.com: hi! On Thu, Jan 1, 2009 at 7:31 PM, Kalle Sommer Nielsen ka...@php.net wrote: Because of stream_socket_pair(), and then it would only work if ext/sockets was built too, so unless we move it into the core and export it then it should be like that. Does it even work? I would not enable again this function without first having tests for it. There is certainly reasons why it was disabled (well, ext/socket is a reason already...). Like I just said on IRC, it was Jani that added a magic define back around the time 5.1 was released, which Windows didn't have and it was disabled: http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.190r2=1.191 Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org -- Kalle Sommer Nielsen -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/sockets php_sockets.h sockets.c
kalle Thu Jan 1 05:24:30 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/socketsphp_sockets.h sockets.c Log: MFH: [DOC] Renable socket_create_pair() on Windows # ext/sockets have its own implementation of socketpair(), perhaps we should move it # to the core. This will make stream_socket_pair() available on Windows aswell http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.431r2=1.2027.2.547.2.965.2.432diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.431 php-src/NEWS:1.2027.2.547.2.965.2.432 --- php-src/NEWS:1.2027.2.547.2.965.2.431 Wed Dec 31 15:45:59 2008 +++ php-src/NEWSThu Jan 1 05:24:29 2009 @@ -11,6 +11,7 @@ - Changed opendir(), dir() and scandir() to use default context when no context argument is passed. (Sara) - Changed open_basedir to allow tightening in runtime contexts. (Sara) +- Re-enabled socket_create_pair() on Windows (Kalle) - Added json_last_error() to return any error information from json_decode(). (Scott) http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/php_sockets.h?r1=1.36.2.1.2.4.2.3r2=1.36.2.1.2.4.2.4diff_format=u Index: php-src/ext/sockets/php_sockets.h diff -u php-src/ext/sockets/php_sockets.h:1.36.2.1.2.4.2.3 php-src/ext/sockets/php_sockets.h:1.36.2.1.2.4.2.4 --- php-src/ext/sockets/php_sockets.h:1.36.2.1.2.4.2.3 Wed Dec 31 11:15:43 2008 +++ php-src/ext/sockets/php_sockets.h Thu Jan 1 05:24:29 2009 @@ -22,7 +22,7 @@ #ifndef PHP_SOCKETS_H #define PHP_SOCKETS_H -/* $Id: php_sockets.h,v 1.36.2.1.2.4.2.3 2008/12/31 11:15:43 sebastian Exp $ */ +/* $Id: php_sockets.h,v 1.36.2.1.2.4.2.4 2009/01/01 05:24:29 kalle Exp $ */ #if HAVE_SOCKETS @@ -43,7 +43,7 @@ PHP_FUNCTION(socket_select); PHP_FUNCTION(socket_create_listen); -#ifdef HAVE_SOCKETPAIR +#if defined(HAVE_SOCKETPAIR) || defined(PHP_WIN32) PHP_FUNCTION(socket_create_pair); #endif PHP_FUNCTION(socket_accept); http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.9.2.14.2.12r2=1.171.2.9.2.14.2.13diff_format=u Index: php-src/ext/sockets/sockets.c diff -u php-src/ext/sockets/sockets.c:1.171.2.9.2.14.2.12 php-src/ext/sockets/sockets.c:1.171.2.9.2.14.2.13 --- php-src/ext/sockets/sockets.c:1.171.2.9.2.14.2.12 Wed Dec 31 11:15:43 2008 +++ php-src/ext/sockets/sockets.c Thu Jan 1 05:24:29 2009 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: sockets.c,v 1.171.2.9.2.14.2.12 2008/12/31 11:15:43 sebastian Exp $ */ +/* $Id: sockets.c,v 1.171.2.9.2.14.2.13 2009/01/01 05:24:29 kalle Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -223,7 +223,7 @@ ZEND_ARG_INFO(0, optval) ZEND_END_ARG_INFO() -#ifdef HAVE_SOCKETPAIR +#if defined(HAVE_SOCKETPAIR) || defined(PHP_WIN32) ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_create_pair, 0, 0, 4) ZEND_ARG_INFO(0, domain) ZEND_ARG_INFO(0, type) @@ -254,7 +254,7 @@ PHP_FE(socket_select, arginfo_socket_select) PHP_FE(socket_create, arginfo_socket_create) PHP_FE(socket_create_listen,arginfo_socket_create_listen) -#ifdef HAVE_SOCKETPAIR +#if defined(HAVE_SOCKETPAIR) || defined(PHP_WIN32) PHP_FE(socket_create_pair, arginfo_socket_create_pair) #endif PHP_FE(socket_accept, arginfo_socket_accept) @@ -1867,7 +1867,7 @@ } /* }}} */ -#ifdef HAVE_SOCKETPAIR +#if defined(HAVE_SOCKETPAIR) || defined(PHP_WIN32) /* {{{ proto bool socket_create_pair(int domain, int type, int protocol, array fd) U Creates a pair of indistinguishable sockets and stores them in fds. */ PHP_FUNCTION(socket_create_pair) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php