From f87cfe0b568ea912dcf77e27ebc98fafa25ceaac Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 15 Jan 2018 19:54:51 +0100 Subject: [PATCH] yaft: fix debug logging DEBUG was defined at least in configure's config.h, so it conflicts with the enum definition Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b46ee0cec7218502f151b301a438b893dddf4508 Author: Stefan Seyfried Date: 2018-01-15 (Mon, 15 Jan 2018) --- src/gui/widget/yaft/fb/neutrinofb.h | 4 ++++ src/gui/widget/yaft/yaft_class.cpp | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/gui/widget/yaft/fb/neutrinofb.h b/src/gui/widget/yaft/fb/neutrinofb.h index c8f330b83..8e8d3bae0 100644 --- a/src/gui/widget/yaft/fb/neutrinofb.h +++ b/src/gui/widget/yaft/fb/neutrinofb.h @@ -22,6 +22,10 @@ * in all copies or substantial portions of the Software. */ #include +#ifdef DEBUG +/* maybe on compiler command line or in neutrino config.h */ +#undef DEBUG +#endif enum { CMAP_COLOR_LENGTH = sizeof(__u16) * BITS_PER_BYTE, diff --git a/src/gui/widget/yaft/yaft_class.cpp b/src/gui/widget/yaft/yaft_class.cpp index b58dd3b32..736608092 100644 --- a/src/gui/widget/yaft/yaft_class.cpp +++ b/src/gui/widget/yaft/yaft_class.cpp @@ -21,6 +21,10 @@ * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. */ +#ifdef DEBUG +/* maybe on command line? */ +#undef DEBUG +#endif #include "yaft.h" #include "conf.h" #include "util.h" @@ -32,6 +36,10 @@ #include "parse.h" #include "yaft_class.h" #include +#ifdef DEBUG +#warning DEBUG redefined! +#undef DEBUG +#endif static void sig_handler(int signo) {