headers: Don't define static_assert for C23 and C++

Change-Id: I1e67b09b2a310de5cf41c4eef9af46f78b4e9de0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8586
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Jérôme Duval 2024-11-21 19:31:40 +01:00 committed by waddlesplash
parent 7de59aee29
commit fbdac8d61e

View File

@ -52,6 +52,7 @@ extern void __assert_perror_fail(int error, const char *file,
# define assert(condition) ((void)0) # define assert(condition) ((void)0)
#endif #endif
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(static_assert) #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && __STDC_VERSION__ <= 201710L \
&& !defined(static_assert) && !defined(__cplusplus)
# define static_assert _Static_assert # define static_assert _Static_assert
#endif #endif