asort: fix test when typesafe_cb not supported. origin/suncc
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 29 Mar 2012 04:28:33 +0000 (14:58 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 29 Mar 2012 04:28:33 +0000 (14:58 +1030)
Solaris CC seems to support typeof, but not __builtin_types_compatible_p.

ccan/asort/test/compile_fail-context-type.c

index 62d16c5e1132c9530cc82a80969abccc3f9976c6..473d10264140e04710be1a98f02e353a726a9d77 100644 (file)
@@ -9,9 +9,10 @@ static int cmp(char *const *a, char *const *b, int *flag)
 int main(int argc, char **argv)
 {
 #ifdef FAIL
+#if HAVE_TYPEOF && HAVE_BUILTIN_CHOOSE_EXPR && HAVE_BUILTIN_TYPES_COMPATIBLE_P
        char flag;
-#if !HAVE_TYPEOF
-#error "Unfortunately we don't fail if no typeof."
+#else
+#error "Unfortunately we don't fail if no typecheck_cb support."
 #endif
 #else
        int flag;