From eda7b8938a15ee2a5fcde5b201258403d2287644 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Thu, 21 Apr 2011 12:05:19 +0200 Subject: [PATCH] common: don't try to redefine PANIC if it already exists canvas_base.c tries to define PANIC, but it might already be set if eg client/debug.h has been included before. All the other macros in this file are guarded by #ifndef, this commit adds the missing #ifndef to PANIC. Note that this is just a bandaid, ideally common/ would contain a logging frameword, and these macros would only be defined once instead of being defined in several places. --- common/canvas_base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/canvas_base.c b/common/canvas_base.c index 796bda3..4dedfcf 100644 --- a/common/canvas_base.c +++ b/common/canvas_base.c @@ -53,10 +53,12 @@ #define WARN(x) printf("warning: %s\n", x) #endif +#ifndef PANIC #define PANIC(str) { \ printf("%s: panic: %s", __FUNCTION__, str); \ abort(); \ } +#endif #ifndef DBG #define DBG(level, format, ...) printf("%s: debug: " format "\n", __FUNCTION__, ## __VA_ARGS__);