From: Arun Thomas Date: Thu, 18 Aug 2011 12:56:34 +0000 (+0200) Subject: Cleaner MKSYSDEBUG option X-Git-Tag: v3.2.0~348 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/style.css?a=commitdiff_plain;h=27c0e801f2015873ca38ce8143d3447cbc2cb97d;p=minix.git Cleaner MKSYSDEBUG option --- diff --git a/kernel/Makefile b/kernel/Makefile index b652ebc1b..7c7f7916c 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -70,6 +70,7 @@ SRCS+= breakpoints.c debugreg.S # Extra debugging routines .if ${USE_SYSDEBUG} != "no" SRCS+= debug.c +CPPFLAGS+= -DUSE_SYSDEBUG .endif # These come last, so the profiling buffer is at the end of the data segment diff --git a/kernel/arch/i386/arch_system.c b/kernel/arch/i386/arch_system.c index a94c3a4a0..882ae7f23 100644 --- a/kernel/arch/i386/arch_system.c +++ b/kernel/arch/i386/arch_system.c @@ -395,7 +395,7 @@ PUBLIC void arch_init(void) #endif } -#if DEBUG_SERIAL +#ifdef DEBUG_SERIAL PUBLIC void ser_putc(char c) { int i; diff --git a/kernel/clock.c b/kernel/clock.c index 074dba884..afc885790 100644 --- a/kernel/clock.c +++ b/kernel/clock.c @@ -140,7 +140,7 @@ PUBLIC int timer_int_handler(void) TMR_NEVER : clock_timers->tmr_exp_time; } -#if DEBUG_SERIAL +#ifdef DEBUG_SERIAL if (do_serial_debug) do_ser_debug(); #endif diff --git a/kernel/debug.h b/kernel/debug.h index 58921db7c..7cb7e7e84 100644 --- a/kernel/debug.h +++ b/kernel/debug.h @@ -50,7 +50,7 @@ /* DEBUG_IPCSTATS collects information on who sends messages to whom. */ #define DEBUG_IPCSTATS 0 -#if USE_SMALL +#if !USE_SYSDEBUG #undef DEBUG_SERIAL #undef DEBUG_ENABLE_IPC_WARNINGS #endif diff --git a/kernel/start.c b/kernel/start.c index ba25c665e..6f122cdae 100644 --- a/kernel/start.c +++ b/kernel/start.c @@ -84,7 +84,7 @@ PUBLIC void cstart( if(!value || system_hz < 2 || system_hz > 50000) /* sanity check */ system_hz = DEFAULT_HZ; -#if DEBUG_SERIAL +#ifdef DEBUG_SERIAL /* Intitialize serial debugging */ value = env_get(SERVARNAME); if(value && atoi(value) == 0) { diff --git a/kernel/utility.c b/kernel/utility.c index 15a043c58..0de0d5bd7 100644 --- a/kernel/utility.c +++ b/kernel/utility.c @@ -50,7 +50,7 @@ int c; /* character to append */ * to the output driver if an END_OF_KMESS is encountered. */ if (c != END_OF_KMESS) { -#if DEBUG_SERIAL +#ifdef DEBUG_SERIAL if (do_serial_debug) { if(c == '\n') ser_putc('\r'); diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 28a396fc8..dd8c634a2 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -247,5 +247,5 @@ NBSD_LIBC= yes .if ${COMPILER_TYPE} == "gnu" && defined(MKSMALL) && ${MKSMALL} == "yes" DBG= -Os -CFLAGS+= -DNDEBUG=1 -DUSE_SMALL=1 +CFLAGS+= -DNDEBUG .endif