cvs: /php4/ext/standard basic_functions.c microtime.c

From: Date: Wed, 23 Feb 2000 21:38:14 +0000
Subject: cvs: /php4/ext/standard basic_functions.c microtime.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-10769@lists.php.net to get a copy of this message
ssb Wed Feb 23 13:38:14 2000 EDT Modified files: /php4/ext/standard basic_functions.c microtime.c Log: (PHP getrusage) don't define this function at all if the getrusage() function is not available on the system. Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.162 php4/ext/standard/basic_functions.c:1.163 --- php4/ext/standard/basic_functions.c:1.162 Sat Feb 19 15:41:20 2000 +++ php4/ext/standard/basic_functions.c Wed Feb 23 13:37:43 2000 @@ -242,7 +242,9 @@ PHP_FE(microtime, NULL) PHP_FE(gettimeofday, NULL) +#ifdef HAVE_GETRUSAGE PHP_FE(getrusage, NULL) +#endif PHP_FE(uniqid, NULL) Index: php4/ext/standard/microtime.c diff -u php4/ext/standard/microtime.c:1.18 php4/ext/standard/microtime.c:1.19 --- php4/ext/standard/microtime.c:1.18 Wed Feb 23 09:39:58 2000 +++ php4/ext/standard/microtime.c Wed Feb 23 13:37:43 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: microtime.c,v 1.18 2000/02/23 17:39:58 sas Exp $ */ +/* $Id: microtime.c,v 1.19 2000/02/23 21:37:43 ssb Exp $ */ #include "php.h" @@ -90,11 +90,11 @@ } /* }}} */ +#ifdef HAVE_GETRUSAGE /* {{{ proto array getrusage([ int who ]) returns an array of usage statistics */ PHP_FUNCTION(getrusage) { -#if HAVE_GETRUSAGE struct rusage usg; int ac = ARG_COUNT(ht); pval **pwho; @@ -134,8 +134,9 @@ PHP3_RUSAGE_PARA(ru_stime.tv_usec); PHP3_RUSAGE_PARA(ru_stime.tv_sec); #undef PHP3_RUSAGE_PARA -#endif /* HAVE_GETRUSAGE */ } +#endif /* HAVE_GETRUSAGE */ + /* }}} */

« previous php.version4 (#10769) next »