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/crypt.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/crypt.c')
-rw-r--r-- | ext/standard/crypt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index ee117e1429..801282bc76 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -115,11 +115,13 @@ static void php_to64(char *s, long v, int n) { v >>= 6; } } +#endif /* HAVE_CRYPT */ /* {{{ proto string crypt(string str [, string salt]) Encrypt a string */ PHP_FUNCTION(crypt) { +#if HAVE_CRYPT char salt[PHP_MAX_SALT_LEN+1]; pval **arg1, **arg2; @@ -176,9 +178,11 @@ PHP_FUNCTION(crypt) return_value->value.str.len = strlen(return_value->value.str.val); return_value->type = IS_STRING; pval_copy_constructor(return_value); +#else + PHP_NOT_IN_THIS_BUILD; +#endif /* HAVE_CRYPT */ } /* }}} */ -#endif |