OSDN Git Service

*
authorkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Mon, 17 Mar 2008 13:34:52 +0000 (13:34 +0000)
committerkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Mon, 17 Mar 2008 13:34:52 +0000 (13:34 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/branches/RELEASE_0_8_0@1883 1a406e8e-add9-4483-a2c8-d8cac5b7c224

include/config.h
include/mod_chxj.h
src/malloc.c
src/qs_malloc.c

index 9489e2d..ace2207 100644 (file)
@@ -36,7 +36,7 @@
 
 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
    to 0 otherwise. */
-#define HAVE_MALLOC 1
+#define HAVE_MALLOC 0
 
 /* Define to 1 if you have the `memcpy' function. */
 #define HAVE_MEMCPY 1
 /* #undef const */
 
 /* Define to rpl_malloc if the replacement function should be used. */
-/* #undef malloc */
+#define malloc rpl_malloc
index cd9afe2..a5363c1 100644 (file)
@@ -367,6 +367,9 @@ extern char* chxj_node_exchange(
 
 #define IMAGE_CACHE_LIMIT_FMT_LEN  (20)
 
+#if HAVE_MALLOC == 0
+extern void *rpl_malloc(size_t n);
+#endif
 
 #endif
 /*
index 8aa5702..c038441 100644 (file)
@@ -1,6 +1,3 @@
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
 #undef malloc
 
 #include <sys/types.h>
index 1b4a3a9..84c877d 100644 (file)
@@ -53,6 +53,11 @@ qs_all_free(Doc* doc, const char* UNUSED(fname), int UNUSED(line))
     doc->do_init_flag = 0;
   }
 }
+
+
+#if HAVE_MALLOC == 0
+#include "malloc.c"
+#endif
 /*
  * vim:ts=2 et
  */