Skip to content

@lovette /config.m4
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
libxmlcrash PHP extension (source)
PHP_ARG_ENABLE(libxmlcrash, whether to enable libxmlcrash support,
[ --enable-libxmlcrash Enable libxmlcrash support])
if test "$PHP_LIBXMLCRASH" != "no"; then
PHP_ADD_INCLUDE(/usr/include/libxml2/)
PHP_NEW_EXTENSION(libxmlcrash, libxmlcrash.c, $ext_shared)
ifdef([PHP_ADD_EXTENSION_DEP],
[
PHP_ADD_EXTENSION_DEP(libxmlcrash, libxml)
])
fi
<?xml version="1.0"?>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_libxmlcrash.h"
#include <libxml/parser.h>
const zend_function_entry libxmlcrash_functions[] = {
PHP_FE_END
};
/* As of PHP 5.1, interdependencies between extensions can be enforced */
#if ZEND_MODULE_API_NO >= 20050617
static zend_module_dep libxmlcrash_deps[] = {
ZEND_MOD_REQUIRED("libxml")
ZEND_MOD_END
};
#endif
zend_module_entry libxmlcrash_module_entry = {
#if ZEND_MODULE_API_NO >= 20050617
STANDARD_MODULE_HEADER_EX,
NULL,
libxmlcrash_deps,
#else
STANDARD_MODULE_HEADER,
#endif
"libxmlcrash",
libxmlcrash_functions,
PHP_MINIT(libxmlcrash),
NULL,
NULL,
NULL,
NULL,
"0.1",
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_LIBXMLCRASH
ZEND_GET_MODULE(libxmlcrash)
#endif
PHP_MINIT_FUNCTION(libxmlcrash)
{
xmlParseFile("/tmp/dummy.xml");
return SUCCESS;
}
extension="libxmlcrash.so"
#ifndef PHP_LIBXMLCRASH_H
#define PHP_LIBXMLCRASH_H
extern zend_module_entry libxmlcrash_module_entry;
#define phpext_libxmlcrash_ptr &libxmlcrash_module_entry
#ifdef ZTS
#include "TSRM.h"
#endif
PHP_MINIT_FUNCTION(libxmlcrash);
#ifdef ZTS
#define LIBXMLCRASH_G(v) TSRMG(libxmlcrash_globals_id, zend_libxmlcrash_globals *, v)
#else
#define LIBXMLCRASH_G(v) (libxmlcrash_globals.v)
#endif
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.