PHP_HASH_API void php_hash_register_algo(const char *algo, const php_hash_ops *ops) /* {{{ */
{
- int algo_len = strlen(algo);
+ size_t algo_len = strlen(algo);
char *lower = zend_str_tolower_dup(algo, algo_len);
zend_hash_str_add_ptr(&php_hash_hashtable, lower, algo_len, (void *) ops);
efree(lower);
if (isfilename) {
char buf[1024];
- int n;
+ size_t n;
while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) {
ops->hash_update(context, (unsigned char *) buf, n);
#define php_hash_uint64 uint64_t
typedef void (*php_hash_init_func_t)(void *context);
-typedef void (*php_hash_update_func_t)(void *context, const unsigned char *buf, unsigned int count);
+typedef void (*php_hash_update_func_t)(void *context, const unsigned char *buf, size_t count);
typedef void (*php_hash_final_func_t)(unsigned char *digest, void *context);
typedef int (*php_hash_copy_func_t)(const void *ops, void *orig_context, void *dest_context);
AC_DEFINE("HAVE_SIMPLEXML", 1, "Simple XML support");
if (!PHP_SIMPLEXML_SHARED) {
ADD_FLAG("CFLAGS_SIMPLEXML", "/D LIBXML_STATIC");
+ } else {
+ if (!CHECK_LIB("libxml2.lib", "simplexml")) {
+ WARNING("simplexml support can't be enabled, libxml is not found")
+ }
}
if (!ADD_EXTENSION_DEP('simplexml', 'spl', true)) {
if (PHP_WDDX == "yes" && PHP_LIBXML == "yes") {
EXTENSION("wddx", "wddx.c");
AC_DEFINE("HAVE_WDDX", 1, "WDDX support");
+
+ if (!PHP_WDDX_SHARED) {
+ ADD_FLAG("CFLAGS_WDDX", "/D LIBXML_STATIC");
+ } else {
+ if (!CHECK_LIB("libxml2.lib", "wddx")) {
+ WARNING("wddx support can't be enabled, libxml is not found")
+ }
+ }
+
ADD_EXTENSION_DEP('wddx', 'libxml');
+ ADD_EXTENSION_DEP('wddx', 'xml')
CHECK_HEADER_ADD_INCLUDE("timelib_config.h", "CFLAGS_WDDX", "ext/date/lib");
}
ADD_FLAG("CFLAGS_XMLREADER", "/D LIBXML_STATIC");
}
ADD_EXTENSION_DEP('xmlreader', 'libxml');
+ ADD_EXTENSION_DEP('xmlreader', 'dom');
}
#include "php_xmlreader.h"
#ifdef HAVE_DOM
#include "ext/dom/xml_common.h"
+#include "ext/dom/dom_ce.h"
#endif
#include <libxml/xmlreader.h>
#include <libxml/uri.h>
/* If xmlreader and dom both are compiled statically,
no DLL import should be used in xmlreader for dom symbols. */
#ifdef PHP_WIN32
-# if defined(HAVE_DOM) && !defined(COMPILE_DL_DOM)
+# if defined(HAVE_DOM) && !defined(COMPILE_DL_DOM) && !defined(COMPILE_DL_XMLREADER)
# define DOM_LOCAL_DEFINES 1
# endif
#endif
if (PHP_XMLRPC != "no") {
if (CHECK_HEADER_ADD_INCLUDE("xmlrpc.h", "CFLAGS_XMLRPC", configure_module_dirname + "/libxmlrpc")
&& CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS")
- && ADD_EXTENSION_DEP('xmlrpc', 'libxml')) {
+ && ADD_EXTENSION_DEP('xmlrpc', 'libxml')
+ && ADD_EXTENSION_DEP('xmlrpc', 'xml')) {
EXTENSION('xmlrpc', 'xmlrpc-epi-php.c', PHP_XMLRPC_SHARED, "-DVERSION=\"0.50\"");
ADD_SOURCES(configure_module_dirname + "/libxmlrpc", "base64.c simplestring.c xml_to_dandarpc.c \
xmlrpc_introspection.c encodings.c system_methods.c xml_to_xmlrpc.c \