]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: add --disable-assert
authorKarel Zak <kzak@redhat.com>
Tue, 4 Aug 2015 11:40:44 +0000 (13:40 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 4 Aug 2015 11:40:44 +0000 (13:40 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
Documentation/releases/v2.27-ReleaseNotes
configure.ac
include/c.h
libfdisk/src/fdiskP.h
libfdisk/src/version.c
libmount/src/mountP.h
libmount/src/version.c
libsmartcols/src/smartcolsP.h

index 21de1112f83b39f2220e86b6986dba0150cbe1af..44793220c5ddc631459d328c6f24767abef0a198 100644 (file)
@@ -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
 ---------------------------------------------------
index cd2ef86c0b9cd0d0e46310dd083eb9f21831b8e4..6dc7f05b11dfb770176dcc9a1cb1795b1686980c 100644 (file)
@@ -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])
index 1eda75f6b48f3bfb7998bf6b0ca90afab7dc30c3..2a317eb52f791977e8f61b4d512947a39576d4a3 100644 (file)
@@ -15,6 +15,8 @@
 #include <string.h>
 #include <errno.h>
 
+#include <assert.h>
+
 #ifdef HAVE_ERR_H
 # include <err.h>
 #endif
index 10380e15b422377a25bbfca12e8406fb3dc63333..2961095c984d3e60de877348de9baf1625d8f616 100644 (file)
@@ -17,7 +17,6 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-
 #include "c.h"
 #include "libfdisk.h"
 
 #include <stdio.h>
 #include <stdarg.h>
 
-/* features */
-#define CONFIG_LIBFDISK_ASSERT
-
-#ifdef CONFIG_LIBFDISK_ASSERT
-#include <assert.h>
-#endif
-
 /*
  * Debug
  */
index db8467b5132f0c8bc57780704cda5176adfa5b31..bfbd7c5e3e38c27eb61df38d19ea564f01bc3407 100644 (file)
@@ -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 */
index d28eb9cdd84725f9a0594e026ac1636d7c5c1cbd..660e0ad08bf5857f58273eda2411692401377289 100644 (file)
 #include "debug.h"
 #include "libmount.h"
 
-/* features */
-#define CONFIG_LIBMOUNT_ASSERT
-
-#ifdef CONFIG_LIBMOUNT_ASSERT
-# include <assert.h>
-#else
-# define assert(x)
-#endif
-
 /*
  * Debug
  */
index 28f3a574b12436f3852989ffb5b8087ae1bd3e20..d81d4323f6f822c53aa7912d48d644c5ba63c0d6 100644 (file)
@@ -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
index 95c00db8fdf1c92117395e1cf090d940c9ba6bc8..2cf8a9d6df9a9f2c7792e2e35af018c4c8fc3d13 100644 (file)
 
 #include "libsmartcols.h"
 
-/* features */
-#define CONFIG_LIBSMARTCOLS_ASSERT
-
-#ifdef CONFIG_LIBSMARTCOLS_ASSERT
-# include <assert.h>
-#else
-# define assert(x)
-#endif
-
 /*
  * Debug
  */