From 2c6567799debe6017b1a1e1f5695fbe632545521 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 4 Aug 2015 13:40:44 +0200 Subject: build-sys: add --disable-assert Signed-off-by: Karel Zak --- Documentation/releases/v2.27-ReleaseNotes | 2 ++ configure.ac | 1 + include/c.h | 2 ++ libfdisk/src/fdiskP.h | 8 -------- libfdisk/src/version.c | 2 +- libmount/src/mountP.h | 9 --------- libmount/src/version.c | 4 ++-- libsmartcols/src/smartcolsP.h | 9 --------- 8 files changed, 8 insertions(+), 29 deletions(-) diff --git a/Documentation/releases/v2.27-ReleaseNotes b/Documentation/releases/v2.27-ReleaseNotes index 21de1112f..44793220c 100644 --- a/Documentation/releases/v2.27-ReleaseNotes +++ b/Documentation/releases/v2.27-ReleaseNotes @@ -50,6 +50,8 @@ The command rtcwake supports a new option --list-modes to list available modes, and a new option --date for human-readable times. rtcwake does not support RTC_ALM_READ and RTC_ALM_SET fallbacks any more. +The util-linux code is possible rebuild with --disable-assert now. + Stable maintenance releases between v2.26 and v2.27 --------------------------------------------------- diff --git a/configure.ac b/configure.ac index cd2ef86c0..6dc7f05b1 100644 --- a/configure.ac +++ b/configure.ac @@ -169,6 +169,7 @@ UL_SET_ARCH([MIPS], [mips*]) UL_SET_ARCH([HPPA], [hppa*]) AC_SYS_LARGEFILE +AC_HEADER_ASSERT dnl Don't forget to maintain alternatively allowed versions in autogen.sh! AM_GNU_GETTEXT_VERSION([0.18.3]) diff --git a/include/c.h b/include/c.h index 1eda75f6b..2a317eb52 100644 --- a/include/c.h +++ b/include/c.h @@ -15,6 +15,8 @@ #include #include +#include + #ifdef HAVE_ERR_H # include #endif diff --git a/libfdisk/src/fdiskP.h b/libfdisk/src/fdiskP.h index 10380e15b..2961095c9 100644 --- a/libfdisk/src/fdiskP.h +++ b/libfdisk/src/fdiskP.h @@ -17,7 +17,6 @@ #include #include - #include "c.h" #include "libfdisk.h" @@ -27,13 +26,6 @@ #include #include -/* features */ -#define CONFIG_LIBFDISK_ASSERT - -#ifdef CONFIG_LIBFDISK_ASSERT -#include -#endif - /* * Debug */ diff --git a/libfdisk/src/version.c b/libfdisk/src/version.c index db8467b51..bfbd7c5e3 100644 --- a/libfdisk/src/version.c +++ b/libfdisk/src/version.c @@ -17,7 +17,7 @@ static const char *lib_version = LIBFDISK_VERSION; static const char *lib_features[] = { -#ifdef CONFIG_LIBFDISK_ASSERT +#if !defined(NDEBUG) /* libc assert.h stuff */ "assert", #endif "debug", /* always enabled */ diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h index d28eb9cdd..660e0ad08 100644 --- a/libmount/src/mountP.h +++ b/libmount/src/mountP.h @@ -25,15 +25,6 @@ #include "debug.h" #include "libmount.h" -/* features */ -#define CONFIG_LIBMOUNT_ASSERT - -#ifdef CONFIG_LIBMOUNT_ASSERT -# include -#else -# define assert(x) -#endif - /* * Debug */ diff --git a/libmount/src/version.c b/libmount/src/version.c index 28f3a574b..d81d4323f 100644 --- a/libmount/src/version.c +++ b/libmount/src/version.c @@ -25,8 +25,8 @@ static const char *lib_features[] = { #ifdef HAVE_SMACK "smack", #endif -#ifdef CONFIG_LIBMOUNT_ASSERT - "assert", +#if !defined(NDEBUG) + "assert", /* libc assert.h stuff */ #endif "debug", /* always enabled */ NULL diff --git a/libsmartcols/src/smartcolsP.h b/libsmartcols/src/smartcolsP.h index 95c00db8f..2cf8a9d6d 100644 --- a/libsmartcols/src/smartcolsP.h +++ b/libsmartcols/src/smartcolsP.h @@ -18,15 +18,6 @@ #include "libsmartcols.h" -/* features */ -#define CONFIG_LIBSMARTCOLS_ASSERT - -#ifdef CONFIG_LIBSMARTCOLS_ASSERT -# include -#else -# define assert(x) -#endif - /* * Debug */ -- cgit v1.2.3-55-g7522