summaryrefslogtreecommitdiff
path: root/ext/standard/microtime.c
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2000-05-26 17:04:02 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2000-05-26 17:04:02 +0000
commit69d1e788c022620f7b7f81a6071e67ce37e6034d (patch)
treee13e0b9016827cdcada7acef8164fe5c0944db6a /ext/standard/microtime.c
parent9bfd5e5e555372604ff69642dc32ef6e2e9444db (diff)
downloadphp-git-69d1e788c022620f7b7f81a6071e67ce37e6034d.tar.gz
if a module provides a function it should also do so if the function
is not functional due to configure findings the function should offer a meaningful warning if it is not supported instead of just beeing undefined i had already changed this in 'gd', now this is doing it for 'standard'
Diffstat (limited to 'ext/standard/microtime.c')
-rw-r--r--ext/standard/microtime.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c
index ef7600d36a..39a85726cc 100644
--- a/ext/standard/microtime.c
+++ b/ext/standard/microtime.c
@@ -89,11 +89,11 @@ PHP_FUNCTION(gettimeofday)
}
/* }}} */
-#ifdef HAVE_GETRUSAGE
/* {{{ proto array getrusage([int who])
Returns an array of usage statistics */
PHP_FUNCTION(getrusage)
{
+#ifdef HAVE_GETRUSAGE
struct rusage usg;
int ac = ARG_COUNT(ht);
pval **pwho;
@@ -133,8 +133,10 @@ PHP_FUNCTION(getrusage)
PHP_RUSAGE_PARA(ru_stime.tv_usec);
PHP_RUSAGE_PARA(ru_stime.tv_sec);
#undef PHP_RUSAGE_PARA
-}
+#else
+ PHP_NOT_IN_THIS_BUILD;
#endif /* HAVE_GETRUSAGE */
+}
/* }}} */