mirror of
https://github.com/php/php-src.git
synced 2026-04-03 22:22:18 +02:00
While basic support for MSVCRT debugging has been added long ago[1], the leak checking is not usable for the test suite, because we are no longer calling `xmlCleanupParser()` on RSHUTDOWN of ext/libxml[2], and therefore a few bogus leaks are reported whenever ext/libxml is unloaded. We therefore ignore memory leaks for this case. We introduce `ZEND_IGNORE_LEAKS_BEGIN()` and `ZEND_IGNORE_LEAKS_END()` to keep those ignores better readable, and also because these *might* be useful for other leak checkers as well. We also explicitly free the `zend_handlers_table` and the `p5s` to avoid spurious leak reports. [1] <http://git.php.net/?p=php-src.git;a=commit;h=d756e1db2324c1f4ab6f9b52e329959ce6a02bc3> [2] <http://git.php.net/?p=php-src.git;a=commit;h=8742276eb3905eb97a585417000c7b8df85006d4>
27 lines
1.0 KiB
JavaScript
27 lines
1.0 KiB
JavaScript
// vim:ft=javascript
|
|
|
|
ARG_WITH("libxml", "LibXML support", "yes");
|
|
|
|
if (PHP_LIBXML == "yes") {
|
|
if (CHECK_LIB("libxml2_a_dll.lib;libxml2_a.lib", "libxml") &&
|
|
CHECK_LIB("libiconv_a.lib;iconv_a.lib;libiconv.lib;iconv.lib", "libxml") &&
|
|
CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS_LIBXML", PHP_PHP_BUILD + "\\include\\libxml2") &&
|
|
CHECK_HEADER_ADD_INCLUDE("libxml/tree.h", "CFLAGS_LIBXML", PHP_PHP_BUILD + "\\include\\libxml2") &&
|
|
ADD_EXTENSION_DEP('libxml', 'iconv')) {
|
|
|
|
EXTENSION("libxml", "libxml.c", false /* never shared */, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
|
|
AC_DEFINE("HAVE_LIBXML", 1, "LibXML support");
|
|
ADD_FLAG("CFLAGS_LIBXML", "/D LIBXML_STATIC /D LIBXML_STATIC_FOR_DLL /D HAVE_WIN32_THREADS ");
|
|
if (!PHP_LIBXML_SHARED) {
|
|
ADD_DEF_FILE("ext\\libxml\\php_libxml2.def");
|
|
}
|
|
PHP_INSTALL_HEADERS("ext/libxml/", "php_libxml.h");
|
|
if (PHP_CRT_DEBUG == "yes") {
|
|
ADD_FLAG("CFLAGS_LIBXML", "/D PHP_WIN32_DEBUG_HEAP");
|
|
}
|
|
} else {
|
|
WARNING("libxml support can't be enabled, iconv or libxml are missing")
|
|
PHP_LIBXML = "no"
|
|
}
|
|
}
|