diff options
-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) |