summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2006-04-19 22:10:44 +0000
committerNuno Lopes <nlopess@php.net>2006-04-19 22:10:44 +0000
commitece1a5598a00b84579fb808bee29177c7ffef3e8 (patch)
tree1823beaddca92deeb19dcdb40a2a196632e5a8e5
parent4618370e8dbf553c3a173fee499807b0ba4d638a (diff)
downloadphp-git-ece1a5598a00b84579fb808bee29177c7ffef3e8.tar.gz
MFB: fix build with newer libtidy versions on windows
-rw-r--r--ext/tidy/tidy.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index 5717dfb6f4..9683939d6d 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -36,6 +36,11 @@
#include "tidy.h"
#include "buffio.h"
+/* compatibility with older versions of libtidy */
+#ifndef TIDY_CALL
+#define TIDY_CALL
+#endif
+
#define PHP_TIDY_MODULE_VERSION "2.0"
/* {{{ ext/tidy macros
@@ -333,22 +338,22 @@ zend_module_entry tidy_module_entry = {
ZEND_GET_MODULE(tidy)
#endif
-void *php_tidy_malloc(size_t len)
+void* TIDY_CALL php_tidy_malloc(size_t len)
{
return emalloc(len);
}
-void *php_tidy_realloc(void *buf, size_t len)
+void* TIDY_CALL php_tidy_realloc(void *buf, size_t len)
{
return erealloc(buf, len);
}
-void php_tidy_free(void *buf)
+void TIDY_CALL php_tidy_free(void *buf)
{
efree(buf);
}
-void php_tidy_panic(ctmbstr msg)
+void TIDY_CALL php_tidy_panic(ctmbstr msg)
{
TSRMLS_FETCH();
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not allocate memory for tidy! (Reason: %s)", (char *)msg);