Merge branch 'assert-bits' into 'master'
move assert bits from C to cbindgen See merge request redox-os/relibc!1183
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
// Do not use include guard, to ensure assert is always defined
|
||||
#ifdef assert
|
||||
#undef assert
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
# define assert(cond) (void) 0
|
||||
#else
|
||||
# define assert(cond) \
|
||||
((void)((cond) || (__assert_fail(__func__, __FILE__, __LINE__, #cond), 0)))
|
||||
#endif
|
||||
@@ -5,7 +5,20 @@
|
||||
# features.h included for Rust never type (no return)
|
||||
sys_includes = ["features.h"]
|
||||
include_guard = "_RELIBC_ASSERT_H"
|
||||
trailer = "#include <bits/assert.h>"
|
||||
# trailer is placed outside include_guard
|
||||
trailer = """
|
||||
// Do not use include guard, to ensure assert is always defined
|
||||
#ifdef assert
|
||||
#undef assert
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
# define assert(cond) (void) 0
|
||||
#else
|
||||
# define assert(cond) \
|
||||
((void)((cond) || (__assert_fail(__func__, __FILE__, __LINE__, #cond), 0)))
|
||||
#endif
|
||||
"""
|
||||
language = "C"
|
||||
style = "Tag"
|
||||
no_includes = true
|
||||
|
||||
Reference in New Issue
Block a user