summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-03-23 14:47:07 +0100
committerAnatol Belski <ab@php.net>2015-03-23 15:09:09 +0100
commit567565b24f8193262c4fec418bf68123fac1ff8f (patch)
tree2e1c0e59cba4636477f74745e8481a5f2e144eef
parentc0adad555784a010c90530a138d678019f6e3394 (diff)
downloadphp-git-567565b24f8193262c4fec418bf68123fac1ff8f.tar.gz
more fixes to the shared compilation
-rw-r--r--ext/hash/hash.c4
-rw-r--r--ext/hash/php_hash.h2
-rw-r--r--ext/simplexml/config.w324
-rw-r--r--ext/wddx/config.w3210
-rw-r--r--ext/xmlreader/config.w321
-rw-r--r--ext/xmlreader/php_xmlreader.c1
-rw-r--r--ext/xmlreader/php_xmlreader.h2
-rw-r--r--ext/xmlrpc/config.w323
8 files changed, 22 insertions, 5 deletions
diff --git a/ext/hash/hash.c b/ext/hash/hash.c
index 40563708e7..1975d2dbc9 100644
--- a/ext/hash/hash.c
+++ b/ext/hash/hash.c
@@ -98,7 +98,7 @@ PHP_HASH_API const php_hash_ops *php_hash_fetch_ops(const char *algo, size_t alg
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);
@@ -151,7 +151,7 @@ static void php_hash_do_hash(INTERNAL_FUNCTION_PARAMETERS, int isfilename, zend_
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);
diff --git a/ext/hash/php_hash.h b/ext/hash/php_hash.h
index 0c3a8153cb..ac384bfe72 100644
--- a/ext/hash/php_hash.h
+++ b/ext/hash/php_hash.h
@@ -36,7 +36,7 @@
#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);
diff --git a/ext/simplexml/config.w32 b/ext/simplexml/config.w32
index a02f3dded3..d581fc8e40 100644
--- a/ext/simplexml/config.w32
+++ b/ext/simplexml/config.w32
@@ -10,6 +10,10 @@ if (PHP_SIMPLEXML == "yes") {
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)) {
diff --git a/ext/wddx/config.w32 b/ext/wddx/config.w32
index 7b8483d0aa..323c4303b4 100644
--- a/ext/wddx/config.w32
+++ b/ext/wddx/config.w32
@@ -6,7 +6,17 @@ ARG_WITH("wddx", "WDDX support", "yes");
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");
}
diff --git a/ext/xmlreader/config.w32 b/ext/xmlreader/config.w32
index 703f2bc4df..060a0cbb73 100644
--- a/ext/xmlreader/config.w32
+++ b/ext/xmlreader/config.w32
@@ -10,5 +10,6 @@ if (PHP_XMLREADER == "yes" && PHP_LIBXML == "yes") {
ADD_FLAG("CFLAGS_XMLREADER", "/D LIBXML_STATIC");
}
ADD_EXTENSION_DEP('xmlreader', 'libxml');
+ ADD_EXTENSION_DEP('xmlreader', 'dom');
}
diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c
index b572c85ada..338682702e 100644
--- a/ext/xmlreader/php_xmlreader.c
+++ b/ext/xmlreader/php_xmlreader.c
@@ -29,6 +29,7 @@
#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>
diff --git a/ext/xmlreader/php_xmlreader.h b/ext/xmlreader/php_xmlreader.h
index e07c126c8e..3f7bf3d64e 100644
--- a/ext/xmlreader/php_xmlreader.h
+++ b/ext/xmlreader/php_xmlreader.h
@@ -34,7 +34,7 @@ extern zend_module_entry xmlreader_module_entry;
/* 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
diff --git a/ext/xmlrpc/config.w32 b/ext/xmlrpc/config.w32
index 4da691e976..58e7d9f44b 100644
--- a/ext/xmlrpc/config.w32
+++ b/ext/xmlrpc/config.w32
@@ -6,7 +6,8 @@ ARG_WITH("xmlrpc", "XMLRPC-EPI support", "no");
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 \