Skip to content

Commit

Permalink
debug_assert_nonsecret: Prefer assert.h if compiler says it is availa…
Browse files Browse the repository at this point in the history
…ble.
  • Loading branch information
briansmith committed Jun 21, 2024
1 parent 072ccd3 commit 26eaab7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/ring-core/check.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
# else
# define debug_assert_nonsecret(x) ((void)0)
# endif
# if defined(__has_include)
# if __has_include(<assert.h>)
# include <assert.h>
# undef debug_assert_nonsecret
# define debug_assert_nonsecret(x) assert(x)
# endif
# endif
#endif

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

0 comments on commit 26eaab7

Please sign in to comment.