summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-15 22:55:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-15 23:20:48 +0200
commit659c6a363bf84bd2520042ba80bc507763b57b78 (patch)
tree41079d20ca1d37959ee062eaabcf8cbc1bc3257d /sal
parent7a042c8204628c573fc52d5fb4e4a5ba650b1604 (diff)
Let --enable-assert-always-abort affect setting NDEBUG directly
For one, assert.h is designed to be includeable multiple times with changing NDEBUG settings, so it is not robust to include it early in sal/macros.h with "correct" NDEBUG settings and potentially include it again later. For another, there is #ifndef NDEBUG code providing functionality used exclusively within assert calls, which must be compiled with the same NDEBUG-setting as the relevant #include <assert.h>. Change-Id: I7b2f9c85f8e2155051274757c64162ed5a5e9d1b
Diffstat (limited to 'sal')
-rw-r--r--sal/inc/sal/macros.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/sal/inc/sal/macros.h b/sal/inc/sal/macros.h
index bb0e46e9876e..ee44aa3f4bbb 100644
--- a/sal/inc/sal/macros.h
+++ b/sal/inc/sal/macros.h
@@ -31,23 +31,6 @@
#include <stddef.h>
-/* we want to be able to compile release code while retaining the abort capabilities of assert().
- * This presume that this include is called early... i.e before anyone else included assert.h
- * which should more often than not be the case since macros.h is included by sal/types.h
- * which is included at the top of most source (or should be)
- */
-#ifdef ASSERT_ALWAYS_ABORT
-# ifdef NDEBUG
-# undef NDEBUG
-# include <assert.h>
-# define NDEBUG
-# else /* Ndef NDEBUG */
-# include <assert.h>
-# endif /* Ndef NDEBUG */
-#else /* NDef ASSERT_ALWAYS_ABORT */
-# include <assert.h>
-#endif /* NDef ASSERT_ALWAYS_ABORT */
-
#ifndef SAL_N_ELEMENTS
# if defined(__cplusplus) && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L )
/*