From 6b4392c71716d35e7b6d5597689559f50e0dc2fe Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Tue, 16 Feb 2010 02:34:01 -0800 Subject: [PATCH] Fixed gcc build --- .hgignore | 8 ++++++++ moo/mooutils/mooutils-debug.h | 15 ++++----------- moo/mooutils/mooutils-messages.h | 4 ++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.hgignore b/.hgignore index c02837f6..c952a3cd 100644 --- a/.hgignore +++ b/.hgignore @@ -8,7 +8,11 @@ build/ *.bak *.pyc *.tmp +*.gmo +*.stamp +*-gxml.h *~ +*.a .DS_Store Makefile.in *-enums.[ch] @@ -22,6 +26,10 @@ doc/help/*.html doc/help.html doc/help-sections.h doc/medit.1 +CMakeFiles/ +Makefile +cmake_install.cmake +moo/mooedit/gtksourceview/*-mangled.* syntax: regexp ^po(-gsv)?/(Makefile\.in\.in|dist|missing|notexist|pot|intltool-update)$ diff --git a/moo/mooutils/mooutils-debug.h b/moo/mooutils/mooutils-debug.h index 1f8beeba..6292dd60 100644 --- a/moo/mooutils/mooutils-debug.h +++ b/moo/mooutils/mooutils-debug.h @@ -80,16 +80,11 @@ G_STMT_START { \ } \ } G_STMT_END -gboolean moo_debug_enabled (const char *var, - gboolean def_enabled); -void _moo_set_debug (const char *domains); - #elif defined(MOO_CL_GCC) #define MOO_DEBUG_INIT(domain, def_enabled) #define moo_dmsg(format, args...) G_STMT_START {} G_STMT_END #define moo_dprint(format, args...) G_STMT_START {} G_STMT_END -#define moo_debug(format, args...) G_STMT_START {} G_STMT_END #define MOO_DEBUG_CODE(whatever) G_STMT_START {} G_STMT_END #else /* not gcc, not DEBUG */ @@ -105,16 +100,14 @@ static void moo_dprint (const char *format, ...) G_GNUC_PRINTF(1,2) { } -static void moo_debug_dummy (const char *format, ...) G_GNUC_PRINTF(1,2) -{ -} - -#define moo_debug moo_debug_dummy - #endif /* gcc or DEBUG */ #define _moo_message moo_debug +gboolean moo_debug_enabled (const char *var, + gboolean def_enabled); +void _moo_set_debug (const char *domains); + G_END_DECLS #endif /* MOO_UTILS_DEBUG_H */ diff --git a/moo/mooutils/mooutils-messages.h b/moo/mooutils/mooutils-messages.h index 48c32874..5cf36847 100644 --- a/moo/mooutils/mooutils-messages.h +++ b/moo/mooutils/mooutils-messages.h @@ -53,13 +53,13 @@ do { \ #ifdef DEBUG #define _MOO_DEBUG_ASSERT _MOO_ASSERT_CHECK #define _MOO_DEBUG_ASSERT_NOT_REACHED() _MOO_ASSERT_MESSAGE ("should not be reached") +#define _MOO_DEBUG_SIDE_ASSERT(what) do { gboolean res__ = (what); _MOO_DEBUG_ASSERT(res__); } while (0) #else #define _MOO_DEBUG_ASSERT(cond) MOO_VOID_STMT #define _MOO_DEBUG_ASSERT_NOT_REACHED() MOO_VOID_STMT +#define _MOO_DEBUG_SIDE_ASSERT(what) MOO_VOID_STMT #endif -#define _MOO_DEBUG_SIDE_ASSERT(what) do { gboolean res__ = (what); _MOO_DEBUG_ASSERT(res__); } while (0) - #define moo_assert _MOO_DEBUG_ASSERT #define moo_side_assert _MOO_DEBUG_SIDE_ASSERT #define moo_release_assert _MOO_RELEASE_ASSERT