From 2952c69c7a409b193b9bf03c8f26634211820ea8 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 8 Nov 2013 09:11:47 +0100 Subject: [PATCH] Define NDEBUG for assert() if --enable-debug is not specified. --- configure | 3 +-- include/xbps_api_impl.h | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 187df527..a8cd07b7 100755 --- a/configure +++ b/configure @@ -199,11 +199,10 @@ fi if [ -n "$DEBUG" -a "$DEBUG" != no -a "$DEBUG" != false ]; then echo "Building with debugging symbols." + echo "CPPFLAGS += -DDEBUG" >>$CONFIG_MK echo "CFLAGS += -g" >>$CONFIG_MK fi -echo "CPPFLAGS += -DDEBUG" >>$CONFIG_MK - case "$OS" in linux) echo "CPPFLAGS += -D_XOPEN_SOURCE=700" >>$CONFIG_MK diff --git a/include/xbps_api_impl.h b/include/xbps_api_impl.h index fcb2dd4a..32422e61 100644 --- a/include/xbps_api_impl.h +++ b/include/xbps_api_impl.h @@ -27,6 +27,10 @@ #ifndef _XBPS_API_IMPL_H_ #define _XBPS_API_IMPL_H_ +#ifndef DEBUG +#define NDEBUG +#endif + #include #include #define LIBXBPS_PRIVATE