diff options
author | Hartmut Holzgraefe <hholzgra@php.net> | 2000-05-26 17:04:02 +0000 |
---|---|---|
committer | Hartmut Holzgraefe <hholzgra@php.net> | 2000-05-26 17:04:02 +0000 |
commit | 69d1e788c022620f7b7f81a6071e67ce37e6034d (patch) | |
tree | e13e0b9016827cdcada7acef8164fe5c0944db6a /ext/standard/datetime.c | |
parent | 9bfd5e5e555372604ff69642dc32ef6e2e9444db (diff) | |
download | php-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/datetime.c')
-rw-r--r-- | ext/standard/datetime.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index d9b0b4b3d6..b00937393c 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -677,11 +677,17 @@ void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm) efree(buf); RETURN_FALSE; } +#endif + /* {{{ proto string strftime(string format [, int timestamp]) Format a local time/date according to locale settings */ PHP_FUNCTION(strftime) { +#if HAVE_STRFTIME _php_strftime(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); +#else + PHP_NOT_IN_THIS_BUILD; +#endif } /* }}} */ @@ -689,11 +695,14 @@ PHP_FUNCTION(strftime) Format a GMT/CUT time/date according to locale settings */ PHP_FUNCTION(gmstrftime) { +#if HAVE_STRFTIME _php_strftime(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); +#else + PHP_NOT_IN_THIS_BUILD; +#endif } /* }}} */ -#endif /* {{{ proto int strtotime(string time, int now) Convert string representation of date and time to a timestamp */ |