build-sys: add --disable-assert

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2015-08-04 13:40:44 +02:00
parent cba392b661
commit 2c6567799d
8 changed files with 8 additions and 29 deletions

View 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
---------------------------------------------------

View 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])

View File

@ -15,6 +15,8 @@
#include <string.h>
#include <errno.h>
#include <assert.h>
#ifdef HAVE_ERR_H
# include <err.h>
#endif

View File

@ -17,7 +17,6 @@
#include <sys/types.h>
#include <unistd.h>
#include "c.h"
#include "libfdisk.h"
@ -27,13 +26,6 @@
#include <stdio.h>
#include <stdarg.h>
/* features */
#define CONFIG_LIBFDISK_ASSERT
#ifdef CONFIG_LIBFDISK_ASSERT
#include <assert.h>
#endif
/*
* Debug
*/

View 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 */

View File

@ -25,15 +25,6 @@
#include "debug.h"
#include "libmount.h"
/* features */
#define CONFIG_LIBMOUNT_ASSERT
#ifdef CONFIG_LIBMOUNT_ASSERT
# include <assert.h>
#else
# define assert(x)
#endif
/*
* Debug
*/

View 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

View File

@ -18,15 +18,6 @@
#include "libsmartcols.h"
/* features */
#define CONFIG_LIBSMARTCOLS_ASSERT
#ifdef CONFIG_LIBSMARTCOLS_ASSERT
# include <assert.h>
#else
# define assert(x)
#endif
/*
* Debug
*/