[Groonga-commit] groonga/groonga [master] configure: use USE_ prefix for build switches

Back to archive index

null+****@clear***** null+****@clear*****
2012年 4月 13日 (金) 17:54:25 JST


Kouhei Sutou	2012-04-13 17:54:25 +0900 (Fri, 13 Apr 2012)

  New Revision: 5a7503e26b4efe7948fafa1fa5efdf8e4ccf7e30

  Log:
    configure: use USE_ prefix for build switches
    
    ENABLE_MEMORY_DEBUG ->
    USE_MEMORY_DEBUG

  Modified files:
    configure.ac
    lib/ctx.c
    lib/ctx_impl.h
    lib/expr.c

  Modified: configure.ac (+1 -1)
===================================================================
--- configure.ac    2012-04-13 17:53:09 +0900 (aaa4f18)
+++ configure.ac    2012-04-13 17:54:25 +0900 (eb4c4aa)
@@ -503,7 +503,7 @@ AC_ARG_ENABLE(memory-debug,
 AC_MSG_RESULT([$enable_memory_debug])
 
 if test "x$enable_memory_debug" = "xyes"; then
-  AC_DEFINE(ENABLE_MEMORY_DEBUG, [1],
+  AC_DEFINE(USE_MEMORY_DEBUG, [1],
             [Define to 1 if you enable debuging memory management])
 fi
 

  Modified: lib/ctx.c (+4 -4)
===================================================================
--- lib/ctx.c    2012-04-13 17:53:09 +0900 (dc087b8)
+++ lib/ctx.c    2012-04-13 17:54:25 +0900 (1995d2b)
@@ -173,7 +173,7 @@ grn_str2timeval(const char *str, uint32_t str_len, grn_timeval *tv)
   return GRN_SUCCESS;
 }
 
-#ifdef ENABLE_MEMORY_DEBUG
+#ifdef USE_MEMORY_DEBUG
 inline static void
 grn_alloc_info_set_backtrace(char *buffer, size_t size)
 {
@@ -314,13 +314,13 @@ grn_alloc_info_free(grn_ctx *ctx)
   ctx->impl->alloc_info = NULL;
 }
 
-#else /* ENABLE_MEMORY_DEBUG */
+#else /* USE_MEMORY_DEBUG */
 #  define grn_alloc_info_add(address)
 #  define grn_alloc_info_change(old_address, new_address)
 #  define grn_alloc_info_check(address)
 #  define grn_alloc_info_dump(ctx)
 #  define grn_alloc_info_free(ctx)
-#endif /* ENABLE_MEMORY_DEBUG */
+#endif /* USE_MEMORY_DEBUG */
 
 #ifdef USE_FAIL_MALLOC
 int grn_fmalloc_prob = 0;
@@ -412,7 +412,7 @@ grn_ctx_impl_init(grn_ctx *ctx)
 #ifdef USE_DYNAMIC_MALLOC_CHANGE
   grn_ctx_impl_init_malloc(ctx);
 #endif
-#ifdef ENABLE_MEMORY_DEBUG
+#ifdef USE_MEMORY_DEBUG
   ctx->impl->alloc_info = NULL;
 #endif
   ctx->impl->encoding = ctx->encoding;

  Modified: lib/ctx_impl.h (+2 -2)
===================================================================
--- lib/ctx_impl.h    2012-04-13 17:53:09 +0900 (03ce5b5)
+++ lib/ctx_impl.h    2012-04-13 17:54:25 +0900 (0fb5155)
@@ -76,7 +76,7 @@ typedef struct {
 #define GRN_STACK_SIZE 1024
 #define GRN_CTX_N_SEGMENTS 512
 
-#ifdef ENABLE_MEMORY_DEBUG
+#ifdef USE_MEMORY_DEBUG
 typedef struct _grn_alloc_info grn_alloc_info;
 struct _grn_alloc_info
 {
@@ -105,7 +105,7 @@ struct _grn_ctx_impl {
   grn_strdup_func strdup_func;
 #endif
 
-#ifdef ENABLE_MEMORY_DEBUG
+#ifdef USE_MEMORY_DEBUG
   /* memory debug portion */
   grn_alloc_info *alloc_info;
 #endif

  Modified: lib/expr.c (+1 -1)
===================================================================
--- lib/expr.c    2012-04-13 17:53:09 +0900 (a054cc2)
+++ lib/expr.c    2012-04-13 17:54:25 +0900 (d569318)
@@ -626,7 +626,7 @@ grn_expr_close(grn_ctx *ctx, grn_obj *expr)
     grn_obj *obj;
     GRN_PTR_POP(&e->objs, obj);
     if (obj) {
-#ifdef ENABLE_MEMORY_DEBUG
+#ifdef USE_MEMORY_DEBUG
       grn_obj_unlink(ctx, obj);
 #else
       if (obj->header.type) {




Groonga-commit メーリングリストの案内
Back to archive index