summaryrefslogtreecommitdiffstats
path: root/libmsi/debug.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-02-06 14:47:23 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-02-07 00:06:29 +0100
commitfa3969de187e606c6690212299e0b0a012315a6f (patch)
treeb3311e0381bed1a0a9f82e4a25f06410a5cb8c41 /libmsi/debug.h
parentcc431bfc4c19aac79d98546d4abae4e4ad35d500 (diff)
downloadmsitools-fa3969de187e606c6690212299e0b0a012315a6f.tar.gz
msitools-fa3969de187e606c6690212299e0b0a012315a6f.tar.xz
msitools-fa3969de187e606c6690212299e0b0a012315a6f.zip
Define TRACE to use g_debug()
Diffstat (limited to 'libmsi/debug.h')
-rw-r--r--libmsi/debug.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/libmsi/debug.h b/libmsi/debug.h
index dbd1da7..3cc76e5 100644
--- a/libmsi/debug.h
+++ b/libmsi/debug.h
@@ -109,9 +109,15 @@ static inline const char *debugstr_an( const char * s, int n ) { return wine_dbg
static inline const char *debugstr_guid( const uint8_t *id ) { return wine_dbgstr_guid( id ); }
static inline const char *debugstr_a( const char *s ) { return wine_dbgstr_an( s, -1 ); }
-#undef ERR /* Solaris got an 'ERR' define in <sys/reg.h> */
-#define TRACE(fmt, ...) (void)0 // WINE_DPRINTF(TRACE, __func__, fmt, ## __VA_ARGS__)
-#define TRACE_ON(channel) 0
+#ifndef TRACE_ON
+#define TRACE_ON 0
+#endif
+
+#define TRACE(fmt, ...) G_STMT_START{ \
+ if (TRACE_ON) { \
+ g_debug(G_STRLOC " " fmt, ## __VA_ARGS__); \
+ } \
+}G_STMT_END
#ifdef __cplusplus
}