1
0
Fork 0

merged r466 from b1.2: support shm-malloc only on --enable-xcache-test

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@470 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 2007-08-05 02:54:14 +00:00
parent 7fa6d217b5
commit 8d96b47ea3
3 changed files with 6 additions and 2 deletions

View File

@ -27,7 +27,6 @@ if test "$PHP_XCACHE" != "no"; then
xcache.c \
mmap.c \
mem.c \
xc_malloc.c \
xc_shm.c \
const_string.c \
opcode_spec.c \
@ -51,6 +50,7 @@ if test "$PHP_XCACHE" != "no"; then
[ --enable-xcache-test XCache: Enable self test - FOR DEVELOPERS ONLY!!], no, no)
if test "$PHP_XCACHE_TEST" != "no"; then
XCACHE_ENABLE_TEST=-DXCACHE_ENABLE_TEST
xcache_sources="$xcache_sources xc_malloc.c"
AC_DEFINE([HAVE_XCACHE_TEST], 1, [Define to enable XCache self test])
else
XCACHE_ENABLE_TEST=

View File

@ -15,7 +15,6 @@ if (PHP_XCACHE != "no") {
xcache.c \
mmap.c \
mem.c \
xc_malloc.c \
xc_shm.c \
const_string.c \
opcode_spec.c \
@ -113,6 +112,7 @@ if (PHP_XCACHE != "no") {
ARG_ENABLE("xcache-test", "XCache: Enable self test - FOR DEVELOPERS ONLY!!", "no");
if (PHP_XCACHE_TEST != "no") {
ADD_FLAG("XCACHE_ENABLE_TEST", "-DXCACHE_ENABLE_TEST");
xcache_sources += " xc_malloc.c";
AC_DEFINE("HAVE_XCACHE_TEST", 1, "Define to enable XCache self test");
}
else {

View File

@ -19,12 +19,16 @@ static xc_shm_scheme_t xc_shm_schemes[10];
void xc_shm_init_modules() /* {{{ */
{
extern void xc_shm_mem_init();
#ifdef HAVE_XCACHE_TEST
extern void xc_shm_malloc_register();
#endif
extern void xc_shm_mmap_register();
memset(xc_shm_schemes, 0, sizeof(xc_shm_schemes));
xc_shm_mem_init();
#ifdef HAVE_XCACHE_TEST
xc_shm_malloc_register();
#endif
xc_shm_mmap_register();
}
/* }}} */