On Wed, Dec 31, 2008 at 15:30, Ilia Alshanetsky <il...@php.net> wrote:
> iliaa           Wed Dec 31 14:30:38 2008 UTC
>
>  Modified files:              (Branch: PHP_5_3)
>    /php-src/ext/standard       dns.c dns.h basic_functions.c
>    /php-src    configure.in NEWS
>    /php-src/win32/build        config.w32.h.in
>  Log:
>
>  [DOC]
>  Added gethostname() to return the current system host name.
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.70.2.7.2.5.2.9&r2=1.70.2.7.2.5.2.10&diff_format=u
> Index: php-src/ext/standard/dns.c
> diff -u php-src/ext/standard/dns.c:1.70.2.7.2.5.2.9 
> php-src/ext/standard/dns.c:1.70.2.7.2.5.2.10
> --- php-src/ext/standard/dns.c:1.70.2.7.2.5.2.9 Wed Dec 31 11:15:44 2008
> +++ php-src/ext/standard/dns.c  Wed Dec 31 14:30:37 2008
> @@ -18,7 +18,7 @@
>    +----------------------------------------------------------------------+
>  */
>
> -/* $Id: dns.c,v 1.70.2.7.2.5.2.9 2008/12/31 11:15:44 sebastian Exp $ */
> +/* $Id: dns.c,v 1.70.2.7.2.5.2.10 2008/12/31 14:30:37 iliaa Exp $ */
>
>  /* {{{ includes */
>  #include "php.h"
> @@ -107,6 +107,27 @@
>  static char *php_gethostbyaddr(char *ip);
>  static char *php_gethostbyname(char *name);
>
> +#ifdef HAVE_GETHOSTNAME
> +/* {{{ proto string gethostname()
> +   Get the host name of the current machine */
> +PHP_FUNCTION(gethostname)
> +{
> +       char buf[4096];
> +
> +       if (zend_parse_parameters_none() == FAILURE) {
> +               WRONG_PARAM_COUNT;

This will throw one extra "wrong parameter count" warning.
Just use return; like with zend_parse_parameters().

-Hannes

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to