Skip to content

Commit d18c98a

Browse files
committed
debug_assert_nonsecret: Prefer assert.h if compiler says it is available.
1 parent 533951a commit d18c98a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/ring-core/check.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
# else
3333
# define debug_assert_nonsecret(x) ((void)0)
3434
# endif
35+
# if defined(__has_include)
36+
# if __has_include(<assert.h>)
37+
# include <assert.h>
38+
# undef debug_assert_nonsecret
39+
# define debug_assert_nonsecret(x) assert(x)
40+
# endif
41+
# endif
3542
#endif
3643

3744
// |dev_assert_secret| is like |assert| and should be used (only) when the

0 commit comments

Comments
 (0)