X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fcheck_type%2Fcheck_type.h;h=1d85df0d3610bac4cd4aefe974c69c1f01b411a7;hb=095540b72965c5e673c498accdd73d43a2838b61;hp=d0dc0d4b295fb9bf800bf4e1d69ac59a7ed5615f;hpb=f66bb62ab93dfb3031fd4c75c4a23951428f3a3f;p=ccan diff --git a/ccan/check_type/check_type.h b/ccan/check_type/check_type.h index d0dc0d4b..1d85df0d 100644 --- a/ccan/check_type/check_type.h +++ b/ccan/check_type/check_type.h @@ -1,3 +1,4 @@ +/* Licensed under LGPLv2.1+ - see LICENSE file for details */ #ifndef CCAN_CHECK_TYPE_H #define CCAN_CHECK_TYPE_H #include "config.h" @@ -51,13 +52,13 @@ #define check_types_match(expr1, expr2) \ ((typeof(expr1) *)0 != (typeof(expr2) *)0) #else -#include "build_assert/build_assert.h" +#include /* Without typeof, we can only test the sizes. */ #define check_type(expr, type) \ - EXPR_BUILD_ASSERT(sizeof(expr) == sizeof(type)) + BUILD_ASSERT_OR_ZERO(sizeof(expr) == sizeof(type)) #define check_types_match(expr1, expr2) \ - EXPR_BUILD_ASSERT(sizeof(expr1) == sizeof(expr2)) + BUILD_ASSERT_OR_ZERO(sizeof(expr1) == sizeof(expr2)) #endif /* HAVE_TYPEOF */ #endif /* CCAN_CHECK_TYPE_H */