diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-15 22:55:21 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-15 23:20:48 +0200 |
commit | 659c6a363bf84bd2520042ba80bc507763b57b78 (patch) | |
tree | 41079d20ca1d37959ee062eaabcf8cbc1bc3257d /sal | |
parent | Include saldllapi.h explicitly where needed (diff) | |
download | core-659c6a363bf84bd2520042ba80bc507763b57b78.tar.gz core-659c6a363bf84bd2520042ba80bc507763b57b78.zip |
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.h | 17 |
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 ) /* |