From d1b6e18a99caf7e0c38707f4aed7ec8c492e0424 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Tue, 22 Jan 2013 16:54:26 -0800 Subject: [PATCH] Revert opt_abort and opt_junk refactoring. Revert refactoring of opt_abort and opt_junk declarations. clang accepts the config_*-based declarations (and generates correct code), but gcc complains with: error: initializer element is not constant --- src/jemalloc.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/jemalloc.c b/src/jemalloc.c index 2d56e4aa..c117685a 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -10,8 +10,20 @@ malloc_tsd_data(, thread_allocated, thread_allocated_t, /* Runtime configuration options. */ const char *je_malloc_conf; -bool opt_abort = config_debug; -bool opt_junk = (config_debug && config_fill); +bool opt_abort = +#ifdef JEMALLOC_DEBUG + true +#else + false +#endif + ; +bool opt_junk = +#if (defined(JEMALLOC_DEBUG) && defined(JEMALLOC_FILL)) + true +#else + false +#endif + ; size_t opt_quarantine = ZU(0); bool opt_redzone = false; bool opt_utrace = false;