Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/sockets php_sockets.h sockets.c

2009-01-01 Thread Hannes Magnusson
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-01-01 Thread Kalle Sommer Nielsen
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

2009-01-01 Thread Pierre Joye
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

2009-01-01 Thread Kalle Sommer Nielsen
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