]> granicus.if.org Git - php/commitdiff
Add missing ifdefs for shutdown()
authorHannes Magnusson <bjori@php.net>
Wed, 10 Jan 2007 15:25:07 +0000 (15:25 +0000)
committerHannes Magnusson <bjori@php.net>
Wed, 10 Jan 2007 15:25:07 +0000 (15:25 +0000)
ext/sockets/php_sockets.h
ext/sockets/sockets.c

index de23d01cb5c185e081e8a0cd6e2820eb27d1d82f..b3f49a0f93a3c5c236bfd43953400cec34ca0574 100644 (file)
@@ -66,7 +66,9 @@ PHP_FUNCTION(socket_recvfrom);
 PHP_FUNCTION(socket_sendto);
 PHP_FUNCTION(socket_get_option);
 PHP_FUNCTION(socket_set_option);
+#ifdef HAVE_SHUTDOWN
 PHP_FUNCTION(socket_shutdown);
+#endif
 PHP_FUNCTION(socket_last_error);
 PHP_FUNCTION(socket_clear_error);
 
index f431d052ad27247e5108b8f9dc41066c9e595218..72bca7f63d8b5e71190bb099dd1352f78d4018d3 100644 (file)
@@ -138,7 +138,9 @@ zend_function_entry sockets_functions[] = {
        PHP_FE(socket_sendto,                   NULL)
        PHP_FE(socket_get_option,               NULL)
        PHP_FE(socket_set_option,               NULL)
+#ifdef HAVE_SHUTDOWN
        PHP_FE(socket_shutdown,                 NULL)
+#endif
        PHP_FE(socket_last_error,               NULL)
        PHP_FE(socket_clear_error,              NULL)
        
@@ -1759,6 +1761,7 @@ PHP_FUNCTION(socket_create_pair)
 /* }}} */
 #endif
 
+#ifdef HAVE_SHUTDOWN
 /* {{{ proto bool socket_shutdown(resource socket[, int how])
    Shuts down a socket for receiving, sending, or both. */
 PHP_FUNCTION(socket_shutdown)
@@ -1780,6 +1783,7 @@ PHP_FUNCTION(socket_shutdown)
        RETURN_TRUE;
 }
 /* }}} */
+#endif
 
 /* {{{ proto int socket_last_error([resource socket])
    Returns the last socket error (either the last used or the provided socket resource) */