diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-08-29 04:14:26 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-08-29 04:14:26 +0200 |
commit | efed0aa7dd6157f3c4e16cb022eefa3ba942e470 (patch) | |
tree | a498f486f4789832d0c9639c7a7bb5c2a0487973 /include/assert.h | |
parent | add stdalign.h (diff) | |
download | slibc-efed0aa7dd6157f3c4e16cb022eefa3ba942e470.tar.gz slibc-efed0aa7dd6157f3c4e16cb022eefa3ba942e470.tar.bz2 slibc-efed0aa7dd6157f3c4e16cb022eefa3ba942e470.tar.xz |
only use __attributes__ if compiling with gcc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | include/assert.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/assert.h b/include/assert.h index 7f44222..e5a963d 100644 --- a/include/assert.h +++ b/include/assert.h @@ -20,6 +20,9 @@ #include <slibc/version.h> +#include <slibc/features.h> + + /* The `assert` macro shall be redefined according to the the * current state of `NDEBUF` each time <assert.h> is included. */ @@ -86,7 +89,7 @@ __USE_GNU * @param line The line in the source code whence the assertion was made * @param func The function in the source code whence the assertion was made */ -void __attribute__((noreturn, nonnull(3, 4, 5))) +void __GCC_ONLY(__attribute__((noreturn, nonnull(3, 4, 5)))) __assert_fail(const char* expression, int errnum, const char* file, int line, const char* func); |