diff options
author | Chandramouli Narayanan <chandramouli.narayanan@intel.com> | 2012-09-01 07:10:46 -0700 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-09-04 18:49:39 +0100 |
commit | d1e4387577da5a5bc291a112aa51da6f8f1869cc (patch) | |
tree | 9ea0e7deca3993a2afbece979c5344ceaaf34f01 | |
parent | 9415cfeb0a3d641eea9c6b877278e1acbc4ee830 (diff) | |
download | syslinux-d1e4387577da5a5bc291a112aa51da6f8f1869cc.tar.gz syslinux-d1e4387577da5a5bc291a112aa51da6f8f1869cc.tar.xz syslinux-d1e4387577da5a5bc291a112aa51da6f8f1869cc.zip |
core: Rename DEBUG macro to avoid gnu-efi library conflict
Use of DEBUG macro clases with gnu-efi library. This patch defines
CORE_DEBUG. Appropriate changes to sources are made as a result. Also,
the linker error on __bad_SEG is fixed.
Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | com32/include/com32.h | 2 | ||||
-rw-r--r-- | com32/include/dprintf.h | 8 | ||||
-rw-r--r-- | core/kaboom.c | 2 | ||||
-rw-r--r-- | mk/devel.mk | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/com32/include/com32.h b/com32/include/com32.h index 148d08eb..7ca187a5 100644 --- a/com32/include/com32.h +++ b/com32/include/com32.h @@ -135,7 +135,7 @@ char *lstrdup(const char *); * specific segment. OFFS_VALID() will return whether or not the * pointer is actually reachable from the target segment. */ -#if defined(DEBUG) && (defined(__COM32__) || defined(__SYSLINUX_CORE__)) +#if defined(CORE_DEBUG) && (defined(__COM32__) || defined(__SYSLINUX_CORE__)) __noreturn __bad_SEG(const volatile void *); static inline uint16_t SEG(const volatile void *__p) diff --git a/com32/include/dprintf.h b/com32/include/dprintf.h index 26ca734b..de4625bc 100644 --- a/com32/include/dprintf.h +++ b/com32/include/dprintf.h @@ -6,10 +6,10 @@ #define _DPRINTF_H #if !defined(DEBUG_PORT) && !defined(DEBUG_STDIO) -# undef DEBUG +# undef CORE_DEBUG #endif -#ifdef DEBUG +#ifdef CORE_DEBUG # include <stdio.h> @@ -26,9 +26,9 @@ void vdprintf(const char *, va_list); # define dprintf(fmt, ...) ((void)(0)) # define vdprintf(fmt, ap) ((void)(0)) -#endif /* DEBUG */ +#endif /* CORE_DEBUG */ -# if DEBUG >= 2 +# if CORE_DEBUG >= 2 /* Really verbose debugging... */ # define dprintf2 dprintf # define vdprintf2 vdprintf diff --git a/core/kaboom.c b/core/kaboom.c index 9bb30736..726ca2be 100644 --- a/core/kaboom.c +++ b/core/kaboom.c @@ -4,7 +4,7 @@ #include "core.h" -#ifdef DEBUG +#ifdef CORE_DEBUG #include <dprintf.h> diff --git a/mk/devel.mk b/mk/devel.mk index 8184c30f..fb4af678 100644 --- a/mk/devel.mk +++ b/mk/devel.mk @@ -1,3 +1,3 @@ # Useful while doing development, but not for production. GCCWARN += -Wno-clobbered -# GCCWARN += -DDEBUG_PORT=0x3f8 -DDEBUG=1 +# GCCWARN += -DDEBUG_PORT=0x3f8 -DCORE_DEBUG=1 |