From c2688979a4ee3b9c0b1d00e94ce2a37ba71b6af6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 1 Jul 2010 09:40:29 -0700 Subject: [PATCH] Remove AC_DEFINE for DEBUG/NDEBUG Whoops, I momentarilly forgot I had explicitly set these as CC options so dependent packages which need to include spl_config.h would not end up having these defined which can result in accidentally hanging debug enabled at best, or a build failure at worst. --- config/spl-build.m4 | 2 -- configure | 20 -------------------- spl_config.h.in | 6 ------ 3 files changed, 28 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 9fd97c06f..09e4b55eb 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -244,12 +244,10 @@ AC_DEFUN([SPL_AC_DEBUG], [ AS_IF([test "x$enable_debug" = xyes], [ - AC_DEFINE([DEBUG], [1], [Define to 1 to enable debug]) KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" DEBUG_CFLAGS="-DDEBUG -Werror" ], [ - AC_DEFINE([NDEBUG], [1], [Define to 1 to enable debug]) KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" DEBUG_CFLAGS="-DNDEBUG" ]) diff --git a/configure b/configure index a0d4cf890..979c38800 100755 --- a/configure +++ b/configure @@ -11630,21 +11630,11 @@ fi if test "x$enable_debug" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define DEBUG 1 -_ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" DEBUG_CFLAGS="-DDEBUG -Werror" else - -cat >>confdefs.h <<\_ACEOF -#define NDEBUG 1 -_ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" DEBUG_CFLAGS="-DNDEBUG" @@ -15110,21 +15100,11 @@ fi if test "x$enable_debug" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define DEBUG 1 -_ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror" DEBUG_CFLAGS="-DDEBUG -Werror" else - -cat >>confdefs.h <<\_ACEOF -#define NDEBUG 1 -_ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" DEBUG_CFLAGS="-DNDEBUG" diff --git a/spl_config.h.in b/spl_config.h.in index 540b79392..a22ca7b8b 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -3,9 +3,6 @@ /* Atomic types use spinlocks */ #undef ATOMIC_SPINLOCK -/* Define to 1 to enable debug */ -#undef DEBUG - /* Define to 1 to enable basic kmem accounting */ #undef DEBUG_KMEM @@ -211,9 +208,6 @@ */ #undef LT_OBJDIR -/* Define to 1 to enable debug */ -#undef NDEBUG - /* get_zone_counts() is needed */ #undef NEED_GET_ZONE_COUNTS