diff options
author | ed <ed@FreeBSD.org> | 2011-12-26 18:57:59 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2011-12-26 18:57:59 +0000 |
commit | d0881b7c620a7310adb8aa003a5b8a5c51d8a599 (patch) | |
tree | 60942e4dbc392edcdcfce3a9e0e5892f28c53657 | |
parent | 62cadb3ee674243d071bac229f2f7831b88d7af6 (diff) | |
download | FreeBSD-src-d0881b7c620a7310adb8aa003a5b8a5c51d8a599.zip FreeBSD-src-d0881b7c620a7310adb8aa003a5b8a5c51d8a599.tar.gz |
As per C11, add static_assert() to <assert.h>.
-rw-r--r-- | include/assert.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/assert.h b/include/assert.h index 5621f8c..6633d8f 100644 --- a/include/assert.h +++ b/include/assert.h @@ -57,7 +57,13 @@ #ifndef _ASSERT_H_ #define _ASSERT_H_ + +#if __ISO_C_VISIBLE >= 2011 && (!defined(__cplusplus) || __cplusplus < 201103L) +#define static_assert _Static_assert +#endif + __BEGIN_DECLS void __assert(const char *, const char *, int, const char *) __dead2; __END_DECLS + #endif /* !_ASSERT_H_ */ |