diff options
author | Michael Wallner <mike@php.net> | 2007-05-29 12:28:57 +0000 |
---|---|---|
committer | Michael Wallner <mike@php.net> | 2007-05-29 12:28:57 +0000 |
commit | 4e35f60f7189af96d0531d57faec59451a404ca2 (patch) | |
tree | fb5c33e349c0c6d7e8b7e1fb565eebbe07b3d214 | |
parent | 28747bebc983dc32a57555362fa9854555fa0c1c (diff) | |
download | php-git-4e35f60f7189af96d0531d57faec59451a404ca2.tar.gz |
- fix build where mhash.h is not declaring
mhash_get_hash_name_static and/or
mhash_get_keygen_name_static protos
-rw-r--r-- | ext/mhash/config.m4 | 14 | ||||
-rw-r--r-- | ext/mhash/mhash.c | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/ext/mhash/config.m4 b/ext/mhash/config.m4 index 54903c44a0..d7c5784b4b 100644 --- a/ext/mhash/config.m4 +++ b/ext/mhash/config.m4 @@ -13,6 +13,20 @@ if test "$PHP_MHASH" != "no"; then if test -z "$MHASH_DIR"; then AC_MSG_ERROR(Please reinstall libmhash - I cannot find mhash.h) fi + + PHP_MHASH_MISSING_PROTOS= + AC_MSG_CHECKING(for missing protos) + AC_EGREP_HEADER(mhash_get_hash_name_static, [$MHASH_DIR/include/mhash.h], [ + AC_DEFINE([HAVE_MHASH_GET_HASH_NAME_STATIC_PROTO], 1, [ ]) + ], [ + PHP_MHASH_MISSING_PROTOS="mhash_get_hash_name_static" + ]) + AC_EGREP_HEADER(mhash_get_keygen_name_static, [$MHASH_DIR/include/mhash.h], [ + AC_DEFINE([HAVE_MHASH_GET_KEYGEN_NAME_STATIC_PROTO], 1, [ ]) + ], [ + PHP_MHASH_MISSING_PROTOS="mhash_get_keygen_name_static $PHP_MHASH_MISSING_PROTOS" + ]) + AC_MSG_RESULT([$PHP_MHASH_MISSING_PROTOS]) PHP_ADD_INCLUDE($MHASH_DIR/include) PHP_ADD_LIBRARY_WITH_PATH(mhash, $MHASH_DIR/$PHP_LIBDIR, MHASH_SHARED_LIBADD) diff --git a/ext/mhash/mhash.c b/ext/mhash/mhash.c index dbc90ab090..969d9e63a0 100644 --- a/ext/mhash/mhash.c +++ b/ext/mhash/mhash.c @@ -65,8 +65,12 @@ ZEND_GET_MODULE(mhash) #define NO_ARGS() (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")) +#ifndef HAVE_MHASH_GET_HASH_NAME_STATIC_PROTO extern const char *mhash_get_hash_name_static(hashid hash); +#endif +#ifndef HAVE_MHASH_GET_KEYGEN_NAME_STATIC_PROTO extern const char *mhash_get_keygen_name_static(hashid type); +#endif /* {{{ int php_mhash */ int php_mhash(hashid hash, const char *input_str, int input_len, const char *key_str, int key_len, char **enc, int *len TSRMLS_DC) |