From: Rusty Russell Date: Tue, 10 May 2011 04:38:59 +0000 (+0930) Subject: typesafe_cb: don't use HAVE_CAST_TO_UNION in tests. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=72dc7d42c92fcfbafcc7e3b3b1518c9aa4a2e874 typesafe_cb: don't use HAVE_CAST_TO_UNION in tests. This crept in, it should be the same as the tests in typesafe_cb.h. --- diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c index d7d481cb..62b5f91e 100644 --- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c +++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c @@ -29,7 +29,7 @@ int main(int argc, char *argv[]) { #ifdef FAIL struct other -#if !HAVE_TYPEOF || !HAVE_CAST_TO_UNION +#if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P #error "Unfortunately we don't fail if typesafe_cb_cast is a noop." #endif #else diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c index 07a204f6..d2e6f2ab 100644 --- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c +++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c @@ -14,7 +14,7 @@ int main(int argc, char *argv[]) #ifdef FAIL int x = 0; set_some_value(x); -#if !HAVE_TYPEOF||!HAVE_CAST_TO_UNION +#if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P #error "Unfortunately we don't fail if typesafe_cb_cast is a noop." #endif #else