* Paolo Bonzini ([email protected]) wrote:
> Even though it's just two lines of code, I'm reimplementing it
> cleanly out of paranoia.

Merged, thanks!

Mathieu

> 
> Signed-off-by: Paolo Bonzini <[email protected]>
> ---
>  tests/api.h     |    4 +---
>  urcu/compiler.h |    3 +++
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/api.h b/tests/api.h
> index 49c96f7..c5d716f 100644
> --- a/tests/api.h
> +++ b/tests/api.h
> @@ -27,11 +27,9 @@
>   * to redistribute under later versions of GPL might not be available.
>   */
>  
> +#include <urcu/compiler.h>
>  #include <urcu/arch.h>
>  
> -#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
> -#define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1)
> -
>  /*
>   * Machine parameters.
>   */
> diff --git a/urcu/compiler.h b/urcu/compiler.h
> index 54904cc..489677b 100644
> --- a/urcu/compiler.h
> +++ b/urcu/compiler.h
> @@ -61,4 +61,7 @@
>               (type *)((char *)__ptr - offsetof(type, member));       \
>       })
>  
> +#define CAA_BUILD_BUG_ON_ZERO(cond) (sizeof(struct { int:-!!(cond); }))
> +#define CAA_BUILD_BUG_ON(cond) ((void)BUILD_BUG_ON_ZERO(cond))
> +
>  #endif /* _URCU_COMPILER_H */
> -- 
> 1.7.6
> 
> 
> _______________________________________________
> ltt-dev mailing list
> [email protected]
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
ltt-dev mailing list
[email protected]
http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev

Reply via email to