Skip to content

Commit 567565b

Browse files
committed
more fixes to the shared compilation
1 parent c0adad5 commit 567565b

File tree

8 files changed

+22
-5
lines changed

8 files changed

+22
-5
lines changed

ext/hash/hash.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ PHP_HASH_API const php_hash_ops *php_hash_fetch_ops(const char *algo, size_t alg
9898

9999
PHP_HASH_API void php_hash_register_algo(const char *algo, const php_hash_ops *ops) /* {{{ */
100100
{
101-
int algo_len = strlen(algo);
101+
size_t algo_len = strlen(algo);
102102
char *lower = zend_str_tolower_dup(algo, algo_len);
103103
zend_hash_str_add_ptr(&php_hash_hashtable, lower, algo_len, (void *) ops);
104104
efree(lower);
@@ -151,7 +151,7 @@ static void php_hash_do_hash(INTERNAL_FUNCTION_PARAMETERS, int isfilename, zend_
151151

152152
if (isfilename) {
153153
char buf[1024];
154-
int n;
154+
size_t n;
155155

156156
while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) {
157157
ops->hash_update(context, (unsigned char *) buf, n);

ext/hash/php_hash.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define php_hash_uint64 uint64_t
3737

3838
typedef void (*php_hash_init_func_t)(void *context);
39-
typedef void (*php_hash_update_func_t)(void *context, const unsigned char *buf, unsigned int count);
39+
typedef void (*php_hash_update_func_t)(void *context, const unsigned char *buf, size_t count);
4040
typedef void (*php_hash_final_func_t)(unsigned char *digest, void *context);
4141
typedef int (*php_hash_copy_func_t)(const void *ops, void *orig_context, void *dest_context);
4242

ext/simplexml/config.w32

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ if (PHP_SIMPLEXML == "yes") {
1010
AC_DEFINE("HAVE_SIMPLEXML", 1, "Simple XML support");
1111
if (!PHP_SIMPLEXML_SHARED) {
1212
ADD_FLAG("CFLAGS_SIMPLEXML", "/D LIBXML_STATIC");
13+
} else {
14+
if (!CHECK_LIB("libxml2.lib", "simplexml")) {
15+
WARNING("simplexml support can't be enabled, libxml is not found")
16+
}
1317
}
1418

1519
if (!ADD_EXTENSION_DEP('simplexml', 'spl', true)) {

ext/wddx/config.w32

+10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,17 @@ ARG_WITH("wddx", "WDDX support", "yes");
66
if (PHP_WDDX == "yes" && PHP_LIBXML == "yes") {
77
EXTENSION("wddx", "wddx.c");
88
AC_DEFINE("HAVE_WDDX", 1, "WDDX support");
9+
10+
if (!PHP_WDDX_SHARED) {
11+
ADD_FLAG("CFLAGS_WDDX", "/D LIBXML_STATIC");
12+
} else {
13+
if (!CHECK_LIB("libxml2.lib", "wddx")) {
14+
WARNING("wddx support can't be enabled, libxml is not found")
15+
}
16+
}
17+
918
ADD_EXTENSION_DEP('wddx', 'libxml');
19+
ADD_EXTENSION_DEP('wddx', 'xml')
1020
CHECK_HEADER_ADD_INCLUDE("timelib_config.h", "CFLAGS_WDDX", "ext/date/lib");
1121
}
1222

ext/xmlreader/config.w32

+1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ if (PHP_XMLREADER == "yes" && PHP_LIBXML == "yes") {
1010
ADD_FLAG("CFLAGS_XMLREADER", "/D LIBXML_STATIC");
1111
}
1212
ADD_EXTENSION_DEP('xmlreader', 'libxml');
13+
ADD_EXTENSION_DEP('xmlreader', 'dom');
1314
}
1415

ext/xmlreader/php_xmlreader.c

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "php_xmlreader.h"
3030
#ifdef HAVE_DOM
3131
#include "ext/dom/xml_common.h"
32+
#include "ext/dom/dom_ce.h"
3233
#endif
3334
#include <libxml/xmlreader.h>
3435
#include <libxml/uri.h>

ext/xmlreader/php_xmlreader.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern zend_module_entry xmlreader_module_entry;
3434
/* If xmlreader and dom both are compiled statically,
3535
no DLL import should be used in xmlreader for dom symbols. */
3636
#ifdef PHP_WIN32
37-
# if defined(HAVE_DOM) && !defined(COMPILE_DL_DOM)
37+
# if defined(HAVE_DOM) && !defined(COMPILE_DL_DOM) && !defined(COMPILE_DL_XMLREADER)
3838
# define DOM_LOCAL_DEFINES 1
3939
# endif
4040
#endif

ext/xmlrpc/config.w32

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ ARG_WITH("xmlrpc", "XMLRPC-EPI support", "no");
66
if (PHP_XMLRPC != "no") {
77
if (CHECK_HEADER_ADD_INCLUDE("xmlrpc.h", "CFLAGS_XMLRPC", configure_module_dirname + "/libxmlrpc")
88
&& CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS")
9-
&& ADD_EXTENSION_DEP('xmlrpc', 'libxml')) {
9+
&& ADD_EXTENSION_DEP('xmlrpc', 'libxml')
10+
&& ADD_EXTENSION_DEP('xmlrpc', 'xml')) {
1011
EXTENSION('xmlrpc', 'xmlrpc-epi-php.c', PHP_XMLRPC_SHARED, "-DVERSION=\"0.50\"");
1112
ADD_SOURCES(configure_module_dirname + "/libxmlrpc", "base64.c simplestring.c xml_to_dandarpc.c \
1213
xmlrpc_introspection.c encodings.c system_methods.c xml_to_xmlrpc.c \

0 commit comments

Comments
 (0)