Here is my build log.
/root/RHash/bindings/php/php_rhash.c:145:1: error: unknown type name 'zend_object_value'
static zend_object_value rhash_create_handler(zend_class_entry *type TSRMLS_DC);
^
/root/RHash/bindings/php/php_rhash.c: In function 'zm_startup_rhash':
/root/RHash/bindings/php/php_rhash.c:184:26: warning: assignment from incompatible pointer type [enabled by default]
rhash_ce->create_object = rhash_create_handler;
^
/root/RHash/bindings/php/php_rhash.c: In function 'zif_rhash_get_name':
/root/RHash/bindings/php/php_rhash.c:278:52: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
RETURN_STRING(rhash_get_name((unsigned)hash_id), 1);
^
/root/RHash/bindings/php/php_rhash.c:278:2: error: 'RETURN_STRING' undeclared (first use in this function)
RETURN_STRING(rhash_get_name((unsigned)hash_id), 1);
^
/root/RHash/bindings/php/php_rhash.c:278:2: note: each undeclared identifier is reported only once for each function it appears in
/root/RHash/bindings/php/php_rhash.c: In function 'zif_rhash_msg':
/root/RHash/bindings/php/php_rhash.c:305:34: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
RETURN_STRINGL(buffer, length, 1);
^
/root/RHash/bindings/php/php_rhash.c:305:2: error: 'RETURN_STRINGL' undeclared (first use in this function)
RETURN_STRINGL(buffer, length, 1);
^
/root/RHash/bindings/php/php_rhash.c: In function '_php_rhash_stream':
/root/RHash/bindings/php/php_rhash.c:313:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
rhash_object *obj = (rhash_object *)zend_object_store_get_object(getThis() TSRMLS_CC);
^
/root/RHash/bindings/php/php_rhash.c: In function 'zif_rhash_file':
/root/RHash/bindings/php/php_rhash.c:378:41: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
RETURN_STRINGL(buffer, buffer_length, 1);
^
/root/RHash/bindings/php/php_rhash.c:378:2: error: 'RETURN_STRINGL' undeclared (first use in this function)
RETURN_STRINGL(buffer, buffer_length, 1);
^
/root/RHash/bindings/php/php_rhash.c: In function 'zif_rhash_magnet':
/root/RHash/bindings/php/php_rhash.c:412:43: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
RETURN_STRINGL(buffer, buffer_size - 1, 0);
^
/root/RHash/bindings/php/php_rhash.c:412:2: error: 'RETURN_STRINGL' undeclared (first use in this function)
RETURN_STRINGL(buffer, buffer_size - 1, 0);
^
/root/RHash/bindings/php/php_rhash.c: At top level:
/root/RHash/bindings/php/php_rhash.c:428:1: error: unknown type name 'zend_object_value'
static zend_object_value rhash_create_handler(zend_class_entry *class_type TSRMLS_DC)
^
/root/RHash/bindings/php/php_rhash.c: In function 'rhash_create_handler':
/root/RHash/bindings/php/php_rhash.c:431:2: error: unknown type name 'zend_object_value'
zend_object_value retval;
^
/root/RHash/bindings/php/php_rhash.c:446:8: error: request for member 'handle' in something not a structure or union
retval.handle = zend_objects_store_put(obj, NULL,
^
/root/RHash/bindings/php/php_rhash.c:447:3: warning: passing argument 1 of 'zend_objects_store_put' from incompatible pointer type [enabled by default]
rhash_free_storage, NULL TSRMLS_CC);
^
In file included from /usr/include/php/Zend/zend_globals.h:35:0,
from /usr/include/php/Zend/zend_compile.h:657,
from /usr/include/php/Zend/zend_modules.h:26,
from /usr/include/php/Zend/zend_API.h:27,
from /usr/include/php/main/php.h:39,
from /root/RHash/bindings/php/php_rhash.c:7:
/usr/include/php/Zend/zend_objects_API.h:58:15: note: expected 'struct zend_object *' but argument is of type 'struct rhash_object *'
ZEND_API void zend_objects_store_put(zend_object *object);
^
/root/RHash/bindings/php/php_rhash.c:447:3: error: too many arguments to function 'zend_objects_store_put'
rhash_free_storage, NULL TSRMLS_CC);
^
In file included from /usr/include/php/Zend/zend_globals.h:35:0,
from /usr/include/php/Zend/zend_compile.h:657,
from /usr/include/php/Zend/zend_modules.h:26,
from /usr/include/php/Zend/zend_API.h:27,
from /usr/include/php/main/php.h:39,
from /root/RHash/bindings/php/php_rhash.c:7:
/usr/include/php/Zend/zend_objects_API.h:58:15: note: declared here
ZEND_API void zend_objects_store_put(zend_object *object);
^
/root/RHash/bindings/php/php_rhash.c:448:8: error: request for member 'handlers' in something not a structure or union
retval.handlers = &rhash_object_handlers;
^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash___construct':
/root/RHash/bindings/php/php_rhash.c:471:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
obj = (rhash_object *)zend_object_store_get_object(getThis() TSRMLS_CC);
^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash_update':
/root/RHash/bindings/php/php_rhash.c:483:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
rhash_object *obj = (rhash_object *)zend_object_store_get_object(object TSRMLS_CC);
^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash_update_stream':
/root/RHash/bindings/php/php_rhash.c:506:2: warning: passing argument 1 of 'zend_fetch_resource2_ex' from incompatible pointer type [enabled by default]
php_stream_from_zval_no_verify(stream, &handle);
^
In file included from /usr/include/php/Zend/zend_API.h:28:0,
from /usr/include/php/main/php.h:39,
from /root/RHash/bindings/php/php_rhash.c:7:
/usr/include/php/Zend/zend_list.h:66:16: note: expected 'struct zval *' but argument is of type 'struct zval **'
ZEND_API void *zend_fetch_resource2_ex(zval *res, const char *resource_type_name, int resource_type, int resource_type2);
^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash_final':
/root/RHash/bindings/php/php_rhash.c:533:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
rhash_object *obj = (rhash_object *)zend_object_store_get_object(object TSRMLS_CC);
^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash_reset':
/root/RHash/bindings/php/php_rhash.c:546:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
rhash_object *obj = (rhash_object *)zend_object_store_get_object(object TSRMLS_CC);
^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash_hashed_length':
/root/RHash/bindings/php/php_rhash.c:558:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
rhash_object *obj = (rhash_object *)zend_object_store_get_object(getThis() TSRMLS_CC);
^
/root/RHash/bindings/php/php_rhash.c: In function '_php_get_hash':
/root/RHash/bindings/php/php_rhash.c:571:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
rhash_object *obj = (rhash_object *)zend_object_store_get_object(getThis() TSRMLS_CC);
^
/root/RHash/bindings/php/php_rhash.c:577:34: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
RETURN_STRINGL(buffer, length, 1)
^
/root/RHash/bindings/php/php_rhash.c:577:2: error: 'RETURN_STRINGL' undeclared (first use in this function)
RETURN_STRINGL(buffer, length, 1)
^
/root/RHash/bindings/php/php_rhash.c:578:1: error: expected ';' before '}' token
}
^
/root/RHash/bindings/php/php_rhash.c: In function 'zim_RHash_magnet':
/root/RHash/bindings/php/php_rhash.c:629:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
rhash_object *obj = (rhash_object *)zend_object_store_get_object(getThis() TSRMLS_CC);
^
/root/RHash/bindings/php/php_rhash.c:641:40: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
RETURN_STRINGL(buffer, buf_size - 1, 0);
^
/root/RHash/bindings/php/php_rhash.c:641:2: error: 'RETURN_STRINGL' undeclared (first use in this function)
RETURN_STRINGL(buffer, buf_size - 1, 0);
^
make: *** [php_rhash.lo] 错误 1