From 2acbac8ef9d314b73fbbd68c2e70580988c063a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 26 Feb 2024 09:59:08 +0100 Subject: New upstream version 4.23 --- include/libHX/cast.h | 6 ++++++ include/libHX/defs.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'include/libHX') diff --git a/include/libHX/cast.h b/include/libHX/cast.h index cb2cba5..c8fe0ba 100644 --- a/include/libHX/cast.h +++ b/include/libHX/cast.h @@ -1,6 +1,12 @@ #ifndef _LIBHX_CAST_H #define _LIBHX_CAST_H 1 +#ifndef BUILD_BUG_ON_EXPR +# define BUILD_BUG_ON_EXPR(condition) (sizeof(char[1 - 2 * !!(condition)]) - 1) +#endif +#ifndef BUILD_BUG_ON +# define BUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_EXPR(condition)) +#endif #ifdef __cplusplus # ifndef const_cast # define const_cast(T, x) const_cast(x) diff --git a/include/libHX/defs.h b/include/libHX/defs.h index 31c818f..ba84b37 100644 --- a/include/libHX/defs.h +++ b/include/libHX/defs.h @@ -38,12 +38,6 @@ #ifndef ARRAY_SIZE # define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)) + __array_size_check(x)) #endif -#ifndef BUILD_BUG_ON_EXPR -# define BUILD_BUG_ON_EXPR(condition) (sizeof(char[1 - 2 * !!(condition)]) - 1) -#endif -#ifndef BUILD_BUG_ON -# define BUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_EXPR(condition)) -#endif #ifndef DEMOTE_TO_PTR /* * An alternative approach is also (p+0), but that does not ensure that -- cgit v1.2.3